【问题标题】:Creating a Maxscript for Moving Keys为移动键创建 Maxscript
【发布时间】:2020-04-04 07:51:05
【问题描述】:

我正在尝试创建一个 maxscript,它将曲线编辑器中选定的关键帧偏移指定的数量,以帮助制作一些动画,但是我在 max 脚本编写方面的经验为零。我尝试在 scriptspot 上搜索相关工具,但似乎没有一个适合我的需要,并且脚本侦听器无济于事。 目前,我只完成了 UI

rollout MoveKeyTool "Move Key"
(

    group "Settings"
    (
        spinner OffsetBySpn "Offset by" type:#integer
        button OffsetFramesBt "Offset Keyframes"        

        on OffsetFramesBt pressed  do
        (

        )
    )
)
createdialog MoveKeyTool

非常感谢任何帮助或建议,谢谢。

【问题讨论】:

    标签: animation keyframe 3dsmax maxscript


    【解决方案1】:
    try destroyDialog ::MoveKeyTool catch()
    rollout MoveKeyTool "Move Key"
    (
        group "Settings"
        (
            spinner OffsetBySpn "Offset by" type:#integer range:[-1e3,1e3,10]
            button OffsetFramesBt "Offset Keyframes"        
    
            on OffsetFramesBt pressed do
            (
                local currentTV = trackViews.current
                if currentTV == undefined do return messageBox "Trackview window has to be open."
                local selCount = currentTV.numSelTracks()
    
                for i = 1 to selCount
                    where (local ctrl = currentTV.getSelected i).keyable do
                        moveKeys ctrl OffsetBySpn.value #selection
            )
        )
    )
    createdialog MoveKeyTool
    

    【讨论】:

    • 感谢您的回复,但是我收到了错误:未知属性:未定义中的“值”。我现在手动输入“moveKeys $ {value}”作为解决方法
    • 您是否重命名了微调器或以其他方式修改了代码?此外,检查 MAXScript 侦听器以获取完整的堆栈跟踪和错误上下文。
    猜你喜欢
    • 2015-11-10
    • 1970-01-01
    • 1970-01-01
    • 2019-08-22
    • 1970-01-01
    • 1970-01-01
    • 2020-06-21
    • 1970-01-01
    • 2018-03-04
    相关资源
    最近更新 更多