3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
insert_in_toolset.py

Insert the command into the Sculpt toolset.

Insert the command into the Sculpt toolset

1# The tool insertion example - insert the tool that shows the "Hello world!"
2import coat
3# add the translation of the identifier "test_script"
4coat.ui.addTranslation("test_tool", "The Tool")
5# if the command is not inserted into the toolset, we insert it there
6if not coat.ui.checkIfMenuItemInserted("test_tool"):
7 coat.ui.insertInToolset("Voxels","Adjust","test_tool")
8 coat.dialog().text("The 'test_tool' inserted into the Sculpt->Adjust->The tool.").ok().show()
9else:
10 # ... if inserted, we execute the action
11 coat.dialog().text("Hello world!").ok().show()
Definition coat.py:3433
insertInToolset(roomID=str, section=str, toolID=str, script_path=str)
Insert the script-based tool into the toolset.
Definition coat.py:3325
addTranslation(id=str, text=str)
Add the translation for the text identifier.
Definition coat.py:3352
bool checkIfMenuItemInserted(ID_in_menu=str)
Check if the command inserted somewhere into the menu.
Definition coat.py:3334