Do not clear materials when setting mesh

(cherry picked from commit 6e2a55c464)
This commit is contained in:
hoontee 2020-12-30 10:59:57 -06:00 committed by Rémi Verschelde
parent eb0ca31ac1
commit 32d1efdb21
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -115,7 +115,6 @@ void MeshInstance::set_mesh(const Ref<Mesh> &p_mesh) {
if (mesh.is_valid()) {
mesh->disconnect(CoreStringNames::get_singleton()->changed, this, SceneStringNames::get_singleton()->_mesh_changed);
materials.clear();
}
if (skin_ref.is_valid() && mesh.is_valid() && _is_software_skinning_enabled() && is_visible_in_tree()) {