Hello; here's a collection of more questions / remarks about the Snap module...
(1) The following symbols seem to be obsolete (???):
SNAPMODE_EDGEMID (always True)
SNAPMODE_GUIDEMID (always False)
SNAPMODE_POLYGONCENTER (always True)
SNAPMODE_SPLINEMID (always False)
They have no corresponding setting in the GUI, where we instead find
SNAPMODE_MIDPOINT which works for all snapping modes, so I would assume a combination of e.g.
SNAPMODE_MIDPOINT should be used instead of
SNAPMODE_POLYGONCENTER. (At first, I thought that the
MID modes were binary-or-combinations of
SNAPMODE_MIDPOINT with one of the other modes, but on checking the numeric values of the modes, they don't appear to be part of a bitset.) (OTOH, those four constants have been in the docs for a long time and are still in both the Python and C++ docs... so, is there a hidden meaning?)
(2) The function
c4d.modules.snap.SetSnapSettings(doc, bc, snapmode=NOTOK) has this very mysterious parameter
snapmode. According to the docs, "Optionally specify the snap mode to set the settings for instead of the global settings." This text suggests that each snapmode has a local setting of parameters which are applied if that snapmode is used. -- This is not the same as the "Tool Specific" checkbox, which creates local settings for tools (e.g. Move Tool), not for snapmodes!
However: It doesn't work that way. Using something else for
NOTOK results in that snapmode being activated, and the parameters being set (at least in the R21, in the R23 only the mode is activated), but there is no indication of any "locality" of these settings. The GUI has no option for snapmode-local settings either.
It also makes no sense because multiple snapmodes can be active at the same time - which parameter set would be used then? (Maybe it's a relic from an earlier C4D version...?)
(3) Controlling the checkbox "Tool Specific" through
SetSnapSettings doesn't work:
bc[c4d.SNAP_SETTINGS_TOOL] = True has no effect in either R21 or R23.1. (bc being the base container argument.)
The documentation claims it does. Seems like a bug to me?
(4) And, of course: The mesh check constants are not mentioned at all in the Snap settings page. You can find them on one of the auto-generated "constant" pages:
but the snap overview ignores them. They can be set by
SetSnapSettings so I believe they should be documented there as well.
(5) Finally: The C++ documentation mentions "After changing the snap settings, call
SpecialEventAdd() with ID 440000118 for the snap system to recognize the change." This is not in the Python doc for
SetSnapSettings, so I assume it's not needed there and the Python wrapper already takes care of that call?
Thanks for insights... :grin: