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

    How to access Quantize information?

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 337 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 10/09/2008 at 14:53, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi;

      how do I access the Quantize information programmatically? The AM shows it as part of the Move / Rotate / Scale tools (Snap settings -> Quantize), however, the tools share the same underlying values. What's the proper way to read and set those?

      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 14/09/2008 at 09:56, xxxxxxxx wrote:

        Hi again;

        no replies yet, so I searched through the sources textually. There seem to be no regular functions to access the Quantize information, but naturally I can look into the Description of the Tool dialog, which says

        BOOL SNAP_LOCAL_MOVEENABLE { }
        REAL SNAP_LOCAL_MOVE { UNIT METER; }

        Now, I naively assume that I could set these values in the BaseContainer they're in, and thereby change the information and the application's behavior. But where can I find this Container? For objects or tags, this is easy, but generally speaking:

        Where do I find the BaseContainers for built-in tools (and other objects that are not part of the object tree)?

        Seems I'm missing a rather large chunk of very basic information here... thanks in advance for any hint...

        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 22/09/2008 at 07:38, xxxxxxxx wrote:

          You have to use GetSettingsInstance() to obtain the snap settings container. Example:

          > \> Bool MenuTest::Execute(BaseDocument \*doc) \> { \>      StopAllThreads(); \> \>      BaseContainer \*bc = doc->GetSettingsInstance(SETTINGS_MODELER); \> \>      bc->SetBool(SNAP_LOCAL_MOVEENABLE, TRUE); \>      bc->SetReal(SNAP_LOCAL_MOVE, 100.0); \> \>      doc->Message(MSG_UPDATE); \> \>      EventAdd(); \> \>      return TRUE; \> } \>

          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 22/09/2008 at 14:44, xxxxxxxx wrote:

            Oops, so I was looking in the wrong containers... thanks for the info!

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