Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Dynamic gui for ObjectPlugIn

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 303 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post