diff options
author | Campbell Barton <campbell@blender.org> | 2022-04-20 09:07:03 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-04-20 09:10:05 +0300 |
commit | 8898251584ba99881985933c13dfb5e529393641 (patch) | |
tree | 9619a89f7af5627002279fc7464b1cd4efbce23f /intern/cycles/app | |
parent | 11dd7941af819638d9b4dd2d46e562530656ec9d (diff) |
Cleanup: run autopep8 on intern/cycles/
Disable autopep8 for the block that yields passes in list_render_passes,
for better readability.
Diffstat (limited to 'intern/cycles/app')
-rw-r--r-- | intern/cycles/app/io_export_cycles_xml.py | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/intern/cycles/app/io_export_cycles_xml.py b/intern/cycles/app/io_export_cycles_xml.py index 0009995653e..ceb30f8fb56 100644 --- a/intern/cycles/app/io_export_cycles_xml.py +++ b/intern/cycles/app/io_export_cycles_xml.py @@ -10,6 +10,7 @@ import bpy from bpy_extras.io_utils import ExportHelper from bpy.props import PointerProperty, StringProperty + def strip(root): root.text = None root.tail = None @@ -17,6 +18,7 @@ def strip(root): for elem in root: strip(elem) + def write(node, fname): strip(node) @@ -26,25 +28,31 @@ def write(node, fname): f = open(fname, "w") f.write(s) + class CyclesXMLSettings(bpy.types.PropertyGroup): @classmethod def register(cls): bpy.types.Scene.cycles_xml = PointerProperty( - type=cls, - name="Cycles XML export Settings", - description="Cycles XML export settings") + type=cls, + name="Cycles XML export Settings", + description="Cycles XML export settings", + ) cls.filepath = StringProperty( - name='Filepath', - description='Filepath for the .xml file', - maxlen=256, - default='', - subtype='FILE_PATH') + name='Filepath', + description='Filepath for the .xml file', + maxlen=256, + default='', + subtype='FILE_PATH', + ) @classmethod def unregister(cls): del bpy.types.Scene.cycles_xml -# User Interface Drawing Code + +# User Interface Drawing Code. + + class RenderButtonsPanel(): bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' @@ -114,22 +122,31 @@ class ExportCyclesXML(bpy.types.Operator, ExportHelper): uvs += str(uvf.uv1[0]) + " " + str(uvf.uv1[1]) + " " uvs += str(uvf.uv2[0]) + " " + str(uvf.uv2[1]) + " " uvs += str(uvf.uv3[0]) + " " + str(uvf.uv3[1]) + " " - if vcount==4: + if vcount == 4: uvs += " " + str(uvf.uv4[0]) + " " + str(uvf.uv4[1]) + " " - - node = etree.Element('mesh', attrib={'nverts': nverts.strip(), 'verts': verts.strip(), 'P': P, 'UV' : uvs.strip()}) + node = etree.Element( + 'mesh', + attrib={ + 'nverts': nverts.strip(), + 'verts': verts.strip(), + 'P': P, + 'UV': uvs.strip(), + }) # write to file write(node, filepath) return {'FINISHED'} + def register(): bpy.utils.register_module(__name__) + def unregister(): bpy.utils.unregister_module(__name__) + if __name__ == "__main__": register() |