Remove default skeleton path in MeshInstance3D

This commit is contained in:
kobewi 2025-10-31 23:56:25 +01:00
parent 08705259f2
commit d27fb9b15a
6 changed files with 21 additions and 2 deletions

View file

@ -926,6 +926,11 @@ void MeshInstance3D::_bind_methods() {
MeshInstance3D::MeshInstance3D() {
_define_ancestry(AncestralClass::MESH_INSTANCE_3D);
#ifndef DISABLE_DEPRECATED
if (use_parent_skeleton_compat) {
skeleton_path = NodePath("..");
}
#endif
}
MeshInstance3D::~MeshInstance3D() {

View file

@ -49,7 +49,7 @@ protected:
Ref<Skin> skin;
Ref<Skin> skin_internal;
Ref<SkinReference> skin_ref;
NodePath skeleton_path = NodePath("..");
NodePath skeleton_path;
LocalVector<float> blend_shape_tracks;
HashMap<StringName, int> blend_shape_properties;
@ -73,6 +73,10 @@ protected:
public:
static constexpr AncestralClass static_ancestral_class = AncestralClass::MESH_INSTANCE_3D;
#ifndef DISABLE_DEPRECATED
static inline bool use_parent_skeleton_compat = false;
#endif
void set_mesh(const Ref<Mesh> &p_mesh);
Ref<Mesh> get_mesh() const;