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
    The Maxon SDK Team is currently short staffed due to the winter holidays. No forum support is being provided between 15/12/2025 and 5/1/2026. For details see Maxon SDK 2025 Winter Holidays.

    PriorityData [SOLVED]

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 326 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

      On 18/04/2015 at 00:14, xxxxxxxx wrote:

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

      ---------
      In converting a plugin to C++ I'm looking to set data. I found that I could use SetParameter to do so in C++, but one type of data doesn't seem to work like this, when I do this code:

        
      AutoAlloc<PriorityData> priority;  
                    priority->SetPriorityValue(PRIORITYVALUE_MODE, CYCLE_EXPRESSION);  
                    priority->SetPriorityValue(PRIORITYVALUE_PRIORITY, 1);  
                    conCnstTag->SetParameter(DescID(EXPRESSION_PRIORITY), GeData(priority), DESCFLAGS_SET_0);  
      

      it fails to compile. Apparently GeData can't handle setting ProrityData?

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

        On 20/04/2015 at 07:10, xxxxxxxx wrote:

        Hello,

        could you please share the compile errors with us?

        PriorityData does not provide access to it's constructor and doesn't have static Alloc() and Free() functions. So it is not possible to use AutoAlloc with that class.

        So you have to edit the existing data. If you want to change a parameter on an object simply access that parameter with GetParameter() and get the custom datatype with GetCustomDataType(). Then you can edit the PriorityData and use SetParameter() to set the new value.

        You find an example on how to do this in the "Look at Camera" plugin in the SDK.

        Best wishes,
        Sebastian

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

          On 20/04/2015 at 20:29, xxxxxxxx wrote:

          Thanks, that worked out. I spend days looking up this stuff sometimes. Even with the search functions in the C++ docs the relations between things just don't really come together sometimes. I guess it also doesn't help that on occasion the way something is done in Python in C4D is totally different from the C++ version in name and function. Thanks again for the answers.

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