Page Menu
Home
Search
Configure Global Search
Log In
Files
F19580
patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Martijn Berger (juicyfruit)
Nov 13 2013, 4:18 PM
Size
937 B
Subscribers
None
patch
View Options
--- import_obj.py 2012-03-10 08:40:34.001003140 +0100
+++ /home/mberger/Dropbox/import_obj.py 2012-03-11 11:28:24.541942987 +0100
@@ -383,7 +383,7 @@
faces_split = []
verts_split = []
unique_materials_split = {}
- vert_remap = [-1] * len(verts_loc)
+ vert_remap = {}
face_split_dict[key] = (verts_split, faces_split, unique_materials_split, vert_remap)
@@ -393,7 +393,7 @@
# Remap verts to new vert list and add where needed
for enum, i in enumerate(face_vert_loc_indices):
- if vert_remap[i] == -1:
+ if vert_remap.setdefault(i,-1) == -1:
new_index = len(verts_split)
vert_remap[i] = new_index # set the new remapped index so we only add once and can reference next time.
face_vert_loc_indices[enum] = new_index # remap to the local index
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
39/6d/910e29a827ca87251b90733d96eb
Event Timeline
Log In to Comment