when using "UISliderFloat->onChange" how can i get the slider instance inside of that callable? def changeit(): #hiw to get the slider? myslider = mset.UISliderFloat() myslider.onChange = changeit ------ or is it even possible to use parameter within that callable?
One option is to use a class, and to make myslider a member variable of that class. You can find a similar example of that in the Generate Primitives example in Toolbag, but here's an example: import mset class MyPlugin: window = mset.UIWindow("My Plugin") slider = None def sliderChangeCallback(self):…