Setting DESC_MAX



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

    On 03/11/2008 at 12:14, xxxxxxxx wrote:

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

    ---------
    I want to set the DESC_MAX of a LONG description in my plugin object. It must be done from the ::GetVirtualObjects() function, and not from the ::GetDDescription() function, because the new MAX value depends on things that happend in the scene.

    Tried it like this:

    > Bool SetDescriptionMax(BaseObject \*op, LONG MyDescID, LONG Value) \> { \>      AutoAlloc<AtomArray> ar; if(!ar) return FALSE; \>      AutoAlloc<Description> desc; if (!desc) return FALSE; \>      ar->Append(static_cast<C4DAtom\*>(op)); \> \>      op->GetDescription(desc, 0); \>      BaseContainer \*bc = desc->GetParameterI(DescLevel(MyDescID), ar); \>      if (bc) bc->SetLong(DESC_MAX, Value); \>      else return FALSE; \> \>      return TRUE; \> }

    But it doesn't work. Nothing happens. Debugging the function showed me that it runs fine and returns TRUE, but the MAX value of my description is not changed, I can still input values greater than the desired value in the Attribute Manager.

    How does this work?

    Thanks in advance for any help!

    Greetings,
    Jack



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

    On 04/11/2008 at 02:21, xxxxxxxx wrote:

    You have to use GetDDescription(). If you have to detect changes in GetVirtualObjects() than store this for instance in sub-container in your object's own container. Read this out in GetDDescription() and make your changes to the description.

    cheers,
    Matthias



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

    On 04/11/2008 at 12:26, xxxxxxxx wrote:

    OK, will do.
    Thanks once again, Matthias! :)

    Greetings,
    Jack


Log in to reply