[Bf-extensions-cvs] [94abe3b] master: Fix T45756: FBX Export: bad handling of duplis (let's check on Object.is_duplicator, much cleaner solution).
Bastien Montagne
noreply at git.blender.org
Wed Aug 12 12:57:04 CEST 2015
Commit: 94abe3b97f5c0b1afaa084dc8918464d27689b88
Author: Bastien Montagne
Date: Wed Aug 12 12:56:04 2015 +0200
Branches: master
https://developer.blender.org/rBA94abe3b97f5c0b1afaa084dc8918464d27689b88
Fix T45756: FBX Export: bad handling of duplis (let's check on Object.is_duplicator, much cleaner solution).
===================================================================
M io_scene_fbx/fbx_utils.py
===================================================================
diff --git a/io_scene_fbx/fbx_utils.py b/io_scene_fbx/fbx_utils.py
index 56442a3..e2b3655 100644
--- a/io_scene_fbx/fbx_utils.py
+++ b/io_scene_fbx/fbx_utils.py
@@ -1160,19 +1160,15 @@ class ObjectWrapper(metaclass=MetaObjectWrapper):
# #### Duplis...
def dupli_list_create(self, scene, settings='PREVIEW'):
- if self._tag == 'OB':
- # Sigh, why raise exception here? :/
- try:
- self.bdata.dupli_list_create(scene, settings)
- except:
- pass
+ if self._tag == 'OB' and self.bdata.is_duplicator:
+ self.bdata.dupli_list_create(scene, settings)
def dupli_list_clear(self):
- if self._tag == 'OB':
+ if self._tag == 'OB'and self.bdata.is_duplicator:
self.bdata.dupli_list_clear()
def get_dupli_list(self):
- if self._tag == 'OB':
+ if self._tag == 'OB'and self.bdata.is_duplicator:
return (ObjectWrapper(dup) for dup in self.bdata.dupli_list)
return ()
dupli_list = property(get_dupli_list)
More information about the Bf-extensions-cvs
mailing list