Browse Source

If AnimatedModel is temporary, make the bone nodes it creates temporary too. Closes #1135.

Lasse Öörni 10 years ago
parent
commit
087772c539
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Source/Urho3D/Graphics/AnimatedModel.cpp

+ 2 - 0
Source/Urho3D/Graphics/AnimatedModel.cpp

@@ -738,6 +738,8 @@ void AnimatedModel::SetSkeleton(const Skeleton& skeleton, bool createBones)
                 Node* boneNode = node_->CreateChild(i->name_, LOCAL);
                 boneNode->AddListener(this);
                 boneNode->SetTransform(i->initialPosition_, i->initialRotation_, i->initialScale_);
+                // Copy the model component's temporary status
+                boneNode->SetTemporary(IsTemporary());
                 i->node_ = boneNode;
             }