Merge pull request #112607 from KoBeWi/what_could_have_gone_wrong🤷♂️
Add MeshInstance3D upgrade code
This commit is contained in:
@ -342,6 +342,13 @@ void MeshInstance3D::create_multiple_convex_collisions(const Ref<MeshConvexDecom
|
||||
void MeshInstance3D::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE: {
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
if (upgrading_skeleton_compat) {
|
||||
if (skeleton_path.is_empty() && Object::cast_to<Skeleton3D>(get_parent())) {
|
||||
skeleton_path = NodePath("..");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
_resolve_skeleton_path();
|
||||
} break;
|
||||
case NOTIFICATION_TRANSLATION_CHANGED: {
|
||||
|
||||
@ -75,6 +75,7 @@ public:
|
||||
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
static inline bool use_parent_skeleton_compat = false;
|
||||
static inline bool upgrading_skeleton_compat = false;
|
||||
#endif
|
||||
|
||||
void set_mesh(const Ref<Mesh> &p_mesh);
|
||||
|
||||
Reference in New Issue
Block a user