summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-23 10:24:19 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-23 10:24:19 +0100
commit69a981fc62fe27a6c5fc3193acb4b1ad929cf397 (patch)
tree1d7057d14d095d9d3af140e54c505a92894d3821 /scene/resources
parentd40501faee48e819a4f2bb22c621f155493247e7 (diff)
parent05aaae747b6123eec7c74baf7c9ed0fa85800ff3 (diff)
Merge pull request #71214 from SekoiaTree/remove_mesh_surface_compat
Remove compatibility code for Mesh surfaces
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/mesh.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index c93b51552f..991e060e94 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -1122,17 +1122,6 @@ bool ArrayMesh::_set(const StringName &p_name, const Variant &p_value) {
}
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);
if (what == "material") {
surface_set_material(idx, p_value);