SculptBrushToolData

New in version R16.021.

A data class for creating sculpt brushes.

See also

The SculptBrushToolData plugin examples: Py-SculptGrabBrush , Py-SculptPaintBrush , Py-SculptPullBrush and Py-SculptTwistBrush

Definition

class c4d.modules.sculpting. SculptBrushToolData

Inheritance

Members

SculptBrushToolData. InitTool ( self , doc , data , bt )

Called each time the tool is selected.

Parameters:
Return type:

bool

Returns:

True if there was no error, otherwise False .

SculptBrushToolData. FreeTool ( self , doc , data )

Called each time the user chooses another tool.

Parameters:
Return type:

bool

Returns:

True if there was no error, otherwise False .

SculptBrushToolData. DoCommand ( self , mode , arr , bc , doc , flags )

Called by SendModelingCommand() to perform a command.

Parameters:
  • mode ( int ) –

    The modeling mode:

    MODELINGCOMMANDMODE_ALL All points/polygons.
    MODELINGCOMMANDMODE_POINTSELECTION Only the current point selection.
    MODELINGCOMMANDMODE_POLYGONSELECTION Only the current polygon selection.
    MODELINGCOMMANDMODE_EDGESELECTION Only the current edge selection.
  • arr (list of BaseList2D ) – The input objects.
  • bc ( c4d.BaseContainer ) – The modeling command settings container.
  • doc ( c4d.documents.BaseDocument ) – The document for the operation.
  • flags ( int ) –

    The flags:

    MODELINGCOMMANDFLAGS_0 No flags.
    MODELINGCOMMANDFLAGS_CREATEUNDO Creates undo and inserts newly created objects into doc .
SculptBrushToolData. InitDefaultSettings ( self , doc , data )

Called to let initialize the default tool settings in data .

Parameters:
SculptBrushToolData. KeyboardInput ( self , doc , data , bd , win , msg )

Called when the user types something in any of the editor views.

Parameters:
Return type:

bool

Returns:

False if a problem occured.

SculptBrushToolData. MouseInput ( self , doc , data , bd , win , msg )

Called when the user clicks with the mouse in any of the editor views.

Parameters:
Return type:

bool

Returns:

False if a problem occured.

SculptBrushToolData. GetState ( self , doc )

Called to check if the tool should be enabled, checked or not.

Parameters: doc ( c4d.documents.BaseDocument ) – The document the tool is being used in.
Return type: int
Returns: The return flags:
CMD_ENABLED Enabled.
CMD_VALUE Checked.
SculptBrushToolData. GetCursorInfo ( self , doc , data , bd , x , y , bc )

Called when the cursor is over the editor window to get the state of the mouse pointer.

The bubble help and cursor can be set using:

bc.SetString(c4d.RESULT_BUBBLEHELP, "My Tools Help")
bc.SetLong(c4d.RESULT_CURSOR, c4d.MOUSE_POINT_HAND)
							
