diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-04 07:39:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-04 07:39:13 +0300 |
commit | 6e152ce9e0eef551d30bf77bcea2f16593148e18 (patch) | |
tree | fc003ea93b18c92f04e86cb9a35e7697974bd2ce /render_povray/render.py | |
parent | 2b6daa8b06b5bb49b9dab6963606f90867c1ad54 (diff) |
pep8 edits for povray, also dont use string addition for textblock contents, write newlines separate.
Diffstat (limited to 'render_povray/render.py')
-rw-r--r-- | render_povray/render.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/render_povray/render.py b/render_povray/render.py index f0eb3bf9..9e6176d7 100644 --- a/render_povray/render.py +++ b/render_povray/render.py @@ -198,6 +198,7 @@ def safety(name, Level): tabLevel = 0 + def write_pov(filename, scene=None, info_callback=None): import mathutils #file = filename @@ -957,7 +958,7 @@ def write_pov(filename, scene=None, info_callback=None): t_alpha = t ############################################################################################################## - + if material.pov_replacement_text != "": file.write("\n") file.write(" texture{%s}\n" % material.pov_replacement_text) @@ -1465,12 +1466,13 @@ def write_pov(filename, scene=None, info_callback=None): tabWrite("}\n") def exportCustomCode(): - - for Text in bpy.data.texts: - if Text.pov_custom_code: - file.write("\n" + Text.as_string()) - file.write("\n") + for txt in bpy.data.texts: + if txt.pov_custom_code: + # Why are the newlines needed? + file.write("\n") + file.write(txt.as_string()) + file.write("\n") sel = scene.objects comments = scene.pov_comments_enable @@ -1481,7 +1483,7 @@ def write_pov(filename, scene=None, info_callback=None): if not scene.pov_tempfiles_enable and comments: file.write("\n//--CUSTOM CODE--\n\n") exportCustomCode() - + if not scene.pov_tempfiles_enable and comments: file.write("\n//--Global settings and background--\n\n") |