summaryrefslogtreecommitdiff
path: root/scene/3d/skeleton.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-08-06 22:35:09 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-08-06 22:35:09 -0300
commit5b70ad9d34d2777e3abd0a13118442eb132aff70 (patch)
treea29b266c9ebca3e757b015da5d778eb7c3e2b0e4 /scene/3d/skeleton.h
parent00c573c255d0fcae926dd2fe2a10991c7ad76cd9 (diff)
Respect process order for out of order skeleton bones (fixes GLTF2 import issues).
Diffstat (limited to 'scene/3d/skeleton.h')
-rw-r--r--scene/3d/skeleton.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/3d/skeleton.h b/scene/3d/skeleton.h
index a8413ebaf2..e044e08437 100644
--- a/scene/3d/skeleton.h
+++ b/scene/3d/skeleton.h
@@ -54,6 +54,7 @@ class Skeleton : public Spatial {
bool enabled;
int parent;
+ int sort_index; //used for re-sorting process order
bool ignore_animation;
@@ -92,6 +93,8 @@ class Skeleton : public Spatial {
bool rest_global_inverse_dirty;
Vector<Bone> bones;
+ Vector<int> process_order;
+ bool process_order_dirty;
RID skeleton;
@@ -112,6 +115,8 @@ class Skeleton : public Spatial {
return bound;
}
+ void _update_process_order();
+
protected:
bool _get(const StringName &p_path, Variant &r_ret) const;
bool _set(const StringName &p_path, const Variant &p_value);
@@ -172,6 +177,7 @@ public:
Transform get_bone_custom_pose(int p_bone) const;
void localize_rests(); // used for loaders and tools
+ int get_process_order(int p_idx);
#ifndef _3D_DISABLED
// Physical bone API