Get Group description children

  • On 18/08/2016 at 09:07, xxxxxxxx wrote:


    not sure, if you are still waiting for me, here... I'm terribly sorry, but you gave me quite a hard nut and I was stupidly searching at the wrong end. And in the end it was Sebastian, who solved this.

    Cinema 4D calls GetDDescription() quite a bunch of times. Amongst others when building the GUI and during SetParameter(). When building the GUI your code works and so you see the correct entries in the cycle box. But when calling it during SetParameter(), GetDDescription() is called in "single description mode". When in this mode, calling GetParameterI() sets the description into a special mode, with the effect that any following browse will return only one parameter. With your code this has the unfortunate effect, that you won't fill the items container. So SetParameter() thinks, there are no options and the parameter won't be set.

    For you this means, you can either split your loop and first browse/collect the cycle box items before calling GetParameterI().
    Or you can use a second temporary description for your browse loop.

    AutoAlloc<Description> tempDescription;

    The reasons for this behavior seem to be some heavy optimization, but we need to check this with development. Then we will see, how we can document it properly.

    Again, terribly sorry, this took so long.

  • On 18/08/2016 at 09:19, xxxxxxxx wrote:

    Wow, huuuge thanks to you Andreas!
    Also Sebastian, please buy him a beer. ;)

    Indeed I was eagerly waiting for a response to this. And your answer is very enlightening. 
    With this information, I'm able to circumvent this behaviour in future projects and also reduce my current code a lot!



Log in to reply