Skip to content

Commit

Permalink
Dupligroup fix for empty object type, see report: http://www.yafaray.…
Browse files Browse the repository at this point in the history
…org/node/461

Test File should work now: http://www.yafaray.org/sites/default/files/issues/dupli_group.blend

One issue remains though: external linking of dupli groups work, but not materials....
  • Loading branch information
OlafArnold committed May 14, 2011
1 parent 541fb16 commit 1c990fa
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions io/yaf_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,30 @@ def writeObjects(self):
if obj.data.name not in baseIds and obj.name not in dupBaseIds:
self.writeObject(obj)

# checking for empty objects with duplis on them also...
for empt in [e for e in self.scene.objects if not e.hide_render and e.is_visible(self.scene) and e.type == 'EMPTY']:

if empt.is_duplicator:
self.yi.printInfo("Processing duplis for: " + empt.name)

if hasattr(empt, "create_dupli_list"): # method name changed
empt.create_dupli_list(self.scene)
else:
empt.dupli_list_create(self.scene)

for empt_dupli in empt.dupli_list:

if empt_dupli.object.name not in dupBaseIds:
dupBaseIds[empt_dupli.object.name] = self.writeInstanceBase(empt_dupli.object)

self.writeInstance(dupBaseIds[empt_dupli.object.name], empt_dupli.matrix, empt_dupli.object.name)

if empt.dupli_list:
if hasattr(empt, "free_dupli_list"): # method name changed
empt.free_dupli_list()
else:
empt.dupli_list_clear()

def writeObject(self, obj, matrix = None):

if not matrix:
Expand Down

0 comments on commit 1c990fa

Please sign in to comment.