1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-31 18:41:20 +00:00

Add MeshInstance3D upgrade code

This commit is contained in:
kobewi
2025-11-10 13:07:17 +01:00
parent e6aa06d3de
commit 251746a89c
5 changed files with 31 additions and 0 deletions

View File

@@ -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: {

View File

@@ -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);