Skip to content
Snippets Groups Projects
Commit 37db3924 authored by Campbell Barton's avatar Campbell Barton
Browse files

revert some changes from r2917.

- remove additional axis args.
- use of _TRANSFORM was incorrect.
parent c5ed8141
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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_ = ''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment