diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-19 01:27:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-19 01:27:28 +0400 |
commit | 37db39243afb60a4e997475c9ea479e3d48d536f (patch) | |
tree | a4d105ef96cee7d087ab8ae5e99aae4144ba99ed /io_scene_x3d | |
parent | c5ed8141d012a6329c6bd1dce60dd25bf27a0d5e (diff) |
revert some changes from r2917.
- remove additional axis args.
- use of _TRANSFORM was incorrect.
Diffstat (limited to 'io_scene_x3d')
-rw-r--r-- | io_scene_x3d/__init__.py | 44 | ||||
-rw-r--r-- | io_scene_x3d/export_x3d.py | 18 |
2 files changed, 18 insertions, 44 deletions
diff --git a/io_scene_x3d/__init__.py b/io_scene_x3d/__init__.py index a98cb171..79f077e6 100644 --- a/io_scene_x3d/__init__.py +++ b/io_scene_x3d/__init__.py @@ -145,44 +145,20 @@ class ExportX3D(bpy.types.Operator, ExportHelper): default=False, ) - blender_axis_forward = EnumProperty( - name="Blender Forward", + axis_forward = EnumProperty( + name="Forward", items=(('X', "X Forward", ""), ('Y', "Y Forward", ""), ('Z', "Z Forward", ""), ('-X', "-X Forward", ""), ('-Y', "-Y Forward", ""), ('-Z', "-Z Forward", ""), - ), - default='-Y', - ) - - blender_axis_up = EnumProperty( - name="Blender Up", - items=(('X', "X Up", ""), - ('Y', "Y Up", ""), - ('Z', "Z Up", ""), - ('-X', "-X Up", ""), - ('-Y', "-Y Up", ""), - ('-Z', "-Z Up", ""), ), default='Z', ) - x3d_axis_forward = EnumProperty( - name="X3D Forward", - items=(('X', "X Forward", ""), - ('Y', "Y Forward", ""), - ('Z', "Z Forward", ""), - ('-X', "-X Forward", ""), - ('-Y', "-Y Forward", ""), - ('-Z', "-Z Forward", ""), - ), - default='Z', - ) - - x3d_axis_up = EnumProperty( - name="X3D Up", + axis_up = EnumProperty( + name="Up", items=(('X', "X Up", ""), ('Y', "Y Up", ""), ('Z', "Z Up", ""), @@ -198,17 +174,13 @@ class ExportX3D(bpy.types.Operator, ExportHelper): def execute(self, context): from . import export_x3d - keywords = self.as_keywords(ignore=("blender_axis_forward", - "blender_axis_up", - "x3d_axis_forward", - "x3d_axis_up", + keywords = self.as_keywords(ignore=("axis_forward", + "axis_up", "check_existing", "filter_glob", )) - global_matrix = axis_conversion(from_forward=self.blender_axis_forward, - from_up=self.blender_axis_up, - to_forward=self.x3d_axis_forward, - to_up=self.x3d_axis_up, + global_matrix = axis_conversion(to_forward=self.axis_forward, + to_up=self.axis_up, ).to_4x4() keywords["global_matrix"] = global_matrix diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py index 55b7a52d..aafe300b 100644 --- a/io_scene_x3d/export_x3d.py +++ b/io_scene_x3d/export_x3d.py @@ -187,7 +187,7 @@ def h3d_shader_glsl_frag_patch(filepath, scene, global_vars, frag_uniform_var_ma lines.append("\n") elif l.lstrip().startswith("lamp_visibility_other("): w = l.split(', ') - last_transform = w[1] + _TRANSFORM # XXX - HACK!!! + last_transform = w[1] + "_transform" # XXX - HACK!!! w[1] = '(view_matrix * %s_transform * vec4(%s.x, %s.y, %s.z, 1.0)).xyz' % (w[1], w[1], w[1], w[1]) l = ", ".join(w) elif l.lstrip().startswith("lamp_visibility_sun_hemi("): @@ -282,13 +282,15 @@ def export(file, # If names are not decorated, it may be possible for two objects to # have the same name, so there has to be a unified dictionary to # prevent uuid collisions. - uuid_cache_object = {} # object - uuid_cache_lamp = uuid_cache_object # 'LA_' + object.name - uuid_cache_view = uuid_cache_object # object, different namespace - uuid_cache_mesh = uuid_cache_object # mesh - uuid_cache_material = uuid_cache_object # material - uuid_cache_image = uuid_cache_object # image - uuid_cache_world = uuid_cache_object # world + uuid_cache = {} + uuid_cache_object = uuid_cache # object + uuid_cache_lamp = uuid_cache # 'LA_' + object.name + uuid_cache_view = uuid_cache # object, different namespace + uuid_cache_mesh = uuid_cache # mesh + uuid_cache_material = uuid_cache # material + uuid_cache_image = uuid_cache # image + uuid_cache_world = uuid_cache # world + del uuid_cache CA_ = '' OB_ = '' ME_ = '' |