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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Set initial folded state in A.M. SubGroup

    SDK Help
    0
    2
    220
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 20/10/2004 at 13:06, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.503 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Before continuing: No, the subgroups are DYNAMICALLY created, so including DEFAULT 0|1 in a Description Resource file is out. Just to get that out of the way.

      Here's the code from within NodeData->GetDDescription() :

        
                subgrp = GetCustomDataTypeDefault(DTYPE_GROUP);  
                subgrp.SetString(DESC_NAME, obj->GetName());  
                subgrp.SetBool(DESC_DEFAULT, FALSE); // <- Does not work (as expected since it is for default LONG, Real, Vector values)  
                if(!description->SetParameter(DescLevel(group, DTYPE_GROUP, 0), subgrp, DescLevel(ID_OBJECTPROPERTIES))) return FALSE;  
      

      So, how do I set the initial folded state of the subgroups in this situation? I have noticed that if I open a subgroup interactively in the A.M., load a new object with the PluginObject, the subgroup will be open (and thus the reason why I am certain that SetBool(DESC_DEFAULT, FALSE) is not the right course).

      Thanks,
      Robert

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 21/10/2004 at 18:33, xxxxxxxx wrote:

        Howdy,

        I think that the DESC_DEFAULT flag only applies when the object or tag or what ever is initially created. Once it's created, then the folded/unfolded state is saved with the file. I tried adding that line to the SDK Look at Camera expression and switched it back an forth to TRUE/FALSE, and it seemed to work, but only for when the object is initially created.

        Adios,
        Cactus Dan

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