Set initial folded state in A.M. SubGroup



  • 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



  • 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


Log in to reply