Line styles now have a set of new options for rearranging the stacking order of lines.
This gives artists more control to determine which lines should be drawn on top of others.
Two available sort keys are the distance from camera and curvilinear 2D length.
Since the distance of a line from camera may vary over vertices, another option called
integration type is used to compute the sort key for a line from the values computed at
individual vertices. Available integration types are MEAN, MIN, MAX, FIRST and LAST
(see the tool tips for more detail).
These modifiers were not working properly when they were applied to strokes
whose backbone was already modified by other geometry shaders. This problem
was due to the use of Normal2DF0D that compute 2D vertex normals based on
the underlying FEdges up on which initial stroke geometry is defined. Now vertex
normals are computed on the basis of modified stroke vertices.
A helper function 'stroke_normal' for computing normals of stroke vertices was
added to the 'freestyle.utils' API module.
Additional bug fixes were also done along with the code updates:
* Fix for the use of old Interface1D.pointsBegin() and .pointsEnd() method names
in the definition of pyDensityAnisotropyF1D and pyViewMapGradientNormF1D.
* Fix for wrong data types (int instead of bool) for:
- pyChainSilhouetteGenericIterator constructor and its .orientation property in
modules/freestyle/chainingiterators.py.
- SpatialNoiseShader constructor in styles/external_contour_sketchy.py.
- ChainSilhouetteIterator constructor in styles/multiple_parameterization.py.
Both C- and Python-coded API components were rearranged into logical groups.
New Python modules are packaged as follows:
freestyle - Top-level package
freestyle.types - Classes for core data structues (e.g., view map)
freestyle.chainingiterators - Pre-defined chaining iterators
freestyle.functions - Pre-defined 0D and 1D functions
freestyle.predicates - Pre-defined 0D and 1D predicates
freestyle.shaders - Pre-defined stroke shaders
freestyle.utils - Utility functions
The Python modules are installed in scripts/freestyle/modules. Pre-defined
styles are installed in scripts/freestyle/styles.
To-do: update styles according to the new Freestyle API package structure.