godot icon indicating copy to clipboard operation
godot copied to clipboard

Add BoneAttachment3D::get_skeleton() method

Open Flynsarmy opened this issue 1 year ago • 2 comments
trafficstars

This adds a get_skeleton() method to BoneAttachment3D to make the node consistent with SkeletonModifier3D.

Not sure what we want to do with get_external_skeleton() - it really should be get_external_skeleton_path() but at this point I guess we just leave it to avoid breaking changes.

I don't know C++ so hopefully this is all correct.

Closes https://github.com/godotengine/godot-proposals/issues/10454

Sample project with attached, external attached and unattached BoneAttachment3Ds. Hit play and the new get_skeleton() method will be called on all 3. boneattachment.zip

Flynsarmy avatar Aug 16 '24 15:08 Flynsarmy

We tend not to expose both the get node pointer and the get path. What does @lyuma @TokageItLab think?

fire avatar Aug 17 '24 18:08 fire

If the ExternalSkeleton is not set, BoneAttachment cannot easily determine if it is under a parent skeleton. It is also difficult to determine if the ExternalSkeleton is getting it right. So I think adding this API makes sense.

TokageItLab avatar Aug 17 '24 19:08 TokageItLab

Thanks!

akien-mga avatar Aug 20 '24 09:08 akien-mga