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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-07-27 06:41:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-27 06:41:30 +0400
commit12a695ae4769a13fd094fb0f5f4002a4334998f5 (patch)
tree070c389a8f322b40e66334217a3f745d7c6b919f /release
parent160b1d815d5ad21d5254ed3c3eaf495b2383afcc (diff)
bugfix [#21407] 3DS Import do not show import options (resizing\transform fix)
Diffstat (limited to 'release')
-rw-r--r--release/scripts/io/import_scene_3ds.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/release/scripts/io/import_scene_3ds.py b/release/scripts/io/import_scene_3ds.py
index 7b3004d4f52..435e08a209e 100644
--- a/release/scripts/io/import_scene_3ds.py
+++ b/release/scripts/io/import_scene_3ds.py
@@ -883,14 +883,12 @@ def load_3ds(filename, context, IMPORT_CONSTRAIN_BOUNDS=10.0, IMAGE_SEARCH=True,
# REMOVE DUMMYVERT, - remove this in the next release when blenders internal are fixed.
-
-# for ob in importedObjects:
-# if ob.type == 'MESH':
-# # if ob.type=='Mesh':
-# me = ob.getData(mesh=1)
-# me.verts.delete([me.verts[0],])
-# if not APPLY_MATRIX:
-# me.transform(ob.matrix_world.copy().invert())
+ for ob in importedObjects:
+ if ob.type == 'MESH':
+ me = ob.data
+# me.verts.delete([me.verts[0],]) # XXX, todo
+ if not APPLY_MATRIX:
+ me.transform(ob.matrix_world.copy().invert())
# Done DUMMYVERT
"""
@@ -1009,15 +1007,19 @@ class IMPORT_OT_autodesk_3ds(bpy.types.Operator):
# List of operator properties, the attributes will be assigned
# to the class instance from the operator settings before calling.
-
filepath = StringProperty(name="File Path", description="Filepath used for importing the 3DS file", maxlen= 1024, default= "")
-# size_constraint = FloatProperty(name="Size Constraint", description="Scale the model by 10 until it reacehs the size constraint. Zero Disables.", min=0.0, max=1000.0, soft_min=0.0, soft_max=1000.0, default=10.0),
-# search_images = BoolProperty(name="Image Search", description="Search subdirectories for any assosiated images (Warning, may be slow)", default=True),
-# apply_matrix = BoolProperty(name="Transform Fix", description="Workaround for object transformations importing incorrectly", default=False),
+ constrain_size = FloatProperty(name="Size Constraint", description="Scale the model by 10 until it reacehs the size constraint. Zero Disables.", min=0.0, max=1000.0, soft_min=0.0, soft_max=1000.0, default=10.0)
+ search_images = BoolProperty(name="Image Search", description="Search subdirectories for any assosiated images (Warning, may be slow)", default=True)
+ apply_transform = BoolProperty(name="Apply Transform", description="Workaround for object transformations importing incorrectly", default=False)
def execute(self, context):
- load_3ds(self.properties.filepath, context, 0.0, False, False)
+ load_3ds(self.properties.filepath,
+ context,
+ IMPORT_CONSTRAIN_BOUNDS=self.properties.constrain_size,
+ IMAGE_SEARCH=self.properties.search_images,
+ APPLY_MATRIX=self.properties.apply_transform)
+
return {'FINISHED'}
def invoke(self, context, event):