我是Maxscript的新手,我想知道是否有办法改变微调器的范围值?
spinner ScrollToFrame "Select Frame" type:#integer range:[startFrame, totalFrames, 0]
fn getFrameInfo = (
totalFrames = animationrange.end
startFrame = animationrange.start
)
button updateFrames "Update Frames" align:#left pos:[120, 15]
on updateFrames pressed do (
startFrame = animationrange.start
totalFrames = animationrange.end
-- Code that I thought worked
ScrollToFrame.range:[startFrame, totalFrames, 0]
)
答案 0 :(得分:2)
:
关键字分配适用于控件创建,访问创建的控件时,您必须使用常规=
分配:
try destroyDialog test catch()
rollout test ""
(
fn getFrameInfo =
[animationrange.start, animationrange.end, animationrange.start]
spinner ScrollToFrame "Select Frame" type:#integer range:(getFrameInfo())
button updateFrames "Update Frames"
on updateFrames pressed do (
ScrollToFrame.range = getFrameInfo()
)
)
createDialog test
答案 1 :(得分:0)
getFrameInfo函数应为:
fn getFrameInfo = [animationrange.start, animationrange.end, currentTime.frame as integer]
答案 2 :(得分:0)
范围是属性所以只需指定一个Point3值
spinnername.range = Point3
ScrollToFrame.range = [startFrame, totalFrames, 0]