This documentation is for the free plugin Py4D in CINEMA 4D R11.5 and not for the C4DSDK of Python in CINEMA 4D R12. For R12, please visit PluginCafe.com
A data class for creating tool plugins. Use RegisterToolPlugin() to register the plugin.
//Methods to override
Override - Called each time the tool is selected.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Returns: | True if there was no error, otherwise False. |
Override - Called each time the user chooses another tool.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Returns: | True if there was no error, otherwise False. |
Called to let you intialize the default tool settings in data.
| Parameters: |
|
|---|
Override - Called when the user clicks with the mouse in any of the editors views.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Returns: | False if a problem occured during this function. |
Override - Called when the user types something in any of the editors views.
Note
Make sure that you only use this function when the user is somehow working with your plugin, so that other plugins can also use this hook when it’s their turn.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Returns: | False if a problem occured during this function. |
Called to check if the tool should be enabled, checked or not.
| Parameter: | doc (BaseDocument) – The document the tool is being used in. |
||||
|---|---|---|---|---|---|
| Return type: | int |
||||
| Returns: | The return flags are stored in c4d.gui:
|
Called when the cursor is over editor window to get the state of the mouse pointer. You can set the bubble help and cursor using for example:
bc.SetString(RESULT_BUBBLEHELP, "My Tools Help");
bc.SetLong(RESULT_CURSOR, MOUSE_POINT_HAND);
| Parameters: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Return type: | bool |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Returns: | False if a problem occured during this function. |
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 stored in c4d:
|
Called to get a GUI for the Active Tool window. Return an instance of your tool’s dialog.
| Parameter: | bc (BaseContainer) – Currently not used. |
|---|---|
| Return type: | SubDialog |
| Returns: | The allocated sub dialog. |
Called to get a GUI for the Active Tool window. Return an instance of your tool’s dialog.
| Parameters: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Return type: | bool |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Returns: | The value depends on the message type. |