diff options
author | Constantin Rahn <conz@vrchannel.de> | 2011-01-19 03:15:22 +0300 |
---|---|---|
committer | Constantin Rahn <conz@vrchannel.de> | 2011-01-19 03:15:22 +0300 |
commit | b33047a352e9108c17b42fd804420f08937ef10c (patch) | |
tree | c38093dc4a4789fd3ce802a9e91399b207b8558b /render_povray/render.py | |
parent | e8719da28357bee3e5f093b136292c1bc6b77ed6 (diff) |
Export only materials which have at least one or more users
Diffstat (limited to 'render_povray/render.py')
-rw-r--r-- | render_povray/render.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/render_povray/render.py b/render_povray/render.py index 0765910d..ddcb474a 100644 --- a/render_povray/render.py +++ b/render_povray/render.py @@ -1344,7 +1344,8 @@ def write_pov(filename, scene=None, info_callback=None): #exportMaterials() writeMaterial(None) # default material for material in bpy.data.materials: - writeMaterial(material) + if material.users > 0: + writeMaterial(material) if comments: file.write('\n') if comments: file.write('//--Meta objects--\n\n') # <- How can this be written only if the scene contains META? |