From 5b70ad9d34d2777e3abd0a13118442eb132aff70 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 6 Aug 2018 22:35:09 -0300 Subject: Respect process order for out of order skeleton bones (fixes GLTF2 import issues). --- scene/3d/skeleton.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scene/3d/skeleton.h') 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 bones; + Vector 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 -- cgit v1.2.3