[Bf-extensions-cvs] [0015dd2] master: Fix T45677: Explicitely ignore dupli instances of armatures, this is not supported currently.

Bastien Montagne noreply at git.blender.org
Wed Aug 5 21:25:04 CEST 2015


Commit: 0015dd2308be82151efc354e78d608f4108aeb14
Author: Bastien Montagne
Date:   Wed Aug 5 21:19:21 2015 +0200
Branches: master
https://developer.blender.org/rBA0015dd2308be82151efc354e78d608f4108aeb14

Fix T45677: Explicitely ignore dupli instances of armatures, this is not supported currently.

Doubt to implement this any time soon, armatures and duplis are both complex area,
if you combine them together you get a Gordian knot (and have no right to cut it!).

Also, this commit fixes a stupid mistake - dupli objects types were not checked at all before...

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

M	io_scene_fbx/__init__.py
M	io_scene_fbx/export_fbx_bin.py

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

diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 243c9a2..5e3f93a 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -21,7 +21,7 @@
 bl_info = {
     "name": "FBX format",
     "author": "Campbell Barton, Bastien Montagne, Jens Restemeier",
-    "version": (3, 5, 2),
+    "version": (3, 5, 3),
     "blender": (2, 74, 0),
     "location": "File > Import-Export",
     "description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions",
@@ -294,7 +294,7 @@ class ExportFBX(bpy.types.Operator, ExportHelper, IOFBXOrientationHelper):
             items=(('EMPTY', "Empty", ""),
                    ('CAMERA', "Camera", ""),
                    ('LAMP', "Lamp", ""),
-                   ('ARMATURE', "Armature", ""),
+                   ('ARMATURE', "Armature", "WARNING: not supported in dupli/group instances"),
                    ('MESH', "Mesh", ""),
                    ('OTHER', "Other", "Other geometry types, like curve, metaball, etc. (converted to meshes)"),
                    ),
diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py
index 46415b2..58cfea1 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -2097,6 +2097,7 @@ def fbx_data_from_scene(scene, settings):
     Do some pre-processing over scene's data...
     """
     objtypes = settings.object_types
+    dp_objtypes = objtypes - {'ARMATURE'}  # Armatures are not supported as dupli instances currently...
     perfmon = PerfMon()
     perfmon.level_up()
 
@@ -2115,6 +2116,8 @@ def fbx_data_from_scene(scene, settings):
         # Duplis...
         ob_obj.dupli_list_create(scene, 'RENDER')
         for dp_obj in ob_obj.dupli_list:
+            if dp_obj.type not in dp_objtypes:
+                continue
             objects[dp_obj] = None
         ob_obj.dupli_list_clear()



More information about the Bf-extensions-cvs mailing list