From c8dae7e6602da884f319dd8ffc1499a34c9bd94e Mon Sep 17 00:00:00 2001 From: Campbell Barton <ideasman42@gmail.com> Date: Mon, 2 Jan 2012 10:53:05 +0000 Subject: [PATCH] update for matrix row/col switch --- io_scene_x3d/export_x3d.py | 2 +- io_scene_x3d/import_x3d.py | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py index a3964db60..88dd8ab83 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 c3ecbeecc..9c6986dea 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} -- GitLab