Dynamic gui for ObjectPlugIn
-
On 06/10/2015 at 11:17, xxxxxxxx wrote:
I want to switch from a ToolPlugIn to a ObjectPlugIn but can't find a way to initialize the gui. In the ToolPlugIn I use "CreateLayout()" to describe the Interface. Is there something similar for ObjectPlugIns or is only possible to set up the interface with the resource files.
regards!
-
On 07/10/2015 at 02:57, xxxxxxxx wrote:
Hi morbo,
welcome to the Plugin Café forums
ToolData plugins are different than all NodeData derived plugin types (like in your case ObjectData).
ToolData plugins implement a dialog for user interaction, while NodeData plugins use Description resources. The Introduction into the GUI of Cinema 4D contains some more info on this topic.The point is, that with Descriptions you describe the parameters of an entity. The parameter values are initialized within the Init() function. Descriptions can also be dynamically set up, but unfortunately here you hit a limitation of the Python SDK. This is only possible with the C++ SDK, there you can use GetDDescription() to dynamically modify the Description. In Python you can only use static Descriptions defined by a resource file.
-
On 07/10/2015 at 07:22, xxxxxxxx wrote:
Thanks for the welcome
Good to know that I can stop searching
And many thanks for the clarification. I was a bit confused not to find the GetDescription() in the Python documentation. First of all, I see no benefit in handling this different then C++ (isn't python here just a wrapper for the C++ classes?) and second it is a bit annoying to mess around with the resource files (especially when you quickly want to add or delete buttons while testing things or when you need to change the gui on the fly).
Hopefully this functionality will be extendet in the future.
regards!