hi all,
I'm a beginner in 3dsmax scripting, now I need some help from advanced user here :)
here it is my several questions,
1. can i make the values automatically updated when renderscenedialog get changed? with renderscenedialog.update can't do it.
2. how to make my mapbutton able to drag&dropped and has rightclick menu with cut,copy,paste just like usual mapbutton in max?
3. I have no any idea how to make my renderwidth spinner automatically changed when the renderheight spinner changed with imageaspectratio turn on.
4. my imageaspectratio button is damn failed, please help...
would you guys like to help me? :D thanx a lot
here it is my script
try (destroydialog testing) catch()
Rollout testing "one"
(
spinner widthres "W:"
range:[0,10000,0]
width:60
type:#integer
align:#left
tooltip: "output width"
on widthres changed val do try
(
(RenderWidth = widthres.value)/(getRendImageAspect())
renderSceneDialog.update()
) catch()
spinner heightres "H:"
range:[0,10000,0]
width:60
type:#integer
align:#right
tooltip: "output height"
pos: (widthres.pos+[20,0])
on heightres changed val do try
(
(Renderheight = heightres.value)/(getRendImageAspect())
renderSceneDialog.update()
) catch()
checkbutton lockratio ""
pos: (heightres.pos+[14,0])
width: 16 height: 16
tooltip: "lock image aspect ratio"
on lockratio changed state do try
(
( if state == 1 then getRendImageAspect = true
else ( if state == 0 then getRendImageAspect = true)
renderscenedialog.update)
) catch()
dropdownList areatorender "area to render :"
tooltip:"area to render"
items:#("view","region","crop","blowup")
align: #center
on areatorender selected sell do try
( case areatorender.selection of
( 1: ( setRenderType #view; EditRenderRegion.IsEditing = false() )
2: ( setRenderType #region; EditRenderRegion.EditRegion() )
3: ( setRenderType #crop; EditRenderRegion.EditRegion() )
4: ( setRenderType #blowup; EditRenderRegion.EditRegion() )
)
)catch()
spinner autobackuptime_SPN ""
range:[0,100,15]
width:40
type:#float
tooltip: "autobackup timing in minute"
enabled: false
on autobackuptime_SPN changed val do
(autosave.Interval = autobackuptime_SPN.value)
checkbox autobackup_CB "autobackup"
checked:false
pos: (autobackuptime_SPN.pos+[-115,0])
on autobackup_CB changed state do try (
( autosave.enable = state
autobackuptime_SPN.enabled = not autobackuptime_SPN.enabled
)
) catch ()
mapbutton environment_Mbtn "<>"
on environment_Mbtn picked texmap do try (
(
environmentmap = texmap
environment_Mbtn.text=classof texmap as string
)
) catch ()
on testing open do
(
try (
widthres.value = renderwidth;
heightres.value = renderheight
lockratio.state = getRendImageAspect
areatorender.selection = getRenderType
autobackuptime_SPN.value = autosave.interval
autobackup_CB.state = autosave.enable
)
catch()
)
on testing mousemove pos do --lbuttondown
(
try (
widthres.value = renderwidth;
heightres.value = renderheight
lockratio.state = getRendImageAspect
areatorender.selection = getRenderType
autobackuptime_SPN.value = autosave.interval
autobackup_CB.state = autosave.enable
)
catch()
)
)
createdialog testing width:170 pos: [10,100]--menu: