Always add transformation property owners, even if the defaults are not overwritten

This commit is contained in:
Alexander Bock
2019-08-22 09:52:35 +02:00
parent 5675a495b0
commit 0f36cf0dd4

View File

@@ -123,11 +123,13 @@ std::unique_ptr<SceneGraphNode> SceneGraphNode::createFromDictionary(
));
return nullptr;
}
result->addPropertySubOwner(result->_transform.translation.get());
LDEBUG(fmt::format(
"Successfully created ephemeris for '{}'", result->identifier()
));
}
if (result->_transform.translation) {
result->addPropertySubOwner(result->_transform.translation.get());
}
if (dictionary.hasKey(KeyTransformRotation)) {
ghoul::Dictionary rotationDictionary;
@@ -139,11 +141,13 @@ std::unique_ptr<SceneGraphNode> SceneGraphNode::createFromDictionary(
));
return nullptr;
}
result->addPropertySubOwner(result->_transform.rotation.get());
LDEBUG(fmt::format(
"Successfully created rotation for '{}'", result->identifier()
));
}
if (result->_transform.rotation) {
result->addPropertySubOwner(result->_transform.rotation.get());
}
if (dictionary.hasKey(KeyTransformScale)) {
ghoul::Dictionary scaleDictionary;
@@ -155,9 +159,11 @@ std::unique_ptr<SceneGraphNode> SceneGraphNode::createFromDictionary(
));
return nullptr;
}
result->addPropertySubOwner(result->_transform.scale.get());
LDEBUG(fmt::format("Successfully created scale for '{}'", result->identifier()));
}
if (result->_transform.scale) {
result->addPropertySubOwner(result->_transform.scale.get());
}
if (dictionary.hasKey(KeyTimeFrame)) {
ghoul::Dictionary timeFrameDictionary;