|
@@ -355,9 +355,9 @@ void MeshInstance::_initialize_skinning(bool p_force_reset) {
|
|
}
|
|
}
|
|
|
|
|
|
RID render_mesh = software_skinning ? software_skinning->mesh_instance->get_rid() : mesh->get_rid();
|
|
RID render_mesh = software_skinning ? software_skinning->mesh_instance->get_rid() : mesh->get_rid();
|
|
- set_base(render_mesh);
|
|
|
|
|
|
+ if (update_mesh || (render_mesh != get_base())) {
|
|
|
|
+ set_base(render_mesh);
|
|
|
|
|
|
- if (update_mesh) {
|
|
|
|
// Update instance materials after switching mesh.
|
|
// Update instance materials after switching mesh.
|
|
int surface_count = mesh->get_surface_count();
|
|
int surface_count = mesh->get_surface_count();
|
|
for (int surface_index = 0; surface_index < surface_count; ++surface_index) {
|
|
for (int surface_index = 0; surface_index < surface_count; ++surface_index) {
|