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 data in GetDDescription [SOLVED]

    SDK Help
    0
    6
    477
    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

      On 28/08/2015 at 02:47, xxxxxxxx wrote:

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

      ---------
      Hello.

      Inside the GetDDescription method of a tag plugin is use:

      data->SetBool( param1, TRUE) , where data is the returned value of GetDataInstance().
      In a different part of code i use data->GetBool(param1);

      The problem is that the value i get isn't the same as the one i set in GetDDescription.

      What i want to do is enable a checkboxA and the state of another checkboxB set to True as well. 
      How can i do that ?

      Is it a right practice to set data in GetDDescription ?

      Thank you for your time.

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

        On 28/08/2015 at 02:51, xxxxxxxx wrote:

        set the data in GetDParameter() and SetDParameter().

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

          On 28/08/2015 at 03:12, xxxxxxxx wrote:

          It works fine as you said.
          But is it true that i should not set data in GetDDescription?

          Thank you.

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

            On 28/08/2015 at 04:33, xxxxxxxx wrote:

            I'm not 100% sure, I guess the reason is GetDParameter() and SetDParameter() are called when you change values "so they update the container data" , but GetDDescription() somehow is called when you navigate to the values "so you may have multiple attribute managers, each one will display descriptions using GetDDescription(), I guess the behavior is undefined".

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

              On 31/08/2015 at 01:34, xxxxxxxx wrote:

              Hello,

              as Mohamed explained, you can implement SetDParameter() to react to changes of a parameter. There you can synchronize a parameter value with another paramter. GetDDescription is called from the Attribute Manager to obtain information on the object's Description. This can happen multiple times and is not limited to user interaction.

              Best wishes,
              Sebastian

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

                On 31/08/2015 at 02:05, xxxxxxxx wrote:

                Than you very much. 
                In SetDParamater it works great.

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