Hi,
Is there a way to disable the the gumball during on rhinoObject selectet by either turning off the gumball function or disabling the default gumball conduit programmatically?
cheers,
Jeremy
Hi,
Is there a way to disable the the gumball during on rhinoObject selectet by either turning off the gumball function or disabling the default gumball conduit programmatically?
cheers,
Jeremy
I found this in the documentation
You can use it like this to temporarily disable the gumball:
protected override Result RunCommand(RhinoDoc doc, RunMode mode)
{
bool wasEnabled = ModelAidSettings.AutoGumballEnabled;
try
{
ModelAidSettings.AutoGumballEnabled = false;
Result res = RhinoGet.GetOneObject("Select object", false, ObjectType.AnyObject, out var objRef);
if (res != Result.Success)
return res;
doc.Objects.Select(objRef, false);
doc.Views.Redraw();
res = RhinoGet.GetOneObject("Select another object (no gumball!)", false, ObjectType.AnyObject, out objRef);
if (res != Result.Success)
return res;
return Result.Success;
}
finally
{
ModelAidSettings.AutoGumballEnabled = wasEnabled;
}
}
Awesome, thanks mate!