Skip to content

Commit

Permalink
fix [#27149] OBJ import does not import OBJ vertex/poly groups, produ…
Browse files Browse the repository at this point in the history
…ces error messages

disable polygroup by default too.
  • Loading branch information
ideasman42 committed Apr 25, 2011
1 parent 48d34ba commit 87e698f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion io_scene_obj/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class ImportOBJ(bpy.types.Operator, ImportHelper):
# KEEP_VERT_ORDER = BoolProperty(name="Keep Vert Order", description="Keep vert and face order, disables split options, enable for morph targets", default= True)
ROTATE_X90 = BoolProperty(name="-X90", description="Rotate X 90.", default=True)
CLAMP_SIZE = FloatProperty(name="Clamp Scale", description="Clamp the size to this maximum (Zero to Disable)", min=0.0, max=1000.0, soft_min=0.0, soft_max=1000.0, default=0.0)
POLYGROUPS = BoolProperty(name="Poly Groups", description="Import OBJ groups as vertex groups.", default=True)
POLYGROUPS = BoolProperty(name="Poly Groups", description="Import OBJ groups as vertex groups.", default=False)
IMAGE_SEARCH = BoolProperty(name="Image Search", description="Search subdirs for any assosiated images (Warning, may be slow)", default=True)

def execute(self, context):
Expand Down
4 changes: 2 additions & 2 deletions io_scene_obj/import_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ def edges_match(e1, e2):
# content of the vertex_groups. If the user selects to NOT have vertex groups saved then
# the following test will never run
for group_name, group_indices in vertex_groups.items():
group = ob.vertex_groups.new(group_name)
group = ob.vertex_groups.new(group_name.decode('utf-8', "replace"))
group.add(group_indices, 1.0, 'REPLACE')


Expand Down Expand Up @@ -1209,7 +1209,7 @@ def load(operator, context, filepath,

if context_parm.lower() == b'u':
context_nurbs.setdefault(b'parm_u', []).extend([float_func(f) for f in line_split])
elif context_parm.lower() == b'v': # surfaces not suported yet
elif context_parm.lower() == b'v': # surfaces not supported yet
context_nurbs.setdefault(b'parm_v', []).extend([float_func(f) for f in line_split])
# else: # may want to support other parm's ?

Expand Down

0 comments on commit 87e698f

Please sign in to comment.