I’m trying to hide the axis plane indicator by setting e.g. TranslateXYEnabled to false. I was able to hide most of the gumball like this but it doesn’t work for these indicators. Is there a different setting or maybe a bug?
This only works on a custom gumball handler that you are working on. It does not effect Rhino’s built-in gumball.
you could set the plane size to zero to hide all 3 planes in Rhino’s gumball eg:
import Rhino def DoSomething(): rhino_id = Rhino.RhinoApp.CurrentRhinoId settings = Rhino.PlugIns.PlugIn.GetPluginSettings(rhino_id, False) s = settings.GetChild("Options").GetChild("Gumball") s.SetInteger("PTranSize", 0) DoSomething()
I have a custom gumball handler so that’s fine. And I can influence the appearance up to the point where I want to hide these indicators. I expected them to hide as soon as I disable the XY, YZ, ZX translation but they are still visible.
I also tried to use the PlanarTranslationGripSize which works fine so far and hides the indicators but now they are hidden all the time, even for the standard gumball. I wouldn’t expect that behavior when changing just the appearance of a custom gumball.
For me, both solutions would be fine but none of them is working and I would consider both cases a bug.
Any further ideas on this?
my example above is about to work for Rhino’s gumball not a custom based one. I’ve used custom gumballs over here too (in a conduit) and it seems to be possible to hide the planes without affecting the build in gumball.
I’d suggest to post an example snippet so @dale can repeat and probably fix this.
I created this sample code which reproduces my issue for me very easily. It still shows the indicator and I want to get rid of that and just show the axes.
var appearance = new Rhino.UI.Gumball.GumballAppearanceSettings(); appearance.RotateXEnabled = false; appearance.RotateYEnabled = false; appearance.RotateZEnabled = false; appearance.TranslateXYEnabled = false; appearance.TranslateZXEnabled = false; appearance.TranslateYZEnabled = false; appearance.ScaleXEnabled = false; appearance.ScaleYEnabled = false; appearance.ScaleZEnabled = false; appearance.RelocateEnabled = false; appearance.MenuEnabled = false; myGumballDisplayConduit = new Rhino.UI.Gumball.GumballDisplayConduit(); var gumballObject = new Rhino.UI.Gumball.GumballObject(); var frame = gumballObject.Frame; frame.Plane = new Rhino.Geometry.Plane(Rhino.Geometry.Point3d.Origin, new Rhino.Geometry.Vector3d(1, 0, 0), new Rhino.Geometry.Vector3d(0, 1, 0)); gumballObject.Frame = frame; myGumballDisplayConduit.SetBaseGumball(gumballObject, appearance); myGumballDisplayConduit.Enabled = true;
i was able to repeat what you see. If i have set my Plane size for Rhino’s build in gumball to 20 like below:
…and then run a script which creates a custom gumball for use in a conduit by defining the custom gumball settings like so:
appearance = Rhino.UI.Gumball.GumballAppearanceSettings(): appearance.PlanarTranslationGripSize = 0
…the gumball shown in the conduit starts with the planar translation items VISIBLE. Once i use the custom gumball eg. by translating or rotating it for the first time, the planar translation items get invisible. After i exited my command and check in Rhino’s build in Gumball options page (shown above), the value for Plane size was changed to zero.
The only way to circumvent that was to reset the
PlanarTranslationGripSize value back to 20 when i dispose my conduit (when my command ends).
I even get this behaviour if i sublass
GumballAppearanceSettings which is strange. It happens in Rhino 6 and 7.
thank you for reproducing the issue! I’m facing the same behavior that the plane size seems to be set on a global level although it’s just a local instance of GumballAppearanceSettings. I don’t get this behavior and I also assumed that disabling the translations as I did in my code would hide the indicators (as it did for all the other indicators for translation and rotation).
I don’t see a workaround here because I also don’t want to hide the indicators for regular gumballs while my custom gumball is shown.
Does setting GumballAppearanceSettings.PlanarTranslationGripSize to
I tried this and it works but it hides this for all gumballs, including the ones from Rhino when transforming an object.