summaryrefslogtreecommitdiff
path: root/editor/import/collada.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-08-19 09:02:16 +0200
committerGitHub <noreply@github.com>2021-08-19 09:02:16 +0200
commit8b6c168b3ac14d9ac6350d03e7be4d196311e0fe (patch)
treef4d950f3627b0f0b21f348a10cfc048d999b723e /editor/import/collada.cpp
parent5ccf797c9c34c8cabdda3369eaf7a98d276a6094 (diff)
parent5267a6496f70574eba9325add5480a8c8b60a65d (diff)
Merge pull request #48560 from SaracenOne/collada_semantic_fix_4_0
Diffstat (limited to 'editor/import/collada.cpp')
-rw-r--r--editor/import/collada.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp
index aa9700716d..71930e1e59 100644
--- a/editor/import/collada.cpp
+++ b/editor/import/collada.cpp
@@ -960,6 +960,7 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name
} else if (section == "vertices") {
MeshData::Vertices vert;
String id = parser.get_attribute_value("id");
+ int last_ref = 0;
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
@@ -967,6 +968,10 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name
String semantic = parser.get_attribute_value("semantic");
String source = _uri_to_id(parser.get_attribute_value("source"));
+ if (semantic == "TEXCOORD") {
+ semantic = "TEXCOORD" + itos(last_ref++);
+ }
+
vert.sources[semantic] = source;
COLLADA_PRINT(section + " input semantic: " + semantic + " source: " + source);