Skip to content

Commit

Permalink
Merge pull request #47915 from BastiaanOlij/fix_surface_material_over…
Browse files Browse the repository at this point in the history
…ride

Fix forgotten rename on surface material override
  • Loading branch information
akien-mga committed Apr 15, 2021
2 parents c7a4e21 + eca20c2 commit f109376
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scene/3d/mesh_instance_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ bool MeshInstance3D::_set(const StringName &p_name, const Variant &p_value) {
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();
if (idx >= surface_override_materials.size() || idx < 0) {
return false;
Expand All @@ -75,7 +75,7 @@ bool MeshInstance3D::_get(const StringName &p_name, Variant &r_ret) const {
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();
if (idx >= surface_override_materials.size() || idx < 0) {
return false;
Expand Down

0 comments on commit f109376

Please sign in to comment.