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
Called each time the tool is selected.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if there was no error, otherwise False. |
Called each time the user chooses another tool.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if there was no error, otherwise False. |
Called by SendModelingCommand() to perform a command.
Parameters: |
|
---|
Called to let initialize the default tool settings in data.
Parameters: |
|
---|
Called when the user types something in any of the editor views.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | False if a problem occured. |
Called when the user clicks with the mouse in any of the editor views.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | False if a problem occured. |
Called to check if the tool should be enabled, checked or not.
Parameters: | doc (BaseDocument) – The document the tool is being used in. | ||||
---|---|---|---|---|---|
Return type: | int | ||||
Returns: | The return flags:
|
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: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | bool |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns: | False if a problem occured. |
Called when the editor view is updated so you can display graphics for your tool in the view.
Parameters: |
|
||||||||
---|---|---|---|---|---|---|---|---|---|
Return type: | int |
||||||||
Returns: | The values for this are:
|
Called to get a GUI for the Active Tool window. Return an instance of your tool’s dialog.
Parameters: | bc (BaseContainer) – Currently not used. |
---|---|
Return type: | SubDialog |
Returns: | The allocated subdialog. |
Lets you get messages for the tool. For example description messages such as MSG_DESCRIPTION_COMMAND are sent here.
Parameters: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | bool |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns: | Depends on the message type. |
Return the unique id for the tool plugin as obtained from www.plugincafe.com.
Return type: | int |
---|---|
Returns: | The tool plugin ID. |
Return the name of the resource file for this brush.
Return type: | str |
---|---|
Returns: | The name of the resource file for this brush. |
Note
StartStroke() will only be called if SculptBrushParams.EnableBrushAccess() has been set to True.
Parameters: |
|
---|
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. |
---|
Note
StartSymmetry() will only be called if SculptBrushParams.EnableBrushAccess() has been set to True.
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. |
---|
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. |
---|
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. |
---|
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. |
---|
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.
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. |
---|
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.
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 (BaseContainer) – The settings for the loaded brush. |
---|
Parameters: |
|
---|
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. |
Private.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if successful, otherwise False. |
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. |
Private.
Parameters: |
|
||||||
---|---|---|---|---|---|---|---|
Return type: | bool |
||||||
Returns: | True if successful, otherwise False. |
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. |
Called to modify the sculpt object. Implement the functionality of your brush here!
Parameters: | dab (BrushDabData) – The brush dab data. |
---|