Skip to content

Commit

Permalink
switched to Blender 2.72 api
Browse files Browse the repository at this point in the history
  • Loading branch information
hvfrancesco committed Dec 5, 2014
1 parent 883066d commit f4c02d9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 26 deletions.
13 changes: 6 additions & 7 deletions svg_invisible.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import os
import re
import bpy
from freestyle import *
from freestyle.functions import *
from freestyle.predicates import *
Expand Down Expand Up @@ -49,13 +50,11 @@
f.close()

# select
preds = [
pyNatureUP1D(Nature.SILHOUETTE),
pyNatureUP1D(Nature.CREASE),
ContourUP1D()
]
upred = join_unary_predicates(preds, OrUP1D)
upred = AndUP1D(NotUP1D(QuantitativeInvisibilityUP1D(0)), upred)
upred = AndUP1D(NotUP1D(QuantitativeInvisibilityUP1D(0)),
OrUP1D(pyNatureUP1D(Nature.SILHOUETTE),
pyNatureUP1D(Nature.CREASE),
ContourUP1D()))

Operators.select(upred)

# chain
Expand Down
7 changes: 2 additions & 5 deletions svg_object_fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,8 @@
f.close()

# select
preds = [
ContourUP1D(),
NotUP1D(pyIsOccludedByItselfUP1D())
]
upred = join_unary_predicates(preds, AndUP1D)
upred = AndUP1D(ContourUP1D(), NotUP1D(pyIsOccludedByItselfUP1D()))

Operators.select(upred)

# chain
Expand Down
14 changes: 7 additions & 7 deletions svg_visible.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import os
import re
import bpy
from freestyle import *
from freestyle.functions import *
from freestyle.predicates import *
Expand Down Expand Up @@ -50,13 +51,12 @@


# select
preds = [
pyNatureUP1D(Nature.SILHOUETTE),
pyNatureUP1D(Nature.CREASE),
ContourUP1D()
]
upred = join_unary_predicates(preds, OrUP1D)
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), upred)

upred = AndUP1D(QuantitativeInvisibilityUP1D(0),
OrUP1D(pyNatureUP1D(Nature.SILHOUETTE),
pyNatureUP1D(Nature.CREASE),
ContourUP1D()))

Operators.select(upred)

# chain
Expand Down
13 changes: 6 additions & 7 deletions svg_visible_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import os
import re
import bpy
from freestyle import *
from freestyle.functions import *
from freestyle.predicates import *
Expand Down Expand Up @@ -46,13 +47,11 @@


# select
preds = [
pyNatureUP1D(Nature.SILHOUETTE),
pyNatureUP1D(Nature.CREASE),
ContourUP1D()
]
upred = join_unary_predicates(preds, OrUP1D)
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), upred)
upred = AndUP1D(QuantitativeInvisibilityUP1D(0),
OrUP1D(pyNatureUP1D(Nature.SILHOUETTE),
pyNatureUP1D(Nature.CREASE),
ContourUP1D()))

Operators.select(upred)

# chain
Expand Down

0 comments on commit f4c02d9

Please sign in to comment.