I’m setting the max outputsize for the common render dialog, but I’m having a hard time for the settings to take effect
I’ve tried various things
just before setting the outputsize: renderSceneDialog.close()
after setting outputsize renderSceneDialog.update()
When I do this with buttons, it mostly works
When I do it with spinners, it only works sometimes?!?
on spnWidth changed val do
(
renderSceneDialog.close()
renderWidth = spnWidth.value
)
on spnWidth buttondown do
(
renderSceneDialog.close()
renderWidth = spnWidth.value
)
on spnWidth buttonup do
(
renderSceneDialog.close()
renderWidth = spnWidth.value
)
I do the same for the height, but no matter if the dialog is open, closed or updated I get glitches
Hmm - spinner updates might be a nasty one - they’re constantly updating so your dialog is caught in a hell of open and close as you drag over the spinner - might be better to have an overall apply button for the ui so it’s a single command rather than a constant bombardment of them?
Try using the ‘entered’ event to trigger the update:
(
rollout rSize "Render Size" width:140 height:65
(
on rSize open do
(
rSize.rWidth_sp.value = renderWidth
rSize.rHeight_sp.value = renderHeight
)
spinner rWidth_sp " Width:" pos:[35,10] width:80 range:[1,10000,0] type:#integer
spinner rHeight_sp " Height:" pos:[35,35] width:80 range:[1,10000,0] type:#integer
on rWidth_sp entered do
(
renderSceneDialog.close()
renderWidth = rWidth_sp.value
)
on rHeight_sp entered do
(
renderSceneDialog.close()
renderHeight = rHeight_sp.value
)
)
createDialog rSize
)
John is right though, it can be difficult to get the right value if the user ‘spins’ to enter a value. A plain textBox would be an alternative if you can’t get it working reliably.
That gave me an Idea. Instead of updating the output “realtime”, I’m just going to do it at the end when the user click a button. Will also be a lot less code
Yeah, it’s not as if renderwidth is something you’d be scrubbing up and down to try and find the right spot either - most people have an exact idea of what they want and punch it in right away.