Blender  V3.3
Public Member Functions | Public Attributes | List of all members
Freestyle::StrokeShader Class Reference

#include <StrokeShader.h>

Inheritance diagram for Freestyle::StrokeShader:
Freestyle::CalligraphicShader Freestyle::OmissionShader Freestyle::SmoothingShader Freestyle::SpatialNoiseShader Freestyle::StrokeShaders::BackboneStretcherShader Freestyle::StrokeShaders::BezierCurveShader Freestyle::StrokeShaders::BlenderTextureShader Freestyle::StrokeShaders::ColorNoiseShader Freestyle::StrokeShaders::ConstantColorShader Freestyle::StrokeShaders::ConstantExternThicknessShader Freestyle::StrokeShaders::ConstantThicknessShader Freestyle::StrokeShaders::ConstrainedIncreasingThicknessShader Freestyle::StrokeShaders::ExternalContourStretcherShader Freestyle::StrokeShaders::GuidingLinesShader Freestyle::StrokeShaders::IncreasingColorShader Freestyle::StrokeShaders::IncreasingThicknessShader Freestyle::StrokeShaders::LengthDependingThicknessShader Freestyle::StrokeShaders::MaterialColorShader Freestyle::StrokeShaders::PolygonalizationShader Freestyle::StrokeShaders::SamplingShader Freestyle::StrokeShaders::StrokeTextureStepShader Freestyle::StrokeShaders::ThicknessNoiseShader Freestyle::StrokeShaders::TipRemoverShader

Public Member Functions

 StrokeShader ()
 
virtual ~StrokeShader ()
 
virtual string getName () const
 
virtual int shade (Stroke &ioStroke) const
 

Public Attributes

voidpy_ss
 

Detailed Description

Base class for Stroke Shaders. Any Stroke Shader must inherit from this class and overload the shade() method. A StrokeShader is designed to modify any Stroke's attribute such as Thickness, Color, Geometry, Texture, Blending mode... The basic way to achieve this operation consists in iterating over the StrokeVertices of the Stroke and to modify each one's StrokeAttribute. Here is a python code example of such an iteration:

it = ioStroke.strokeVerticesBegin() while not it.isEnd(): att =
it.getObject().attribute()
## perform here any attribute modification
it.increment()

Here is a C++ code example of such an iteration:

for (StrokeInternal::StrokeVertexIterator v = ioStroke.strokeVerticesBegin(), vend =
ioStroke.strokeVerticesEnd(); v != vend;
++v)
{
StrokeAttribute& att = v->attribute();
// perform any attribute modification here...
}
ATTR_WARN_UNUSED_RESULT const BMVert * v

Definition at line 50 of file StrokeShader.h.

Constructor & Destructor Documentation

◆ StrokeShader()

Freestyle::StrokeShader::StrokeShader ( )
inline

Default constructor.

Definition at line 55 of file StrokeShader.h.

◆ ~StrokeShader()

virtual Freestyle::StrokeShader::~StrokeShader ( )
inlinevirtual

Destructor.

Definition at line 61 of file StrokeShader.h.

Member Function Documentation

◆ getName()

virtual string Freestyle::StrokeShader::getName ( ) const
inlinevirtual

◆ shade()

int Freestyle::StrokeShader::shade ( Stroke ioStroke) const
virtual

Member Data Documentation

◆ py_ss

void* Freestyle::StrokeShader::py_ss

Definition at line 52 of file StrokeShader.h.

Referenced by Director_BPy_StrokeShader_shade().


The documentation for this class was generated from the following files: