RDS Casa Posted December 5, 2017 Share Posted December 5, 2017 Hello I thought I would share this. I have tried to hack the slider code, so that it inputs a dimension in mm, not an integer.... It only goes and works!!!! at least it appears to? I tried it in a imperial inches and a yards file and it worked. No one is more surprised than me. Use with caution... because it might cause problems. If someone wiser than me would like to check and correct, please do. Edit the slider code, remove the #grey text at the top. Replace the whole content with: #fjs 05.12.17 @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): this = Marionette.Node( 'Dim Slider' ) this.SetDescription('An dimension value corresponding to the location on the slider. The range of the slider is defined by the two last values in the Int variable within the script.') #NOTES ON USE #Marionette.OIPControl( '[NAME]', Marionette.WidgetType.Slider, [DEFAULT VALUE (integer)], 'description', [MIN VALUE], [MAX VALUE]) dim = Marionette.OIPControl( 'Dimension mm', Marionette.WidgetType.Slider, 620, 'description', 300, 900) dim.SetDescription('An OIP slider') d = Marionette.PortOut('Dim') d.SetDescription('A slider OIP control that accepts unit indicators') def RunNode(self): units = vs.GetPrefReal(150) self.Params.d.value = self.Params.dim.value/units 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.