Any examples of how c4d.gui.BaseCustomGui works?
-
Hello,
I want to implement BaseCustomGui but having trouble with the setup. I have been searching but cannot find any examples online how to set it up using python. Thanks for any tips!
https://developers.maxon.net/docs/py/2023_2/modules/c4d.gui/BaseCustomGui/index.html
-
Hello @gsmetzer,
Thank you for reaching out to us. What you want to do here is not possible.
In the Cineam 4D (classic) API exist two ways to implement a custom GUI gadget.
- iCustomGui [C++ only]: Realizes a GUI gadget used as an attribute UI of a scene element displayed in the Attribute Manager. It is the implementation backend for a custom GUI which targets a data type. So, one can for example write a custom GUI for the datatype
DTYPE_VECTOR
or custom data type provided by oneself. This form of GUI gadget is used in descriptions resources. - GeUserArea[Python/C++]: Realizes a GUI gadget that can be used in a
GeDialog
(and its derived types). This form of GUI gadget is used in dialog resources or can be attached directly withGeDialog.AttachUserArea
.
So, in C++ there is frontend-backend pair
BaseCustomGui
andiCustomGui
, just as for example it is the case withBaseObject
andObjectData
. ABaseCustomGui
is just the front end for aiCustomGui
implementation.In Python it is not possible to create custom GUI gadgets to be used in descriptions. But you can do it for dialogs. We have three
GeUserArea
Python examples:Cheers,
Ferdinand - iCustomGui [C++ only]: Realizes a GUI gadget used as an attribute UI of a scene element displayed in the Attribute Manager. It is the implementation backend for a custom GUI which targets a data type. So, one can for example write a custom GUI for the datatype
-
This is an excellent explanation , thank you.