diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py index a3964db60b04f337821e7a20e508a9aba02ca563..88dd8ab838ae709007cbed3f251c2c5266238685 100644 --- a/io_scene_x3d/export_x3d.py +++ b/io_scene_x3d/export_x3d.py @@ -1164,7 +1164,7 @@ def export(file, elif uniform['type'] == gpu.GPU_DYNAMIC_OBJECT_IMAT: frag_uniform_var_map[uniform['varname']] = None if uniform['datatype'] == gpu.GPU_DATA_16F: - value = ' '.join(['%.6f' % f for v in (global_matrix * obj.matrix_world).inverted() for f in v]) + value = ' '.join(['%.6f' % f for v in (global_matrix * obj.matrix_world).inverted().transposed() for f in v]) field_descr = " <!--- Object Invertex Matrix '%s' -->" % obj.name fw('%s<field name="%s" type="SFMatrix4f" accessType="inputOutput" value="%s" />%s\n' % (ident, uniform['varname'], value, field_descr)) else: diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py index c3ecbeeccd91eb7db3952156711afcbaac0b2131..9c6986deaf8db22e15c2b622e956d320278e0aaf 100644 --- a/io_scene_x3d/import_x3d.py +++ b/io_scene_x3d/import_x3d.py @@ -1414,16 +1414,8 @@ for i, f in enumerate(files): # ----------------------------------------------------------------------------------- import bpy from bpy_extras import image_utils -# import BPyImage -# import BPySys -# reload(BPySys) -# reload(BPyImage) -# import Blender -# from Blender import Texture, Material, Mathutils, Mesh, Types, Window from mathutils import Vector, Matrix -RAD_TO_DEG = 57.29578 - GLOBALS = {'CIRCLE_DETAIL': 16}