#include <c4d_descriptiondialog.h>
A specialized data class for creating modeling tool plugins.
Implements InitDefaultSettings, GetDDescription, GetDEnabling and Message to support stuff like Transform/Apply. Be sure to call the parent versions if these functions are overridden.
Use RegisterToolPlugin() to register a description tool plugin.
Protected Attributes | |
Bool | modeChanged |
Bool | firstaction |
Int32 | last_dirty |
Miscellaneous | |
static constexpr Int32 | MSG_TOOL_SYSTEM_HOOK_INIT |
static constexpr Int32 | MSG_TOOL_SYSTEM_HOOK_FREE |
virtual const String | GetResourceSymbol ()=0 |
virtual Int32 | GetToolPluginId ()=0 |
virtual void | InitDefaultSettings (BaseDocument *pDoc, BaseContainer &data) |
Bool | InteractiveModeling_Restart (BaseDocument *doc) |
Init/Free Tool | |
virtual Bool | InitTool (BaseDocument *doc, BaseContainer &data, BaseThread *bt) |
virtual void | FreeTool (BaseDocument *doc, BaseContainer &data) |
Description | |
virtual Bool | GetDDescription (BaseDocument *doc, BaseContainer &data, Description *description, DESCFLAGS_DESC &flags) |
virtual Bool | GetDEnabling (BaseDocument *doc, BaseContainer &data, const DescID &id, const GeData &t_data, DESCFLAGS_ENABLE flags, const BaseContainer *itemdesc) |
virtual Bool | TranslateDescID (BaseDocument *doc, BaseContainer &data, const DescID &id, DescID &res_id, C4DAtom *&res_at) |
Message | |
virtual Bool | Message (BaseDocument *doc, BaseContainer &data, Int32 type, void *t_data) |
|
virtual |
Called each time the tool is selected.
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | data | The tool settings container. |
[in] | bt | The calling thread. Can be nullptr. Cinema 4D owns the pointed thread. |
Reimplemented from ToolData.
Reimplemented in SculptBrushToolData, and BrushToolData.
|
virtual |
Called each time the user chooses another tool.
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | data | The tool settings container. |
Reimplemented from ToolData.
Reimplemented in SculptBrushToolData, and BrushToolData.
|
virtual |
Called to add parameters to the description for the tool.
Modify the passed description as needed, set the appropriate flags and then make sure to include a call to the parent at the end:
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | data | The tool settings container. |
[in,out] | description | The node's description to add the parameters to. Cinema 4D owns the pointed description. |
[in,out] | flags | The flags for the description operation: DESCFLAGS_DESC |
Reimplemented from ToolData.
Reimplemented in SculptBrushToolData, and BrushToolData.
|
virtual |
Called to decide which description parameters should be enabled or disabled.
Can be used both for parameters that are stored in the tool's description and for dynamic parameters.
Read the passed t_data if the right id was provided, and return true to enable the parameter or false to disable it. Then make sure to include a call to the parent at the end:
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | data | The tool settings container. |
[in] | id | The ID of the parameter. |
[in] | t_data | The parameter data. Cinema 4D owns the pointed data. |
[in] | flags | Not used. |
[in] | itemdesc | The parameter's description, encoded to a container as described in Description. |
Reimplemented from ToolData.
Reimplemented in SculptBrushToolData, and BrushToolData.
|
virtual |
Called by the Attribute Manager for every object and every description ID.
Gives the opportunity to route a description ID in the description of a tool to another one.
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | data | The tool settings container. |
[in] | id | The source description ID. |
[out] | res_id | Assign the target description ID. |
[out] | res_at | Assign the target object. |
Reimplemented from ToolData.
Reimplemented in SculptBrushToolData.
|
virtual |
Called when a tool receives messages.
For example description messages such as MSG_DESCRIPTION_COMMAND are sent here.
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | data | The tool settings container. |
[in] | type | The message type: MSG |
[in,out] | t_data | The message data. The sender owns the pointed data. |
Reimplemented from ToolData.
Reimplemented in SculptBrushToolData, and BrushToolData.
|
pure virtual |
Called to return the resource symbol of the tool.
Reimplemented from ToolData.
|
pure virtual |
Called to return the plugin ID of the tool.
|
virtual |
Called to initialize the default tool settings in data.
[in] | pDoc | The active document. Cinema 4D owns the pointed document. |
[in] | data | The tool settings container. |
Reimplemented from ToolData.
Reimplemented in SculptBrushToolData, and BrushToolData.
Bool InteractiveModeling_Restart | ( | BaseDocument * | doc | ) |
Called when the interactive modeling is restarted.
Applies the last modeling undo so that new values of the modeling tool can be applied (by calling the global function InteractiveModeling_Restart()).
[in] | doc | The active document. Cinema 4D owns the pointed document. |
|
protected |
|
protected |
|
protected |
|
staticconstexpr |
@markprivate
|
staticconstexpr |
@markprivate