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

    DescriptionToolData-InitDefaultSettings

    SDK Help
    0
    3
    271
    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 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

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

        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.

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

          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....

          Peter

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