Parameters:
  • doc ( c4d.documents.BaseDocument ) – The currently active document.
  • data ( c4d.BaseContainer. ) – The tool settings container.
  • bd ( c4d.BaseDraw ) – The BaseDraw object for the active editor view.
  • x ( float ) – The x coordinate of the mouse cursor relative to the top-left of the currently active editor view.
  • y ( float ) – The y coordinate of the mouse cursor relative to the top-left of the currently active editor view.
  • bc ( c4d.BaseContainer ) –

    The container to store the result in. Use the following container IDs:

    RESULT_BUBBLEHELP str Bubble text help.
    RESULT_CURSOR int Cursortype.
    MOUSE_HIDE Hide cursor.
    MOUSE_SHOW Show cursor.
    MOUSE_NORMAL Normal cursor.
    MOUSE_BUSY Busy cursor.
    MOUSE_CROSS Cross cursor.
    MOUSE_QUESTION Question cursor
    MOUSE_ZOOM_IN Zoom in cursor.
    MOUSE_ZOOM_OUT Zoom out cursor.
    MOUSE_FORBIDDEN Forbidden cursor.
    MOUSE_DELETE Delete cursor.
    MOUSE_COPY Copy cursor.
    MOUSE_INSERTCOPY Insert copy cursor.
    MOUSE_INSERTCOPYDOWN Insert copy down cursor.
    MOUSE_MOVE Move cursor.
    MOUSE_INSERTMOVE Insert move cursor.
    MOUSE_INSERTMOVEDOWN Insert move cursor.
    MOUSE_ARROW_H Horizontal cursor.
    MOUSE_ARROW_V Vertical cursor.
    MOUSE_ARROW_HV Horizontal and vertical arrow cursor.
    MOUSE_POINT_HAND Point hand cursor.
    MOUSE_MOVE_HAND Move hand cursor.
    MOUSE_IBEAM I-beam cursor.
    MOUSE_SELECT_LIVE Live selection cursor.
    MOUSE_SELECT_FREE Free selection cursor.
    MOUSE_SELECT_RECT Rectangle selection cursor.
    MOUSE_SELECT_POLY Polygon selection cursor.
    MOUSE_SPLINETOOLS Spline tools cursor.
    MOUSE_EXTRUDE Extrude cursor.
    MOUSE_NORMALMOVE Normal move cursor.
    MOUSE_ADDPOINTS Add points cursor.
    MOUSE_ADDPOLYGONS Add polygons cursor.
    MOUSE_BRIDGE Bridge cursor.
    MOUSE_MIRROR Mirror cursor.
    MOUSE_PAINTMOVE Paint move cursor.
    MOUSE_PAINTSELECTRECT Paint select rectangle cursor.
    MOUSE_PAINTSELECTCIRCLE Paint select circle cursor.
    MOUSE_PAINTSELECTPOLY Paint select polygon cursor.
    MOUSE_PAINTSELECTFREE Paint select free cursor.
    MOUSE_PAINTMAGICWAND Paint magic wand cursor.
    MOUSE_PAINTCOLORRANGE Paint color range cursor.
    MOUSE_PAINTFILL Paint fill cursor.
    MOUSE_PAINTPICK Paint pick cursor.
    MOUSE_PAINTBRUSH Paint brush cursor.
    MOUSE_PAINTCLONE Paint clone cursor.
    MOUSE_PAINTTEXT Paint text cursor.
    MOUSE_PAINTCROP Paint crop cursor.
    MOUSE_PAINTLINE Paint line cursor.
    MOUSE_PAINTPOLYSHAPE Paint polygon shape cursor.
Return type:

bool

Returns:

False if a problem occured.

SculptBrushToolData. Draw ( self , doc , data , bd , bh , bt , flags )

Called when the editor view is updated so you can display graphics for your tool in the view.

Parameters:
  • doc ( c4d.documents.BaseDocument ) – The currently active document.
  • data ( c4d.BaseContainer ) – The tool settings container.
  • bd ( c4d.BaseDraw ) – The BaseDraw object for the active editor view.
  • bh ( c4d.plugins.BaseDrawHelp ) – The BaseDrawHelp object for the active editor view.
  • bt ( c4d.threading.BaseThread ) – The thread this method is being called from.
  • flags ( int ) –

    The flags are:

    TOOLDRAWFLAGS_0 No flags.
    TOOLDRAWFLAGS_INVERSE_Z This flag is used for inverse Z-buffer use, with this mode the drawing engine of Cinema 4D will only draw elements if they are further away from the camera than other objects. This is mostly used for helplines (such as the semitransparent axis inside of objects). This mode only works when all objects are drawn so it should be the passed last.
    TOOLDRAWFLAGS_HIGHLIGHT Highlight mode.
Return type:

int

Returns:

The values for this are:

