2014-09-12 61 views
0

我是Maxscript的新手,我想知道是否有方法來改變微調範圍的值?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] 
) 

回答

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 
+0

微調器不滾動數字,它卡在起始數字上。 – Djmann1013 2014-09-15 15:23:50

0

的getFrameInfo功能應該是:

fn getFrameInfo = [animationrange.start, animationrange.end, currentTime.frame as integer] 
0

的範圍是屬性,所以只需指定一個Point3值

spinnername.range = Point3

ScrollToFrame.range = [startFrame, totalFrames, 0]