diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index fe2cc1f5ad5b..08b69648c15a 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -87,8 +87,11 @@ + + Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual "global" transform of the bone. + [b]Note:[/b] If [code]update_skins[/code] is [code]false[/code], the skin will be updated at the end of the thread. If you need only bone global pose, not updating skin will improve performance when calling [method get_bone_global_pose] multiple times in the same thread. @@ -110,6 +113,22 @@ [b]Note:[/b] The parent bone returned will always be less than [code]bone_idx[/code]. + + + + + + + Returns the array of bone indexes which is the children of the bone at [code]bone_idx[/code]. If array is empty, then bone has no children. + + + + + + + Returns the bone index which is the root of the all bones. + + diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp index 36f470baf631..6a53cb0593b6 100644 --- a/scene/3d/skeleton_3d.cpp +++ b/scene/3d/skeleton_3d.cpp @@ -240,10 +240,8 @@ void Skeleton3D::_notification(int p_what) { case NOTIFICATION_UPDATE_SKELETON_BONE_ONLY: { _update_process_order(); const int *order = process_order.ptr(); - - Bone *bonesptr = bones.ptrw(); int len = bones.size(); - + while (dirty_idxes.size() > 0) { for (int i = 0; i < len; i++) { int dirty_idx = dirty_idxes.find(order[i], 0);