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>2013-04-15 20:50:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-15 20:50:06 +0400
commit81507f54080373b9f23f212e23e3ea6299490140 (patch)
tree33d84257e6a64a0c8054d845ca66675a94c263d7 /io_scene_obj
parent46c41ca8e9fdcac7d969c91f58ac60630419c8b4 (diff)
options to scale x3d and obj on export
Diffstat (limited to 'io_scene_obj')
-rw-r--r--io_scene_obj/__init__.py22
1 files changed, 6 insertions, 16 deletions
diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py
index eef29f97..60a43168 100644
--- a/io_scene_obj/__init__.py
+++ b/io_scene_obj/__init__.py
@@ -291,15 +291,6 @@ class ExportOBJ(bpy.types.Operator, ExportHelper):
default=False,
)
- global_scale = FloatProperty(
- name="Scale",
- description="Scale all data",
- min=0.01, max=1000.0,
- soft_min=0.01,
- soft_max=1000.0,
- default=1.0,
- )
-
axis_forward = EnumProperty(
name="Forward",
items=(('X', "X Forward", ""),
@@ -323,6 +314,11 @@ class ExportOBJ(bpy.types.Operator, ExportHelper):
),
default='Y',
)
+ global_scale = FloatProperty(
+ name="Scale",
+ min=0.01, max=1000.0,
+ default=1.0,
+ )
path_mode = path_reference_mode
@@ -339,13 +335,7 @@ class ExportOBJ(bpy.types.Operator, ExportHelper):
"filter_glob",
))
- global_matrix = Matrix()
-
- global_matrix[0][0] = \
- global_matrix[1][1] = \
- global_matrix[2][2] = self.global_scale
-
- global_matrix = (global_matrix *
+ global_matrix = (Matrix.Scale(self.global_scale, 4) *
axis_conversion(to_forward=self.axis_forward,
to_up=self.axis_up,
).to_4x4())