Anyone? Should I assume there is no way to access this setting (Get/Set) via Python or RhinoCommon ?
thx,
–jarek
Anyone? Should I assume there is no way to access this setting (Get/Set) via Python or RhinoCommon ?
thx,
–jarek
Answering my own question here, since I found it via digging in and modifying one of Steve’s sample - this will allow to access a lot of custom settings:
import Rhino
settings = Rhino.PlugIns.PlugIn.GetPluginSettings(Rhino.RhinoApp.CurrentRhinoId, False)
s = settings.GetChild("Options").GetChild("General")
print s.GetBool("MiddleMouseViewManipulationMode")
hi @stevebaer,
When I use the code below to set the setting, it has no effect until the script ends - is there a way to make it kick in right away in script runtime?
import Rhino
settings = Rhino.PlugIns.PlugIn.GetPluginSettings(Rhino.RhinoApp.CurrentRhinoId, False)
s = settings.GetChild("Options").GetChild("General")
s.SetBool("MiddleMouseViewManipulationMode",False)
I was trying SaveSettings
or RaiseOnPlugInSettingsSavedEvent
() but no luck. Anything to make the change take immediate effect?
thanks,
–jarek
Probably not; I would guess the code that looks at this setting doesn’t check the setting value all of the time
Hi @steve,
I was trying to take advantage of the SkylightDegradation advanced options in script runtime (set it to low quality, and restore back after script ends). I am running into the same issue when change to advanced options does not take effect until the script finishes. I REALLY could use the way to instantly refresh the setting from the script. Do you have any suggestions or could anything be added/fixed to make this happen?
In this case what I am trying to do is with camera movements simulate what Rhino view changes do: degrade skylight quality while view is “on the move” - scripted camera changes by default don’t take advantage of it and I need to make it work for major speed gains with SkylightShadows…
sample code here:
thank you
–jarek
Hi @Jarek,
How can I set the MiddleMouseToolbarName by python?
Hi Alen,
I would use this:
import Rhino.ApplicationSettings as appsettings
appsettings.GeneralSettings.MiddleMouseMode = appsettings.MiddleMouseMode.PopupToolbar
appsettings.GeneralSettings.MiddleMousePopupToolbar = "Default.Properties"
the 2nd line sets the MMB mode to Toolbar, you may not need it. The last line defines the name of the popup toolbar. You can change the string to the toolbar you need.
hth,
–jarek
Thank you very much. It works done.