
There's a problem at layer section:
the export script compares if the object layer is among the visible ones; it's not correct, from an object may be in several layers, then the resulting number is the sum. If this is the case, the object isn't exported as visible.
I've modified the code, it looks work now (comment lines are original). Please, verify it. Look for this section:
Code: Select all
#get all the objects in this scene
# activelayers = Window.ViewLayer()
# for i in range(len(activelayers)):
# activelayers[i] = 2**(activelayers[i]-1)
object_list1 = Blender.Scene.GetCurrent().getChildren()
object_list = []
matnames= []
activelayers = sum(map(lambda x:2**(x-1), Window.ViewLayer()))
for obj in object_list1:
if obj.Layer & activelayers:
# if obj.Layer in activelayers:
object_list.append(obj)
collectObjectMaterials(obj)