Sculpt Brush

Detailed Description

Groups

 FIRSTHITPPOINTTYPE
 
 OVERRIDE
 
 SAMPLEMODE
 
 SCULPTBRUSHDATATYPE
 
 SCULPTBRUSHID
 
 SCULPTBRUSHMODE
 
 SCULPTOFFSETFLAGS
 

Classes

class  SculptFlagChecker
 
class  SculptPointPolysIterator
 
struct  SculptMouseData
 
struct  SculptCustomData
 
struct  BrushPointData
 
struct  BrushPolyData
 
class  BrushDabData
 
class  CustomSculptBrushBase
 
class  SculptBrushParams
 
class  SculptBrushToolData
 
class  SculptBrushModifierData
 
class  SculptModifierInterface
 

Macros

#define LIBRARY_SCULPTBRUSH
 

Functions

Bool RegisterBrushModifier (Int32 id, const String &name, DataAllocator *g, SCULPTBRUSHMODE mode, SCULPTBRUSHDATATYPE type, const String &resource, Bool hide=false, maxon::BaseArray< Int32 > *brushFilters=nullptr, maxon::BaseArray< Int32 > *brushRestrictions=nullptr, Int32 diskLevel=0)
 
Bool AddSculptBrushModifierFunction (Int32 id, String name, SCULPTBRUSHMODE mode, SCULPTBRUSHDATATYPE type, maxon::BaseArray< Int32 > *brushFilters=nullptr, maxon::BaseArray< Int32 > *brushRestrictions=nullptr, Bool hide=false)
 
Bool IsSculptBrush (Int32 toolID)
 
SculptBrushToolDataGetSelectedSculptBrush (BaseDocument *doc)
 

Variables

class SculptFlagChecker MAXON_ENUM_FLAGS
 

Macro Definition Documentation

◆ LIBRARY_SCULPTBRUSH

#define LIBRARY_SCULPTBRUSH

Sculpt brush library ID.

Function Documentation

◆ RegisterBrushModifier()

Bool RegisterBrushModifier ( Int32  id,
const String name,
DataAllocator g,
SCULPTBRUSHMODE  mode,
SCULPTBRUSHDATATYPE  type,
const String resource,
Bool  hide = false,
maxon::BaseArray< Int32 > *  brushFilters = nullptr,
maxon::BaseArray< Int32 > *  brushRestrictions = nullptr,
Int32  diskLevel = 0 
)

Adds a modifier function. Modifiers can be used with any other sculpting brush.
It is possible to add as many of these modifiers as needed.

Note
A brush Modifier can not access the brush data. So calling GetBrush() will return nullptr.
Parameters
[in]idA unique plugin ID. Must be obtained from http://www.plugincafe.com
[in]nameThe name of the modifier that will appear in the modifiers tab for every brush.
[in]gThe Alloc() method for the SculptBrushModifierData node.
[in]modeThe mode for the modifier. Note that SCULPTBRUSHMODE::NORMAL modes can not use SCULPTBRUSHMODE::GRAB modes as modifiers.
[in]typeThe type of data that the modifier changes.
[in]resourceThe name of the description resource file.
[in]hideIf true the modifier is not be displayed on the Modifier tab for any sculpting brush. But it can still be accessed via the SculptModifierInterface.
[in]brushFiltersA custom list of brushes ID to not display the modifier on specific sculpting brushes.
If the modifier is the same functionality as a brush include that brushes ID here and the modifier will be filtered when that brush is selected.
[in]brushRestrictionsA custom list of brushes ID to only display the modifier for specific sculpting brushes.
[in]diskLevelThe plugin level is similar to a version number. The default level is 0.
Increase this for new revisions of a plugin to allow for forward and backward compatibility.

As an example you may have updated a plugin. If you now need to write additional information for new settings or changed types for old settings increase the level.
During loading either a 0 is passed (if the file was written by the old plugin) or 1 (if the file was written by the new plugin). This allows to easily write/read new values.
For forward and backward compatibility to work any existing read order from a given level must not be changed. Cinema 4D skips any new settings automatically if they have not been read.

disklevel is only useful if variables are written/read in NodeData::Write/ NodeData::Read.
Returns
true if successful, otherwise false.

◆ AddSculptBrushModifierFunction()

Bool AddSculptBrushModifierFunction ( Int32  id,
String  name,
SCULPTBRUSHMODE  mode,
SCULPTBRUSHDATATYPE  type,
maxon::BaseArray< Int32 > *  brushFilters = nullptr,
maxon::BaseArray< Int32 > *  brushRestrictions = nullptr,
Bool  hide = false 
)

Internal. Use RegisterBrushModifier() method instead of this.

Parameters
[in]idA unique plugin ID. Must be obtained from http://www.plugincafe.com
[in]nameThe name of the modifier that will appear in the modifiers tab for every brush.
[in]modeThe mode for the modifier. Note that SCULPTBRUSHMODE::NORMAL modes can not use SCULPTBRUSHMODE::GRAB modes as modifiers.
[in]typeThe type of data that the modifier changes.
[in]brushFiltersA custom list of brushes ID to not display the modifier on specific sculpting brushes.
If the modifier is the same functionality as a brush include that brushes ID here and the modifier will be filtered when that brush is selected.
[in]brushRestrictionsA custom list of brushes ID to only display the modifier for specific sculpting brushes.
[in]hideIf true the modifier is not be displayed on the Modifier tab for any sculpting brush. But it can still be accessed via the SculptModifierInterface.
Returns
true if successful, otherwise false.

◆ IsSculptBrush()

Bool IsSculptBrush ( Int32  toolID)

Determines if a tool is a Sculpt Brush:

Bool isBrush = IsSculptBrush(tool);
BaseDocument * GetActiveDocument()
Int32 GetAction() const
maxon::Bool Bool
Definition: ge_sys_math.h:51
maxon::Int32 Int32
Definition: ge_sys_math.h:56
Bool IsSculptBrush(Int32 toolID)
Parameters
[in]toolIDThe ID of the tool to check.
Returns
true if the tool is a Sculpt Brush, otherwise false.

◆ GetSelectedSculptBrush()

SculptBrushToolData* GetSelectedSculptBrush ( BaseDocument doc)

Retrieves a pointer to the currently selected Sculpt Brush.

Parameters
[in]docThe document to check. The caller owns the pointed document.
Returns
A pointer to the currently selected SculptBrushToolData if one is currently active, otherwise nullptr.

Variable Documentation

◆ MAXON_ENUM_FLAGS

class SculptFlagChecker MAXON_ENUM_FLAGS