You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Remove compatibility code for Mesh surfaces
This commit is contained in:
@@ -1120,17 +1120,6 @@ bool ArrayMesh::_set(const StringName &p_name, const Variant &p_value) {
|
|||||||
}
|
}
|
||||||
int idx = sname.substr(8, sl - 8).to_int();
|
int idx = sname.substr(8, sl - 8).to_int();
|
||||||
|
|
||||||
// This is a bit of a hack to ensure compatibility with older material
|
|
||||||
// overrides that start indexing at 1.
|
|
||||||
// We assume that idx 0 is always read first, if its not, this won't work.
|
|
||||||
if (idx == 0) {
|
|
||||||
surface_index_0 = true;
|
|
||||||
}
|
|
||||||
if (!surface_index_0) {
|
|
||||||
// This means the file was created when the indexing started at 1, so decrease by one.
|
|
||||||
idx--;
|
|
||||||
}
|
|
||||||
|
|
||||||
String what = sname.get_slicec('/', 1);
|
String what = sname.get_slicec('/', 1);
|
||||||
if (what == "material") {
|
if (what == "material") {
|
||||||
surface_set_material(idx, p_value);
|
surface_set_material(idx, p_value);
|
||||||
|
|||||||
Reference in New Issue
Block a user