TOOLDRAW_0 None
TOOLDRAW_HANDLES The active objects handles will be drawn.
TOOLDRAW_AXIS The active objects axes will be drawn.
TOOLDRAW_HIGHLIGHTS The highlights will be drawn.

SculptBrushToolData. AllocSubDialog ( self , bc )

Called to get a GUI for the Active Tool window. Return an instance of your tool’s dialog.

Parameters: bc ( c4d.BaseContainer ) – Currently not used.
Return type: c4d.gui.SubDialog
Returns: The allocated subdialog.
SculptBrushToolData. Message ( self , doc , data , type , t_data )

Lets you get messages for the tool. For example description messages such as MSG_DESCRIPTION_COMMAND are sent here.

Parameters:
  • doc ( c4d.documents.BaseDocument ) – The currently active document.
  • data ( c4d.BaseContainer ) – The current tool data.
  • type ( int ) –

    The message ID:

    MSG_POINTS_CHANGED The points have changed. The corresponding data is VariableChanged .
    MSG_POLYGONS_CHANGED The polygons have changed. The corresponding data is VariableChanged .
    MSG_UPDATE Must be sent if the bounding box has to be recalculated. (Otherwise you can use MSG_CHANGE .)
    MSG_SMALLUPDATE Part of the object has changed that needs no cache rebuilding. Note : This message should be used very carefully, it is there for (small) performance enhancements, for example if a polygon selection is changed then the caches needn’t be rebuilt, so MSG_SMALLUPDATE can be sent.
    MSG_CHANGE Must be sent if any object data (except for the matrix) has been changed.
    MSG_BASECONTAINER Message with a container, for example from a C.O.F.F.E.E. plugin. The corresponding data is BaseContainer .
    MSG_SEGMENTS_CHANGED The segments have changed. The corresponding data is VariableChanged .
    MSG_FILTER A message filter that lets you block C4DAtom.MultiMessage() calls. The corresponding data is MessageFilter. Return True to let the message pass and False to block it!
    MSG_TRANSFERGOALS Internal message!
    MSG_DESCRIPTION_INITUNDO Allows elements to create undo actions for the following parameter changes in the attributes manager. This is already automatically handled for keys, tags, objects etc. The corresponding data is DescriptionInitUndo .
    MSG_DESCRIPTION_CHECKUPDATE Allows elements to determine the type of refresh after a parameter has been changed in the Active manager. This is already automatically handled for keys, tags, objects etc. The corresponding data is DescriptionCheckUpdate . Note : Currently this message is completely handled by all baseclasses. Most plugins won’t need to modify the message data. it is more interesting to start some update action - e.g. deleting data that will be rebuilt with the next access.
    MSG_DESCRIPTION_CHECKUPDATE_AUTOTAKE

    New in version R17.032.

    Element supports automatic Take overrides.

    MSG_DESCRIPTION_CHECKUPDATE_BASELISTEDIT

    New in version R17.032.

    Edit node is updating the current Take override value.

    MSG_DESCRIPTION_COMMAND Sent by for example BUTTON (description element). See example below.
    MSG_DESCRIPTION_POPUP Allows popup menu handling in the Attribute Manager. The corresponding data is DescriptionPopup .
    MSG_DESCRIPTION_POSTSETPARAMETER After a SetParameter() call to an atom element this message is sent to the object. The corresponding data is DescriptionPostSetValue .
    MSG_DESCRIPTION_VALIDATE Allows you to update dependencies or to check for invalid values after a parameter has been changed (For example: the light’s inner radius always must be smaller than the light’s outer radius - so this routine checks for it and corrects it). The corresponding data is DescriptionValidate .
    MSG_EDIT Allows elements to do some action if the user edits the element (doubleclick e.g. in object manager).
    MSG_MENUPREPARE Allows tags, objects, shaders etc. to do some setup work when called from the menu. The corresponding data is the current BaseDocument .
    MSG_RETRIEVEPRIVATEDATA A generic private message to retrieve data from an object. Specific for every type of object so no public documentation available. The corresponding data is RetrievePrivateData .
    MSG_DESCRIPTION_REMOVE_ENTRY Tells the node to remove a description entry. The corresponding data is DescriptionCommand .
    MSG_DESCRIPTION_EDIT_ENTRY Tells the node to edit a description entry. The corresponding data is DescriptionCommand .
    MSG_DESCRIPTION_CHECKDRAGANDDROP Asks the node if a drag and drop onto for example a LINK (description element) field should be accepted. The corresponding data is DescriptionCheckDragAndDrop .
    MSG_DESCRIPTION_GETBITMAP Queries the object for updated bitmaps for BitmapButtonCustomGui elements in the description. (E.g. the lens flare preview.) The corresponding data is DescriptionGetBitmap .
    MSG_DESCRIPTION_GETOBJECTS Private.
    MSG_DESCRIPTION_USERINTERACTION_END End of user interaction.
    MSG_DESCRIPTION_GETINLINEOBJECT Sent by the Attribute Manager to the object. The object can check for a description ID and return the linked objects in the atom array. The corresponding data is DescriptionInlineObjectMsg .
    MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION

    New in version R19.

    Sent by a custom GUI to the parent NodeData .

    MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION_ID

    New in version R19.

    The custom GUI ID in the message container for MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION .

    MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION_CONTENT

    New in version R19.

    The user data in the message container for MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION .

    MSG_DESCRIPTION_ALLOWOVERRIDE

    New in version R17.032.

    Sent before a Take override is added to allow it or not. The corresponding data is DescriptionAllowOverride .

    MSG_DESCRIPTION_TAKECHANGED

    New in version R17.032.

    Sent to each overridden node when the user changes the current Take. Sent to both the node storing the data in the Take and the node releasing the data to the document. The corresponding data is DescriptionTakeChanged .

    MSG_MOVE_FINISHED Sent after a handle or the object has been moved.
    MSG_MOVE_START Sent before a handle or the object has been moved.
    MSG_EDITABLE_END Private.
    MSG_GETCUSTOMICON Every atom can return a custom icon with this message. The corresponding data is GetCustomIconData .
    MSG_MATERIALDRAGANDDROP Received by a material upon dropping an instance of the material onto an object. The material can choose to create a tag of its own, or trigger other actions, instead of letting Cinema 4D create a normal material assignment. The corresponding data is MaterialDragAndDrop . For example Sketch and Toon creates its own type of tag and returns it in result. Cinema 4D creates the undo for it and activates it. Inserting the tag is done by the material.
    MSG_DRAGANDDROP Received when something is dropped on it. The corresponding data is DragAndDrop .
    MSG_INITIALCHANNEL See HandleInitialChannel().
    MSG_DOCUMENTINFO Sent as broadcast message to the document when it its loaded, saved etc. The corresponding data is DocumentInfoData . (See the type member for more information about when the message is sent.)
    MSG_GETSELECTION Private.
    MSG_MULTI_RENDERNOTIFICATION A document and all of its elements receive this message before a render starts. The corresponding data is RenderNotificationData .
    MSG_MULTI_MARKMATERIALS When data is None this is sent to plugin nodes to let them mark the materials that they use. Otherwise the message is sent to let you translate you material links, for example when a material is replaced, and then the corresponding structure is MarkMaterials. (An example for both cases is included on the MarkMaterials page.)
    MSG_MULTI_DOCUMENTCLONED The document has been cloned.
    MSG_MULTI_DOCUMENTIMPORTED After a Cinema 4D document has been loaded this message is sent to the document (and all children structures). The corresponding data is DocumentImported .
    MSG_MULTI_SETNEWMARKERS Private.
    MSG_MULTI_CLEARSUGGESTEDFOLDER Objects have to remove absolute paths (only if they support MSG_GETALLASSETS ). Both are important for SaveProject to work and to collect all items.
    MSG_TOOL_SWITCHACTION

    New in version R17.032.

    Sent to tools on mouse input and cursor info if they have the flag PLUGINFLAG_TOOL_SWITCHACTION set to allow to change action on modifier key.

    MSG_TRANSLATE_POINTS Sent by the modeling core to let tags etc. update after point changes. The corresponding data is TranslationMaps .
    MSG_TRANSLATE_POLYGONS Sent by the modeling core to let tags etc. update after polygon changes. The corresponding data is TranslationMaps .
    MSG_TRANSLATE_NGONS Sent by the modeling core to let tags etc. update after N-gon changes. The corresponding data is TranslationMaps .
    MSG_TRANSLATE_SEGMENTS Sent by the modeling core to let tags etc. update after segment changes. The corresponding data is TranslationMaps .
    MSG_PRETRANSLATE_POINTS Sent before MSG_TRANSLATE_POINTS , before the changes are actually carried out. The corresponding data is TranslationMaps .
    MSG_PRETRANSLATE_POLYGONS Sent before MSG_TRANSLATE_POLYGONS , before the changes are actually carried out. The corresponding data is TranslationMaps .
    MSG_PRETRANSLATE_NGONS Sent before MSG_TRANSLATE_NGONS , before the changes are actually carried out. The corresponding data is TranslationMaps .
    MSG_PRETRANSLATE_SEGMENTS Sent before MSG_TRANSLATE_SEGMENTS , before the changes are actually carried out. The corresponding data is TranslationMaps .
    MSG_UPDATE_NGONS Should be sent if points are changed and any N-gons need updating. Cinema 4D will then update the N-gons, if the user has this option enabled.
    MSG_DOCUMENT_MODE_CHANGED Sent to the active tool plugin during BaseDocument.SetMode() .
    MSG_TOOL_RESTART Private. (Handles the tool description apply behaviour after mouse clicks.)
    MSG_DEFORMMODECHANGED Private.
    MSG_ANIMATE Sent to objects after they have been animated.
    MSG_CALCMEMUSAGE Private.
    MSG_SCALEDOCUMENT Tells the document that another document with different scale has been merged. The corresponding data is MessageScaleDocument .
    MSG_GET_INHERITANCECONTAINER Private.
    MSG_SOFTTAG_UPDATE Private.
  • t_data ( any ) – Depends on type .
