set data in GetDDescription [SOLVED]
-
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.
-
On 28/08/2015 at 02:51, xxxxxxxx wrote:
set the data in GetDParameter() and SetDParameter().
-
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.
-
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".
-
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 -
On 31/08/2015 at 02:05, xxxxxxxx wrote:
Than you very much.
In SetDParamater it works great.