Josh Engebretson 9 years ago
parent
commit
0b66d811e9
2 changed files with 12 additions and 5 deletions
  1. 5 4
      Source/Atomic/Graphics/AnimatedModel.cpp
  2. 7 1
      Source/Atomic/Scene/Node.cpp

+ 5 - 4
Source/Atomic/Graphics/AnimatedModel.cpp

@@ -822,9 +822,9 @@ void AnimatedModel::SetSkeleton(const Skeleton& skeleton, bool createBones)
         // Create scene nodes for the bones
         if ((createBones && !dontCreateBonesHack)|| boneCreationOverride_)
         {
-// ATOMIC END
-            //Remove this tag once new prefabs no longer depend on the temporary flag
-            String tempTag = "Atomic_Temporary";
+            // Remove "atomic_temporary" once prefabs no longer depend on the temporary flag (prefabs 2.0)
+            // https://github.com/AtomicGameEngine/AtomicGameEngine/issues/780
+            const String tempTag = "atomic_temporary";
 
             for (Vector<Bone>::Iterator i = bones.Begin(); i != bones.End(); ++i)
             {
@@ -835,12 +835,13 @@ void AnimatedModel::SetSkeleton(const Skeleton& skeleton, bool createBones)
                 // Copy the model component's temporary status
                 boneNode->SetTemporary(IsTemporary());
 
-                //Rather mark the nodes as temporary once new prefabs no longer depend on the temporary flag
+                // Rather mark the nodes as temporary, remove for prefabs 2.0
                 if (boneCreationOverride_)
                 {
                     if(boneNode->GetScene() != NULL)
                         boneNode->AddTag(tempTag);
                 }
+// ATOMIC END
 
                 i->node_ = boneNode;
             }

+ 7 - 1
Source/Atomic/Scene/Node.cpp

@@ -218,10 +218,16 @@ bool Node::SaveXML(XMLElement& dest) const
         Node* node = children_[i];
         if (node->IsTemporary())
             continue;
+
+// ATOMIC BEGIN
+
         // Can remove this check once bone nodes use temporary flag instead and new prefabs no longer use temporary flag.
-        if (node->HasTag("Atomic_Temporary"))
+        // https://github.com/AtomicGameEngine/AtomicGameEngine/issues/780
+        if (node->HasTag("atomic_temporary"))
             continue;
 
+// ATOMIC END
+
         XMLElement childElem = dest.CreateChild("node");
         if (!node->SaveXML(childElem))
             return false;