Skip to content
Snippets Groups Projects
Commit b33047a3 authored by Constantin Rahn's avatar Constantin Rahn
Browse files

Export only materials which have at least one or more users

parent e8719da2
No related branches found
No related tags found
No related merge requests found
...@@ -1344,7 +1344,8 @@ def write_pov(filename, scene=None, info_callback=None): ...@@ -1344,7 +1344,8 @@ def write_pov(filename, scene=None, info_callback=None):
#exportMaterials() #exportMaterials()
writeMaterial(None) # default material writeMaterial(None) # default material
for material in bpy.data.materials: for material in bpy.data.materials:
writeMaterial(material) if material.users > 0:
writeMaterial(material)
if comments: file.write('\n') if comments: file.write('\n')
if comments: file.write('//--Meta objects--\n\n') # <- How can this be written only if the scene contains META? if comments: file.write('//--Meta objects--\n\n') # <- How can this be written only if the scene contains META?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment