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

    Get Group description children

    SDK Help
    0
    22
    11.8k
    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
      Helper
      last edited by

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

      Hi,

      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;
      tempDescription->LoadDescription(node->GetType());
      

      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.

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

        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!

        Cheers!

        :hugging:

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