Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Tool Tabs and foldable groups

    Cinema 4D SDK
    python
    2
    2
    373
    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.
    • B
      BretBays
      last edited by

      I am working on a ToolData plugin , and it's going well enough at the moment. But I see various UI elements that I cannot seem to find any documentation on how to achieve. The best example I can give is the Extrude Tool(although there are many tools that work in this way).

      How do you create the tabs like in the extrude tool where you can select 1 or multiple tabs and display all the UI elements? The tabGroupBegin was where I thought but it seems to be strictly tabs, radios, or drop down.

      The other thing that is interesting is the foldable sections. Is that using BFV_BORDERGROUP_FOLD or is that something much more complex?

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @BretBays
        last edited by ferdinand

        Hello @BretBays,

        Thank you for reaching out to us. Please provide code and a clear problem description as statements like `How do you create the tabs ... I tried X but it only creates tabs' are a bit confusing for us.

        • There are two ways to create tab interfaces, one is via groups and the method GeDialog.TabGroupBegin and the other one is via CUSTOMGUI_QUICKTAB. We have a code example for it in Python here. The "tab-look" of descriptions, i.e., what you usually see in the Attribute Manager, is achieved with CUSTOMGUI_QUICKTAB.
        • There is no group folding in dialogs anymore, this feature has been deprecated (we probably should update the docs).

        There is a difference between dialogs and descriptions. They use similar UI elements but they are not the same. Folding in descriptions is still supported, in dialogs not (but you can implement it yourself when you really need it). You should also be aware that there are ToolData and DescriptionToolData plugins. The former tool type uses dialogs to display its UI in the Attribute Manager, and the latter uses descriptions. Most tools these days in Cinema 4D are implemented as DescriptionToolData which leads to a distinctive look and set of features which are not trivial to emulate with a plain ToolData.

        ToolData is exposed in Python and C++, DescriptionToolData is only exposed in C++. My colleague @m_adam likes to point out whenever this subject comes up that the type SculptBrushToolData is exposed in Python (which is derived from DescriptionToolData) and that you can (ab)use it to implement a DescriptionToolData in Python. I never tried doing that and what consequences that would have (and neither did Maxime AFAIK). For my taste that would be way too hacky, and I would rather just live with the minor restrictions of ToolData plugin and its dialog based UI.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

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