mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-06-26 01:15:28 -06:00
Merge pull request #12981 from digitalfrost/080822b
X3DReader.py: Iterate directly over list in readIndex()
This commit is contained in:
commit
26b9bcf4f5
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue