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

    UserData Group children

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 334 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 29/06/2016 at 05:10, xxxxxxxx wrote:

      Hi everyone.

      I'm in the midst of a complex UserData setup and I'm dynamically managing the gui. I'm trying to find a simple way to remove a group and/or it's children.

      At the moment I'm looking at storing all of the IDs of both the groups and the UserData float sliders etc in arrays. But it's starting to get a bit complex and 3 levels of nested dynamic UserData which can be altered at all levels and groups for formatting is getting a bit 😵.

      But keeping it a bit more simple :

      My question is. If I have the DescID of a group (say Group_02 in the image), is it possible to get the DescIDs of the children (Data_03 & Data_04 in the image) without recursing the whole UserDataContainer (Or without my own stored information)? Is this data even stored anywhere? Or does a UserData BaseContainer only have the data of the parent available?

      http://static1.squarespace.com/static/5500a2cfe4b0373af0c82e15/t/57739dd61b631b664e40dc6b/1467194838513/Screen+Shot+2016-06-29+at+11.03.52.png

      by calling :

      bc[c4d.DESC_PARENTGROUP]
      

      I can get the parent group DescID. I've been rumaging around looking at the flags and can see things like DESC_CHILDREN and DESC_CHILDS but I think they must be used for something else as they return None.

      I guess I can store the IDs in the group BaseContainer when I create the UserData entries myself but I'd only do that if there was not already another way.

      Any help welcome,

      Thanks,

      Adam

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

        On 30/06/2016 at 02:54, xxxxxxxx wrote:

        Hello,

        indeed it seems that it is only possible to get the child elements of a description group by browsing all elements and checking the DESC_PARENTGROUP parameter.

        Best wishes,
        Sebastian

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

          On 30/06/2016 at 03:28, xxxxxxxx wrote:

          Ok thanks for confirming that. I'll store them myself in the container with my own ID instead.

          Thanks,

          Adam

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