[Bf-extensions-cvs] [a4a3307] master: Fix T39877: Error exporting X3D with zero scale

Campbell Barton noreply at git.blender.org
Tue Apr 29 15:43:27 CEST 2014


Commit: a4a330738a9ccecf056e83a5cf66c301ac240194
Author: Campbell Barton
Date:   Tue Apr 29 23:20:05 2014 +1000
https://developer.blender.org/rBAa4a330738a9ccecf056e83a5cf66c301ac240194

Fix T39877: Error exporting X3D with zero scale

===================================================================

M	io_scene_x3d/export_x3d.py

===================================================================

diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py
index d044baa..34b819a 100644
--- a/io_scene_x3d/export_x3d.py
+++ b/io_scene_x3d/export_x3d.py
@@ -1389,16 +1389,17 @@ def export(file,
     # Export Object Hierarchy (recursively called)
     # -------------------------------------------------------------------------
     def export_object(ident, obj_main_parent, obj_main, obj_children):
+        matrix_fallback = mathutils.Matrix()
         world = scene.world
         free, derived = create_derived_objects(scene, obj_main)
 
         if use_hierarchy:
             obj_main_matrix_world = obj_main.matrix_world
             if obj_main_parent:
-                obj_main_matrix = obj_main_parent.matrix_world.inverted() * obj_main_matrix_world
+                obj_main_matrix = obj_main_parent.matrix_world.inverted(matrix_fallback) * obj_main_matrix_world
             else:
                 obj_main_matrix = obj_main_matrix_world
-            obj_main_matrix_world_invert = obj_main_matrix_world.inverted()
+            obj_main_matrix_world_invert = obj_main_matrix_world.inverted(matrix_fallback)
 
             obj_main_id = quoteattr(unique_name(obj_main, obj_main.name, uuid_cache_object, clean_func=clean_def, sep="_"))



More information about the Bf-extensions-cvs mailing list