Return type:

bool

Returns:

Depends on the message type.

SculptBrushToolData. GetToolPluginId ( self )

Return the unique id for the tool plugin as obtained from www.plugincafe.com.

Return type: int
Returns: The tool plugin ID.
SculptBrushToolData. GetResourceSymbol ( self )

Return the name of the resource file for this brush.

Return type: str
Returns: The name of the resource file for this brush.
SculptBrushToolData. StartStroke ( self , strokeCount , data )
StartStroke() is called once at the start of the stroke. It passes the total number of instances of the brush that will be drawn. The number of instances will change depending on the symmetry mirroring and radial settings.
Use this method to setup any data on your brush that you might want to access from within your ApplyDab() override via BrushDabData.GetBrush() .
Calling order for brush stroke methods:

Note

StartStroke() will only be called if SculptBrushParams.EnableBrushAccess() has been set to True .

Parameters:
  • strokeCount ( int ) – The number of instances of the brush that will be drawn.
  • data ( c4d.BaseContainer ) – The data for the brush.
SculptBrushToolData. StartStrokeInstance ( self , strokeInstanceID )
Called after StartStroke() . Called once for each brush instance at the start of a stroke. The number of instances will change depending on the symmetry mirroring and radial settings.
Use this method to allocate any data you may want to access during a brush stroke, that may be specific for each individual instance. Setup here any data on your brush that you might want to access from within your ApplyDab() override via BrushDabData.GetBrush() .

