In “Customize Commands” I can find some of the tags like riged body, soft body, Collider body, Ghost body but I cant find the tags like cloth belt, cloth, cloth collider, compositing, xpresso, Protection… and other often used tags. What did I wrong?
What you find in “Customize Commands” is not the tag itself but a command that creates that tag. Tags are not commands or objects or tools etc, so they are not supported in the customizer. (Don’t ask me why tags are not just handled like objects, there is probably a reason for that.)
To overcome this limitation, you can create a script that adds your tag:
- open script log
- perform your tag creation
- store this script under some proper name, sans the code to open the script manager naturally…
- copy the tag’s icon (you may want to resize and adapt it a bit, and add transparency, or copy it from the internal icon plates to get the default transparency)
- assign icon to the script by storing the icon as tif image under the same name as the .py script in the scripting directory
Now you can find this script under the customizer and add it to your layout.
Sorry this is a bit hard for me becouse I never opened the script log so I can t use it
How can I perform the tag creation?
…that’s simply opening a window? The Script Log automatically logs all the stuff you do in C4D. If you open it, you will see a script already:
import c4d from c4d import documents, plugins #Welcome to the world of Python def main(): c4d.CallCommand(300000116, 300000116) # Script Log... if __name__=='__main__': main() c4d.EventAdd()
The line with the Script Log is, naturally, pointless for the purpose. Click the circled X in the upper right corner (not the Windows control) to delete the active lines from the current script; it will now show “pass” instead of the CallCommand.
Create any tag you want on any object you want. The Script Log will immediately replace the “pass” with the necessary commands:
import c4d from c4d import documents, plugins #Welcome to the world of Python def main(): c4d.CallCommand(5629) # c4d.CallCommand(100004788, 50018) # New Tag if __name__=='__main__': main() c4d.EventAdd()
In this case I created a Protection tag.
Use the right mouse menu on the Script Log to select all and copy the contents.
Open the Script Manager and use the menu to create a new Python script.
Paste the stuff from the Script Log there.
Save it under a proper name. Assign a shortcut if you like.
Now you can already open the Customizer and put the new script in some layout. There is only the default icon so far, so you will want to show the script by name. If you want an icon, use the steps from my previous post to create one.
It worked thanks!