Right Click for custom default value
How do you do this when you have the code for the spinner button like so:
spinner spn_output_width "" pos:[48,64] width:56 height:16 range:[2,32768,1]
I've tried:
on spn_output_width rightclick do ( print "btn_A was rightclicked" )
I want the lowest value to be 2 for the spinner but when I right click I want it to be a different value.
Thanks in advance.
Comments
I've changed the title of this thread..
as to not complicate things and I sometimes find it easier to see the progression of the learning process in one place so all the learning I do will be in one place (here). I do have experience with scripting but there's a long way to go before I get to where I want. Anyway. I'm blabbering, back to the task at hand.
With regard dotNet and to be precise the "System.Windows.Forms.ComboBox"
Here's my code so far minus the other functionality which is striped out for clarity proposes: (I've dragged the dotNet from varies places and modified slightly to suit.
What I'm missing from the functionality is:
- I want the default text of the Combobox to be 'Choose Camera...' with a list of camera which I already have below.
- Renaming of the selected camera directly inside the ComboBox. Tabbing or hitting return will rename the camera.
- If I change a spinner/s it will rename the selected camera. (See screenshot of script)
- If I tab out of the ComboBox then it will go over to a spinner
- When a camera with correct formatted name i.e 'cam name 1000x600' whereby cam name is what you think and the 1000x600 is the dimensions of the output inside max. (not VRays framebuffer)
My future plans for the script are mainly allowing to render out the preselected cameras but for now I'm happy to get the above to work.
.NET makes this more feasible
.NET makes this more feasible and understandable. .NET made the programming language so easy. I think second example is best suitable for this.
.
Use the dotNet spinners
Default 3dsma spinners do not have rightclick evenet.
Or place small button next to the spinner's arrows and tell the users to press that button instead of rightclick over the arrows. When the button is pressed change the range properlty to desired value.
Tools and Scripts for Autodesk 3dsMax
Thanks
I was thinking that it needed to be by dotNet. I can't seem to find any good examples, least for what I require. The only added function I need over default max spinners is the right click to default value. Have you a snippet of example code that could help me get started? Thanks.
.
Link 1
Link 2
Link 3
Tools and Scripts for Autodesk 3dsMax
.
Thank you Miauu.. I've since came across those. For now it's seems like a lot of extra work to incorporate that into all the spinners for this script.
I keep note for the next script where I can start afresh.