SendModelingCommand for Magnet Tool
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/08/2006 at 18:31, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.1
Platform: Windows ;
Language(s) : C++ ;---------
I try to use SendModelingCommand with the magnet tool. However, it returns false in any case.Can anyone show me a working example for using the magnet tool with SendModelingCommand? I'm not even sure how it is intended to work, because the magnet tool requires mouse input.
Here's the code I'm using. I set all parameters, except two which I don't know what they are for and what type they are.
// init ModelingCommandData
ModelingCommandData mc;
mc.doc = doc;
mc.op = obj;
mc.mode = MODIFY_ALL;
mc.flags = 0;
BaseContainer bc;
mc.bc = &bc;// magnet tool parameters
bc.SetBool(MDATA_MAGNET_NEAREST, false);
bc.SetBool(MDATA_MAGNET_VISIBLEONLY, false);
bc.SetBool(MDATA_MAGNET_CONNECTED, false);
bc.SetBool(MDATA_MAGNET_PREVIEW, false);
bc.SetLong(MDATA_MAGNET_MODE, MDATA_MAGNET_MODE_BELL);
bc.SetLong(MDATA_MAGNET_RESTRICT, MDATA_MAGNET_RESTRICT_WORLD);
bc.SetReal(MDATA_MAGNET_RESTRICT_X, 1);
bc.SetReal(MDATA_MAGNET_RESTRICT_Y, 1);
bc.SetReal(MDATA_MAGNET_RESTRICT_Z, 1);
bc.SetReal(MDATA_MAGNET_FALLOFF_STRENGTH, 1);
bc.SetReal(MDATA_MAGNET_FALLOFF_RADIUS, 100);
bc.SetReal(MDATA_MAGNET_FALLOFF_WIDTH, 0.5);
//bc.SetData(MDATA_MAGNET_SELECTED, );
//bc.SetData(MDATA_MAGNET_FALLOFF, );if (!SendModelingCommand(ID_MODELING_MAGNET_TOOL, mc)) GePrint("Error");
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/09/2006 at 14:57, xxxxxxxx wrote:
I'm afraid the magnet tool can only be used interactively by the user, not using SendModelingData()!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/09/2006 at 17:21, xxxxxxxx wrote:
Thanks. Then the ID_MODELING_MAGNET_TOOL id for SendModelingCommand is rather useless.