[Bf-extensions-cvs] [626d6e8] master: Fix T46437: Dupli objects should also export themselves, not only their duplis...
Bastien Montagne
noreply at git.blender.org
Sat Oct 10 17:20:55 CEST 2015
Commit: 626d6e88070bd8be101cf1849af48fd675962339
Author: Bastien Montagne
Date: Sat Oct 10 17:19:37 2015 +0200
Branches: master
https://developer.blender.org/rBA626d6e88070bd8be101cf1849af48fd675962339
Fix T46437: Dupli objects should also export themselves, not only their duplis...
To be backported, should we need an 'a' release.
===================================================================
M io_scene_obj/export_obj.py
===================================================================
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py
index e458f2d..f0418a5 100644
--- a/io_scene_obj/export_obj.py
+++ b/io_scene_obj/export_obj.py
@@ -352,18 +352,16 @@ def write_file(filepath, objects, scene,
subprogress1.step("Ignoring %s, dupli child..." % ob_main.name)
continue
- obs = []
+ obs = [(ob_main, ob_main.matrix_world)]
if ob_main.dupli_type != 'NONE':
# XXX
print('creating dupli_list on', ob_main.name)
ob_main.dupli_list_create(scene)
- obs = [(dob.object, dob.matrix) for dob in ob_main.dupli_list]
+ obs += [(dob.object, dob.matrix) for dob in ob_main.dupli_list]
# XXX debug print
- print(ob_main.name, 'has', len(obs), 'dupli children')
- else:
- obs = [(ob_main, ob_main.matrix_world)]
+ print(ob_main.name, 'has', len(obs) - 1, 'dupli children')
subprogress1.enter_substeps(len(obs))
for ob, ob_mat in obs:
More information about the Bf-extensions-cvs
mailing list