Store tool settings while document is open?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/12/2010 at 09:07, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11
Platform:
Language(s) : C++ ;---------
Hi all!
C4d:s internal tools (e.g. Extrude) maintain their settings (e.g. offset) for as long as the document is open. However, ToolData::InitValues is called each time the user selects the tool, and so the settings are reset to default values each time the tool is selected.How do I emulate c4d:s behaviour in this case? My current solution is to store the settings as global variables, which works fine but feels a little "ugly". Does anyone have a more elegant solution?
Best regards
/Filip -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/12/2010 at 09:11, xxxxxxxx wrote:
What I meant to say was GeDialog::InitValues, the settings are stored in the basecontainer of the subdialog allocated in ToolData::AllocSubDialog.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/12/2010 at 02:08, xxxxxxxx wrote:
Why don't you derrive your tool from DescriptionToolData? It gives you a description based dialog and stores it's values automatically into its container. Please have a look at the edgecuttool.cpp file from the SDK examples.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/12/2010 at 03:40, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Why don't you derrive your tool from DescriptionToolData? It gives you a description based dialog and stores it's values automatically into its container. Please have a look at the edgecuttool.cpp file from the SDK examples.cheers,Matthias
Will do. Thanks!
/Filip