[Closed] Creating 'sticky' checkbox for certain render settings
Hi,
Complete maxscript novice here. I am trying to write a script which opens a rollout containing certain render settings such as ‘distribute on/off’, ‘displacement on/off’. I have managed to create the checkbox, but at the moment it doesn’t reflect the current settings in scene. Basically if distribute is ‘on’ then I want the checkbox to be checked initially, and if ‘off’ i want it unchecked.
Thanks in advance.
Hey
In your “on myRollout open” function you’ll want to do something along the lines of:
myCheckbox.checked = renderers.current.antialiasing
to retrieve the anti-aliasing render option (just as an example)
Have a look on this page for more scanline renderer options
Thanks for the very quick response Threedian.
Here’s my script.
–
rollout AspectLock “Aspect Ratio Lock”
(
checkbox LockAspect “Lock Aspect”
on LockAspect changed state do (
if state == true then (
rendLockImageAspectRatio = true
renderSceneDialog.update()
)
else (
rendLockImageAspectRatio = false
renderSceneDialog.update()
)
)
)
createdialog AspectLock
Am I way off here? Even the simplest sounding scripts and I seem to be in too deep. No idea where I would add the lines you have mentioned.
Thanks though. At least I know it is possible.
rollout AspectLock "Aspect Ratio Lock"
(
checkbox LockAspect "Lock Aspect"
on LockAspect changed state do
(
if state == true then
(
rendLockImageAspectRatio = true
renderSceneDialog.update()
)
else
(
rendLockImageAspectRatio = false
renderSceneDialog.update()
)
)
-- I added the below
on AspectLock open do
(
LockAspect.checked = rendLockImageAspectRatio
)
)
createdialog AspectLock