How to access Quantize information?

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?

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

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

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!