Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
On 20/11/2013 at 21:50, xxxxxxxx wrote:
User Information: Cinema 4D Version: 15 Platform: Windows ; Mac ; Mac OSX ; Language(s) : C++ ;
--------- In DescriptionToolData, when gets DescriptionToolData::InitDefaultSettings actually called?
The SDK info seems to imply that I use it to set my gadgets to their defaults. But at least in my code it never seems to go there.
At the moment I am using DescriptionToolData::InitTool to set the defaults but since that happens every time my tool gets called it's not ideal.
Am I missing something?
Thanks
Peter
On 20/11/2013 at 23:45, xxxxxxxx wrote:
Hi Peter,
DescriptionToolData::InitDefaultSettings() is called once, at its first execution, to set the default value of its settings.
Are you sure you use the right prototype? It's void DescriptionToolData::InitDefaultSettings(BaseDocument* doc, BaseContainer& data)
See its simple implementation in the R15 SDK example SculptDrawPolyTool ( sculpting\drawpoly.cpp ). I put a breakpoint in it and it's called as expected by CINEMA.
On 22/11/2013 at 12:31, xxxxxxxx wrote:
Thanks for the tip.
I didn't realize I also need this line in my function: DescriptionToolData::InitDefaultSettings(doc, data); Now it works. Although I don't exactly know why....