Fix forgotten rename on surface material override

This commit is contained in:
Bastiaan Olij 2021-04-15 20:47:38 +10:00
parent c7a4e2196e
commit eca20c2038
1 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ bool MeshInstance3D::_set(const StringName &p_name, const Variant &p_value) {
return true; return true;
} }
if (p_name.operator String().begins_with("material/")) { if (p_name.operator String().begins_with("surface_material_override/")) {
int idx = p_name.operator String().get_slicec('/', 1).to_int(); int idx = p_name.operator String().get_slicec('/', 1).to_int();
if (idx >= surface_override_materials.size() || idx < 0) { if (idx >= surface_override_materials.size() || idx < 0) {
return false; return false;
@ -75,7 +75,7 @@ bool MeshInstance3D::_get(const StringName &p_name, Variant &r_ret) const {
return true; return true;
} }
if (p_name.operator String().begins_with("material/")) { if (p_name.operator String().begins_with("surface_material_override/")) {
int idx = p_name.operator String().get_slicec('/', 1).to_int(); int idx = p_name.operator String().get_slicec('/', 1).to_int();
if (idx >= surface_override_materials.size() || idx < 0) { if (idx >= surface_override_materials.size() || idx < 0) {
return false; return false;