Note

StartStrokeInstance() will only be called if SculptBrushParams.EnableBrushAccess() has been set to True .

Parameters: strokeInstanceID ( int ) – The ID of the brush instance being drawn.
SculptBrushToolData. StartSymmetry ( self )
Called directly before each individual brush instance is about to be handled. Between this method and EndSymmetry() all the dabs for each instance will be drawn from one mouse location on the surface of the model to another. This method will be called every time the user moves its mouse over the object on the screen to indicate that a new batch of dabs is going to be drawn.
Use this method to setup any data on your brush that you might want to access from within your ApplyDab() override via BrushDabData.GetBrush() .

Note

StartSymmetry() will only be called if SculptBrushParams.EnableBrushAccess() has been set to True .

SculptBrushToolData. StartStrokeInstanceDabs ( self , strokeInstanceID )
Called before all the dabs for a single instance are about to be drawn. After this call all the dabs for just one instance of the brush on the surface will interpolate between the 2 mouse locations on the object then draw all the dabs for that instance.
Use this method to setup any data on your brush that you might want to access from within your ApplyDab() override via BrushDabData.GetBrush() .

Note

StartStrokeInstanceDabs() will only be called if SculptBrushParams.EnableBrushAccess() has been set to True .

Parameters: strokeInstanceID ( int ) – The ID of the brush instance being drawn.
SculptBrushToolData. StartDab ( self , strokeInstanceID )
Called before the ApplyDab() override is called which will then process the dab.
Use this method to setup any data on your brush that you might want to access from within your ApplyDab() override via BrushDabData.GetBrush() .

