diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-15 20:50:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-15 20:50:06 +0400 |
commit | 81507f54080373b9f23f212e23e3ea6299490140 (patch) | |
tree | 33d84257e6a64a0c8054d845ca66675a94c263d7 /io_scene_x3d/__init__.py | |
parent | 46c41ca8e9fdcac7d969c91f58ac60630419c8b4 (diff) |
options to scale x3d and obj on export
Diffstat (limited to 'io_scene_x3d/__init__.py')
-rw-r--r-- | io_scene_x3d/__init__.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/io_scene_x3d/__init__.py b/io_scene_x3d/__init__.py index f87bd428..22f41dc9 100644 --- a/io_scene_x3d/__init__.py +++ b/io_scene_x3d/__init__.py @@ -39,7 +39,7 @@ if "bpy" in locals(): imp.reload(export_x3d) import bpy -from bpy.props import StringProperty, BoolProperty, EnumProperty +from bpy.props import StringProperty, BoolProperty, EnumProperty, FloatProperty from bpy_extras.io_utils import (ImportHelper, ExportHelper, axis_conversion, @@ -168,20 +168,28 @@ class ExportX3D(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 def execute(self, context): from . import export_x3d + from mathutils import Matrix + keywords = self.as_keywords(ignore=("axis_forward", "axis_up", + "global_scale", "check_existing", "filter_glob", )) global_matrix = axis_conversion(to_forward=self.axis_forward, to_up=self.axis_up, - ).to_4x4() + ).to_4x4() * Matrix.Scale(self.global_scale, 4) keywords["global_matrix"] = global_matrix return export_x3d.save(self, context, **keywords) |