This module contains helper functions used for Freestyle style module writing.
Returns the current scene.
Returns: | The current scene. |
---|---|
Return type: | bpy.types.Scene |
Returns a single value from a set of values evaluated at each 0D element of this 1D element.
Parameters: |
|
---|---|
Returns: | The single value obtained for the 1D element. The return value type is float if func is of the UnaryFunction0DDouble or UnaryFunction0DFloat type, and int if func is of the UnaryFunction0DUnsigned type. |
Return type: | int or float |
Returns the maximum and minimum coordinates (the bounding box) of the stroke’s vertices
Finds the matching vertex, or returns None.
Returns the 2d length of a given ViewEdge.
Returns a static stroke object for testing
Yields the absolute distance along the stroke up to the current vertex.
Yields the distance to the camera relative to the maximum possible distance for every stroke vertex, constrained by given minimum and maximum values.
yields the distance to the given object relative to the maximum possible distance for every stroke vertex, constrained by given minimum and maximum values.
Yields a specific material attribute from the vertex’ underlying material.
Yields the progress along the stroke.
Yields a tuple containing the previous and current object
Returns a list of tuples each containing: - the phase - a Vector with the values of the cosine and sine of 2pi * phase (the direction)
Method to convert rgb to a bw intensity value.
Compute the 2D curvature at the stroke vertex pointed by the iterator ‘it’. K = 1 / R where R is the radius of the circle going through the current vertex and its neighbors
Compute the 2D normal at the stroke vertex pointed by the iterator ‘it’. It is noted that Normal2DF0D computes normals based on underlying FEdges instead, which is inappropriate for strokes when they have already been modified by stroke geometry modifiers.
The returned normals are dynamic: they update when the vertex position (and therefore the vertex normal) changes. for use in geometry modifiers it is advised to cast this generator function to a tuple or list
Yields a tuple containing the current object and its immediate neighbors