Note

StartDab() will only be called if SculptBrushParams.EnableBrushAccess() has been set to True .

Parameters: strokeInstanceID ( int ) – The ID of the brush instance being drawn.
SculptBrushToolData. EndDab ( self , strokeInstanceID )

Called after ApplyDab() function.

Note

EndDab() will only be called if SculptBrushParams.EnableBrushAccess() has been set to True .

Parameters: strokeInstanceID ( int ) – The ID of the brush instance being drawn.
SculptBrushToolData. EndStrokeInstanceDabs ( self , strokeInstanceID )

Called after all the dabs have been drawn for a single instance of the brush.

Note

EndStrokeInstanceDabs() will only be called if SculptBrushParams.EnableBrushAccess() has been set to True .

Parameters: strokeInstanceID ( int ) – The ID of the brush instance being drawn.
SculptBrushToolData. EndSymmetry ( self )

Called after all the dabs for all the instances have been drawn for a single mouse movement on screen.

Note

EndSymmetry() will only be called if SculptBrushParams.EnableBrushAccess() has been set to True .

SculptBrushToolData. EndStrokeInstance ( self , strokeInstanceID )
Called on mouse up after a brush stroke. This method is called once for each instance. Use this method to delete any temporary data you may have allocated in your StartStrokeInstance() override.

Note

EndStrokeInstance() will only be called if SculptBrushParams.EnableBrushAccess() has been set to True .

Parameters: strokeInstanceID ( int ) – The ID of the brush instance being drawn.
SculptBrushToolData. EndStroke ( self )

Called on mouse up after EndStrokeInstance() has been called for each instance.

Note

EndStroke() will only be called if SculptBrushParams.EnableBrushAccess() has been set to True .

SculptBrushToolData. MouseData ( self , strokeInstanceID , brushData , md )

New in version R17.048.

Constantly receives data about the object underneath the mouse. This method will get called when you move the cursor over an object on screen and happens when the mouse button is up or down.

Note

MouseData() will only be called if SculptBrushParams.EnableMouseData() has been set to True .

