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

    Setting DESC_MAX

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 291 Views
    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 Offline
      Helper
      last edited by

      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

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

        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

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

          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

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