folkertdev / freestyle-svg-exporter

a Blender addon for exporting stylized lines created by the Freestyle render engine to an SVG format.
54 stars 18 forks source link

fill contour doesn't work and throws errors #3

Closed xuv closed 9 years ago

xuv commented 9 years ago

Hello @folkertdev

Just tried the latest version and it doesn't work with "contour fill" option enabled. Throws errors:

found bundled python: ~/blender-2.74-linux-glibc211-i686/2.74/python
SVG Export: writing to /tmp/0001.svg
Traceback (most recent call last):
  File "/LineSet", line 1, in <module>
  File "~/blender-2.74-linux-glibc211-i686/2.74/scripts/freestyle/modules/parameter_editor.py", line 1221, in process
    fn(scene, layer, lineset)
  File "~/blender-2.74-linux-glibc211-i686/2.74/scripts/addons/render_freestyle_svg.py", line 591, in lineset_post
    NotBP1D(pyZDiscontinuityBP1D())
  File "~/blender-2.74-linux-glibc211-i686/2.74/scripts/freestyle/modules/freestyle/predicates.py", line 567, in __init__
    if len(self.predicates) < 2:
AttributeError: 'AndBP1D' object has no attribute 'predicates'

location: <unknown location>:-1

location: <unknown location>:-1

Error executing Python script from PythonInterpreter::interpretText
Name: LineSet
Errors: 
Error: Traceback (most recent call last):
  File "/LineSet", line 1, in <module>
  File "~/blender-2.74-linux-glibc211-i686/2.74/scripts/freestyle/modules/parameter_editor.py", line 1221, in process
    fn(scene, layer, lineset)
  File "~/blender-2.74-linux-glibc211-i686/2.74/scripts/addons/render_freestyle_svg.py", line 591, in lineset_post
    NotBP1D(pyZDiscontinuityBP1D())
  File "~/blender-2.74-linux-glibc211-i686/2.74/scripts/freestyle/modules/freestyle/predicates.py", line 567, in __init__
    if len(self.predicates) < 2:
AttributeError: 'AndBP1D' object has no attribute 'predicates'

location: <unknown location>:-1

Error: interpretation failed
folkertdev commented 9 years ago

Fixed with the latest commit. As said, this commit touches a lot of code. This is an issue in the actual freestyle code (so not the addon). I've overwritten the object that gives the error with a correct version in the addon file.

I can't quite judge from this error message, but it may also be that your blender version isn't quite up to date. Tamito made a small fix to the predicates.py a few days ago, which may fix this error (the right way)

xuv commented 9 years ago

Thx for this. It works as expected now. This will be putted to good use. Btw, I'm running the latest Blender 2.74 (32bit) for Linux. So you know.