diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-04-13 15:19:26 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2019-04-13 15:19:47 -0300 |
commit | ad1368a62521a31b574acd8c545795d1b64c447e (patch) | |
tree | e141f1435a451ef481f11a83262f6ff0fe08e2ed /scene/3d/skeleton.cpp | |
parent | 89efaf5e78ca3938f08263b012903a19ea57e988 (diff) |
Clean up ASSIMP import code.
Diffstat (limited to 'scene/3d/skeleton.cpp')
-rw-r--r-- | scene/3d/skeleton.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp index b7279e4d4f..dafcf95b1f 100644 --- a/scene/3d/skeleton.cpp +++ b/scene/3d/skeleton.cpp @@ -540,10 +540,11 @@ void Skeleton::clear_bones() { void Skeleton::set_bone_pose(int p_bone, const Transform &p_pose) { ERR_FAIL_INDEX(p_bone, bones.size()); - ERR_FAIL_COND(!is_inside_tree()); bones.write[p_bone].pose = p_pose; - _make_dirty(); + if (is_inside_tree()) { + _make_dirty(); + } } Transform Skeleton::get_bone_pose(int p_bone) const { |