[Closed] Render output size window
im trying to work on my max scripting an wanted to make a simple roll out
that can have a drop down that i can add screen size we use often here at work so i don’t have to keep typing them is there any way to access the render output setting to do so?
Thanks
Or you can use this
try destroyDialog ::renderPresetDialog catch()
rollout renderPresetDialog "Render Presets"
(
local whArr = #("320 | 240", "640 | 480", "800 | 600", "1280 | 720" , "1920 | 1080")
dropdownlist ddL_outputs "Render Width\Height:" width:120 pos:[5,5] items:whArr selection:2
button btn "Set" pos:[130,23] height:21 width:40
checkbox cb "Reverse Width\Height" pos:[5,49]
on btn pressed do
(
local rwh = filterstring ddL_outputs.items[ddL_outputs.selection] " | "
if not cb.checked then
(
renderWidth = rwh[1] as integer
renderHeight = rwh[2] as integer
)
else
(
renderWidth = rwh[2] as integer
renderHeight = rwh[1] as integer
)
renderSceneDialog.update()
free rwh
)
)
createDialog renderPresetDialog 175 70
From MaxScript Help:
Note:
Changing the render scene dialog settings via MAXScript should be done with the actual render scene dialog in a closed state.Leaving the dialog open will make the attempted MAXScript modifications non-sticky.
For that i add renderSceneDialog.update() at the and of code.
You can add two spinners for custom renderWidth and [color=DarkOrchid]renderHeight [/color]values or extend “whArr ” with your numbers
Hi I’ve been following along in the background and have never seen an array value split the way that you managed here using ” | ” between the array items. Is this information in the help file and if so where did you find it? Is it the filterstring that allows this?
Thanks Luke
Token string can be any string. Filterstring is mainly used when you have some text and you want to collect every word separately.(In mxs help topic “StringValue”)
<array of strings>[b][i]filterString[/i][/b] <string> <token_string> [[i][b]splitEmptyTokens[/b]:[/i]<boolean]
filterString "MAX Script, is-dead-funky" ", -"
#("MAX","Script","is","dead","funky")