By default the .res file includes the tabs for Stamps and Stencils and the options for Size, Pressure, Steady Stroke, Spacing and the Draw Modes.
If any of these options are need then hide them in the .res file by adding the following lines to the top of it:
By Default the Draw Modes that are available are Freehand, Line, Lasso Fill, Polygon Fill and Rectangle Fill.
To remove any of these or add more, customize the list. Here is an example below where support is added for all the different modes, including DragDab and DragRect.
Just remove any from this list to suit the brush. By default Freehand is set, so if the Draw Mode is hidden the brush will still work.
Also make sure the priority for any sculpting plugins are set correctly. Sculpt brush plugins need to be loaded after the main sculpting plugin.
To ensure this set the priority in PluginMessage(Int32 id, void *data) as shown below:
Enables/disables multithreading for the brush. Private.
Warning
Never enable multithreading!
Tells the system that the brush can be multithreaded. If true then the dabs are distributed over multiple threads and are drawn in any order.
Any calls to the MovePointFunc could now be for any stroke instance and could be out of order and from different threads.
Parameters
[in]
enable
true if the brush multithreaded, false if not. Default is false.
Enables/disables the brush own smooth operation that gets used when the Shift key is pressed.
Note
Check for this in the MovePointFunc method if (GetBrushOverride() & OVERRIDE::SMOOTHTOOL) is true and then implement the custom smooth method. Otherwise it will use the Smooth Brush for smoothing.
Parameters
[in]
enable
true if the brush handles smoothing, false if not. Default is false.
Never enable for a C++ plugin! This is only ever used internally by Python brushes. When enabled it routes the calls to SculptBrushToolData::ApplyPythonDab.
All calls are only ever single threaded with no access to the brush data.
When enabled the Draw Direction UI will appear in the Settings tab.
Calls can then be made to GetDrawDirectionNormal() to get the direction of the normal based on the currently selected Draw Direction.
Parameters
[in]
enable
true to display the Draw Direction UI options. Disabled by default.
Enables/disables the Fill algorithm to remove any isolated points. That is any points that are selected but have no neighboring selections.
This can happen on high resolution meshes due to the nature of the hit detection against screen space pixels defined by the fill tools.
By setting to false it keeps any isolated points that are selected. This is true by default so isolated points are removed before being sent to the MovePointFunc function.
Parameters
[in]
enable
true if the brush should remove isolated points, false if it should keep them. Default is true.
Sets which flags should be checked to do a rebuild of the collision structure for a PolygonObject.
These flags are used to check against the PolygonObjects dirty flags when a stroke is about to be done on a PolygonObject.
If the flags being checked are dirty since the last check then the collision cache structure for the object will be rebuilt.
This can be used in cases such as the Select Brush where you are not directly moving the points of the model during a stroke.
So you can set all the flags except the DIRTYFLAGS::SELECT (using something like (DIRTYFLAGS::ALL & ~DIRTYFLAGSSELECT) to ensure that the object is not recalculated when just the select flags are changed.
In all other cases the object will be rebuilt.
Since
R17.032
Parameters
[in]
flags
The dirty flags to check. By default this is set to DIRTYFLAGS::ALL.