[Closed] New Tool for MaxScript Devs: Interactive Rollout Builder
Fed up of pressing Ctrl+E constantly to make sure all your UI controls are in alignment??
https://davewortley.wordpress.com/2017/07/30/interactive-rollout-builder-for-3ds-max/
Download from Scriptspot:
http://www.scriptspot.com/3ds-max/scripts/interactive-rollout-builder
Explanation Video on my Facebook page:
https://www.facebook.com/MaxMadeEasy/
how is about specific properties for some type of controls: #items, #labels, #bitmap, #color, #opacity, #label on top, etc.?
Give it a try, under the common rollout properties you will get any properties which are specific to the control type. I think I included every single one in the maxscript documentation so please do tell if I’ve missed any!
Defaults per control? or defaults for the whole layout??
I want to be able to save this information so it’s not just session based.
I have the beginnings of the code which allows you to load in your own maxscript file and it will translate it to the datastructure of my tool but this gets reaaaaallly complicated when you have to factor everything that could be in quotes and brackets with escape characters… it needs to be an interpreter, which I think may be beyond maxscript and regex from my experiments…
Thank you for sharing David. Here are a few suggestions:
-
Allow vertical resize of main UI
-
Add rollout options (style, bgcolor, etc.)
-
Save position and size of main UI
-
Save position of new rollout
-
Disable the “tooltip” option for controls that don’t support it
-
Enable/Disable options than don’t work together, like “Custom Width” and “% Width”
-
Enable/Disable “full” and “half” buttons width “Custom Width” checkbox
-
Add option “Use Highlight Color” for Checkbutton. Currently if you set a color there is no way to remove it
-
Add RCMenu support
-
Spinners, enable/disable ‘Field Width’ value when checkbox changes
-
Listbox, Combobox, DDList, Multi Listbox, Radiobuttons add move up/down items
-
Progressbar, when changing from #horizontal/#vertical, could automatically swap its width and height values
-
Any way to avoid UI flickering? (sample code below) Many properties don’t need to reload the Rollout, but other do.
Bugs
- There is an error deleting a ‘group’ (Max 2014)
(
try(destroydialog ::RO1; destroydialog ::RO2)catch()
rollout RO1 "Main" width:216 height:88
(
spinner spn1 "Button Width: " pos:[ 32, 8] width:136 height:16 scale:1 range:[0,200,160] type:#integer
spinner spn2 "Button Pos X: " pos:[ 32,32] width:136 height:16 scale:1 range:[0,200, 24] type:#integer
colorpicker cp "" pos:[115,56] fieldwidth:48 color:((colorman.getcolor #pressedbutton) * 255)
on spn1 changed arg do
(
CTRL = RO2.btn1
HWND = CTRL.hwnd[1]
rect = windows.getwindowpos HWND
windows.setwindowpos HWND CTRL.pos.x CTRL.pos.y arg rect.h true
RO2.btn1.enabled = RO2.btn1.enabled -- redraw?
)
on spn2 changed arg do RO2.btn1.pos.x = arg
on cp changed arg do
(
RO2.btn1.highlightColor = arg
RO2.btn1.enabled = RO2.btn1.enabled -- redraw?
)
)
rollout RO2 "" width:216 height:88
(
checkbutton btn1 "Button" pos:[24,24] width:160 height:32 checked:true
)
createdialog RO1
createdialog RO2 pos:((GetDialogPos RO1)+[240,0])
)
Thanks, Great feedback Jorge.
I’ll try get to all of them… already included a couple in the newest update. Progressbar switches, main Ui is resizable.
http://www.scriptspot.com/3ds-max/scripts/interactive-rollout-builder
Version 1.4 released.
More Rollout properties exposed, annoy everyone with pictorial backgrounds, Bugs fixed with escape characters, duplicate names of controls bug removed.
New Feature: Store and load UIs, have live resize information saved when you resize the dialog. Tooltips disabled for those controls which can’t have it. Rollout Style control…
what i am thinking… instead of re-create every time any control added or changed whole “test rollout” dialog you can use a sub rollout for the test visualization.
the frame dialog will stay all the time but its sub-rollout you can replace with new one. By using this technique and Enable/Disable window redraw you should be able to minimize flickering
I can definitely reduce the flicker for any spinner-type inputs. Just need to do a bit of code refactoring.
Hmm the problem is with changing the size of buttons interactively using the window hWnds is that to make it accurate you need to move all the controls below the button by the delta otherwise you get controls overlapping. I’ve made it flicker much less for moving controls around at least.