|
|
@@ -56,6 +56,8 @@ static bool CompareAnimationOrder(const SharedPtr<AnimationState>& lhs, const Sh
|
|
|
|
|
|
static const unsigned MAX_ANIMATION_STATES = 256;
|
|
|
|
|
|
+bool AnimatedModel::boneCreationEnabled_ = true;
|
|
|
+
|
|
|
AnimatedModel::AnimatedModel(Context* context) :
|
|
|
StaticModel(context),
|
|
|
animationLodFrameNumber_(0),
|
|
|
@@ -649,6 +651,9 @@ void AnimatedModel::SetSkeleton(const Skeleton& skeleton, bool createBones)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (createBones && !boneCreationEnabled_)
|
|
|
+ createBones = false;
|
|
|
+
|
|
|
if (isMaster_)
|
|
|
{
|
|
|
// Check if bone structure has stayed compatible (reloading the model.) In that case retain the old bones and animations
|
|
|
@@ -1320,4 +1325,9 @@ void AnimatedModel::HandleModelReloadFinished(StringHash eventType, VariantMap&
|
|
|
SetModel(currentModel);
|
|
|
}
|
|
|
|
|
|
+void AnimatedModel::SetBoneCreationEnabled(bool enabled)
|
|
|
+{
|
|
|
+ boneCreationEnabled_ = enabled;
|
|
|
+}
|
|
|
+
|
|
|
}
|