mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 17:59:00 +08:00
Merge pull request #12981 from digitalfrost/080822b
X3DReader.py: Iterate directly over list in readIndex()
This commit is contained in:
commit
26b9bcf4f5
@ -866,13 +866,13 @@ def readIndex(node, attr):
|
||||
v = readIntArray(node, attr, [])
|
||||
chunks = []
|
||||
chunk = []
|
||||
for i in range(len(v)):
|
||||
if v[i] == -1:
|
||||
for i in v:
|
||||
if i == -1:
|
||||
if chunk:
|
||||
chunks.append(chunk)
|
||||
chunk = []
|
||||
else:
|
||||
chunk.append(v[i])
|
||||
chunk.append(i)
|
||||
if chunk:
|
||||
chunks.append(chunk)
|
||||
return chunks
|
||||
|
Loading…
x
Reference in New Issue
Block a user