Model Loading: Overlays

Cannot copy overlays until the props has been read.
Ticket: #2429
This commit is contained in:
Scott Giese 2020-11-24 11:26:57 -06:00
parent d4d149f3c0
commit aab373ac3a

View File

@ -528,15 +528,16 @@ sgLoad3DModel_internal(const SGPath& path,
// Check for an XML wrapper
if (modelpath.extension() == "xml") {
try {
if (overlay)
copyProperties(overlay, props);
readProperties(modelpath, props);
} catch (const sg_exception &t) {
SG_LOG(SG_IO, SG_DEV_ALERT, "Failed to load xml: "
<< t.getFormattedMessage());
throw;
}
if (overlay)
copyProperties(overlay, props);
if (options->getAutoTooltipsMaster()) {
addTooltipAnimations(path, props, model, options->getAutoTooltipsMasterMax());
}