Parameters:
  • strokeInstanceID ( int ) – The ID of the brush instance being drawn.
  • brushData ( c4d.BaseContainer ) – The BaseContainer data for the brush.
  • md ( dict ) –

    The mouse data information for the current position of the mouse on the surface of the object:

    • ”pObject”: SculptObject The selected Object underneath the mouse.
    • ”mouseCoord”: Vector The screen coordinates for the mouse location in the current viewport.
    • ”hitPoint”: Vector The hitpoint on the surface of the model at the center of the brush dab.
    • ”normal”: Vector The normal on the surface of the model at the center of the brush dab.
    • ”barryCoord”: Vector The barycentric coordinates within the triangle for the hit polygon.
    • ”polygon”: int The Index of the hit polygon.
    • ”mouseDrag”: True if the mouse button is held down and being dragged in the viewport.
    • ”distance”: The distance from the mouse in local space to the surface of the object.
    • ”isBackface”: True if the polygon under the mouse is backfacing.
SculptBrushToolData. OverwriteLoadedPresetSettings ( self , data )

After a preset has been loaded this method will get called to allow the brush to disable or change any of the loaded settings if required.

Parameters: data ( c4d.BaseContainer ) – The settings for the loaded brush.
SculptBrushToolData. PostInitDefaultSettings ( self , doc , data )
When a brush is reset by the user, in the UI, then it sets it back to its defaults. Afterwards this method is called so you can overwrite any of the standard brush settings with your own for this brush.
Parameters:
SculptBrushToolData. GetEnabling ( self , id )

Called internally by the sculpting system to check if an UI element is enabled or not.

If this method is overridden then make sure to also check the return value of this method directly by calling SculptBrushToolData.GetEnabling(id) at the end.

Parameters: id ( int ) – The id of the UI element from the .res file.
Return type: bool
Returns: True if the element should be enabled, otherwise False .
SculptBrushToolData. HandleFillTool ( self , doc , data , bd , win , msg )

Private.

Parameters:
Return type:

bool

Returns:

True if successful, otherwise False .

SculptBrushToolData. HandleNonModelPickMode ( )

Private. Do something special when the first mouse click is not on the model.

Parameters:
Return type:

bool

Returns:

True if handled, otherwise False . In the case where you wish to only handle the mouse click and not the mouse drag it can return False .

SculptBrushToolData. DrawNonModelPickMode ( )

Private.

Parameters:
  • doc ( c4d.documents.BaseDocument ) – The current document.
  • data ( c4d.BaseContainer ) – The brush data.
  • bd ( c4d.BaseDraw ) – The editor view the tool is being used in.
  • bh ( c4d.plugins.BaseDrawHelp ) – The BaseDrawHelp object for the active editor view.
  • bt ( c4d.threading.BaseThread ) – The thread this method is being called from.
  • flags ( int ) –

    The flags:

    TOOLDRAWFLAGS_0 No flags.
    TOOLDRAWFLAGS_INVERSE_Z This flag is used for inverse Z-buffer use, with this mode the drawing engine of Cinema 4D will only draw elements if they are further away from the camera than other objects. This is mostly used for helplines (such as the semitransparent axis inside of objects). This mode only works when all objects are drawn so it should be the passed last.
    TOOLDRAWFLAGS_HIGHLIGHT Highlight mode.
Return type:

bool

Returns:

True if successful, otherwise False .

SculptBrushToolData. HasDrawMode ( self , mode )
Override to let the system know what draw modes the brush supports. The system will call this method to check if a draw mode is supported by this brush. If the brush supports all the draw modes then it can just return True . Otherwise you can specify which draw modes should be enabled by checking each of them.
Parameters: mode ( int ) – The ID for the DrawMode. For example MDATA_SCULPTBRUSH_SETTINGS_DRAWMODE_LINE .
Return type: bool
Returns: True if the draw mode is supported, otherwise False .
SculptBrushToolData. ApplyDab ( self , dab )

Called to modify the sculpt object. Implement the functionality of your brush here!

Parameters: dab ( c4d.modules.sculpting.BrushDabData ) – The brush dab data.

Table Of Contents