Merge pull request #112267 from KoBeWi/sk8leton
Remove default skeleton path in MeshInstance3D
This commit is contained in:
@ -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() {
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -607,6 +607,9 @@ void register_scene_types() {
|
||||
GDREGISTER_CLASS(Camera3D);
|
||||
GDREGISTER_CLASS(AudioListener3D);
|
||||
GDREGISTER_CLASS(MeshInstance3D);
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
MeshInstance3D::use_parent_skeleton_compat = GLOBAL_GET("animation/compatibility/default_parent_skeleton_in_mesh_instance_3d");
|
||||
#endif
|
||||
GDREGISTER_CLASS(OccluderInstance3D);
|
||||
GDREGISTER_ABSTRACT_CLASS(Occluder3D);
|
||||
GDREGISTER_CLASS(ArrayOccluder3D);
|
||||
|
||||
Reference in New Issue
Block a user