Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-10-19 21:09:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-10-19 21:09:33 +0400
commita9fdb70162865055a6febc517252bea41f3f3030 (patch)
tree917f9c5e1cca7c9c415be8ecb1ffa54dc4989505
parent0f1c959b05c8dd086d96da79771c7757570450ac (diff)
Revert "Cleanup: pep8"
This reverts commit 06cdc35a68d9a0bd2a84fd92bda2be11318d46ff.
-rw-r--r--release/scripts/freestyle/modules/export_svg.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/release/scripts/freestyle/modules/export_svg.py b/release/scripts/freestyle/modules/export_svg.py
index 18e650d6e72..824c7bad8c0 100644
--- a/release/scripts/freestyle/modules/export_svg.py
+++ b/release/scripts/freestyle/modules/export_svg.py
@@ -60,7 +60,6 @@ namespaces = {
"svg": "http://www.w3.org/2000/svg",
}
-
# - SVG export - #
class SVGPathShader(StrokeShader):
"""Stroke Shader for writing stroke data to a .svg file."""
@@ -104,7 +103,7 @@ class SVGPathShader(StrokeShader):
for v in it:
x, y = v.point
yield '{:.3f}, {:.3f} '.format(x, height - y)
- if split_at_invisible and v.attribute.visible is False:
+ if split_at_invisible and v.attribute.visible == False:
# end current and start new path;
yield '" />' + path
# fast-forward till the next visible vertex
@@ -152,7 +151,6 @@ class SVGPathShader(StrokeShader):
indent_xml(root)
tree.write(self.filepath, encoding='UTF-8', xml_declaration=True)
-
# - Fill export - #
class ShapeZ(BinaryPredicate1D):
"""Sort ViewShapes by their z-index"""
@@ -207,8 +205,7 @@ class SVGFillShader(StrokeShader):
for point in vertices:
x, y = point
yield '{:.3f}, {:.3f} '.format(x, height - y)
- # closes the path; connects the current to the first point
- yield 'z" />'
+ yield 'z" />' # closes the path; connects the current to the first point
def write(self):
"""Write SVG data tree to file """
@@ -264,14 +261,13 @@ def indent_xml(elem, level=0, indentsize=4):
elif level and (not elem.tail or not elem.tail.strip()):
elem.tail = i
-
# - callbacks - #
@persistent
def svg_export_header(scene):
render = scene.render
if not (render.use_freestyle and render.use_svg_export):
return
- # create new file (overwrite existing)
+ #create new file (overwrite existing)
width, height = render.resolution_x, render.resolution_y
scale = render.resolution_percentage / 100
@@ -282,7 +278,6 @@ def svg_export_header(scene):
# invalid path is properly handled in the parameter editor
print("SVG export: invalid path")
-
@persistent
def svg_export_animation(scene):
"""makes an animation of the exported SVG file """