UserData Group children



  • 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



  • 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



  • 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


Log in to reply