Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-04-29 17:20:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-29 17:20:05 +0400
commita4a330738a9ccecf056e83a5cf66c301ac240194 (patch)
tree777d7cd266dc655525d7b86760c81189dfeb1d42 /io_scene_x3d
parent8db299ec050f874a8872b19120fb28a8866983df (diff)
Fix T39877: Error exporting X3D with zero scale
Diffstat (limited to 'io_scene_x3d')
-rw-r--r--io_scene_x3d/export_x3d.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py
index d044baa9..34b819a6 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="_"))