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

    Store tool settings while document is open?

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

      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

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

        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.

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

          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

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

            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

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