Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-04-25 09:11:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-04-25 09:11:32 +0400
commit87e698f1f98c66d3d1a4f0d70a90780fe38a0bab (patch)
tree1b33fc448e466c2b47f530ee411a41d5899ad3a6 /io_scene_obj
parent48d34bac6b9543105f3fd3ff401fa8800447863a (diff)
fix [#27149] OBJ import does not import OBJ vertex/poly groups, produces error messages
disable polygroup by default too.
Diffstat (limited to 'io_scene_obj')
-rw-r--r--io_scene_obj/__init__.py2
-rw-r--r--io_scene_obj/import_obj.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py
index d374bd64..1a857e44 100644
--- a/io_scene_obj/__init__.py
+++ b/io_scene_obj/__init__.py
@@ -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):
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index ee77c35d..e30762e9 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -857,7 +857,7 @@ def create_mesh(new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_loc, v
# 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')
@@ -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 ?