I wanted toknow whether it is possible to show/hide tabs in the GUI (like the Fields tab in the VertexMap) if the Tabs / Groups have been defined in the resource file. Or do I have to add/remove them dynamically through description handling?
as always, please use the Q&A system to mark your post as a question.
do you mean with GUI the parameter description of a NodeData based plugin?
You can only hide description elements through "description handling". So in your plugin, you must implement GetDDescription().
You can load the description defined in the *.res file using Description.LoadDescription().
Then you can edit that description e.g. hide some parameter or some group. You access an existing parameter description using Description.GetParameterI().
To hide an element, you have to set the setting DESC_HIDE.
This example hides the ID_BASELIST_ICON_SETTINGS_GROUP group from the description:
def GetDDescription(self, node, description, flags):
if not description.LoadDescription(node.GetType()):
descID = c4d.DescID(c4d.DescLevel(c4d.ID_BASELIST_ICON_SETTINGS_GROUP, c4d.DTYPE_GROUP, 0))
db = description.GetParameterI(descID)
return True, flags | c4d.DESCFLAGS_DESC_LOADED
sorry, for not using the QA System, will do in the future!
This was exactly what I needed. I have never changed my GUI outside the res file and it felt kinda confusing to me what exactly I have to do after reading the doc.
Thanks for your awnser!