add Play from Frame button

This commit is contained in:
Skyler Lehmkuhl 2024-12-18 19:12:24 -05:00
parent 7ab61ac77d
commit 745a63f1a8
1 changed files with 16 additions and 3 deletions

View File

@ -117,10 +117,23 @@ let tools = {
}
}
},
"play": {
"playFromFrame": {
type: "boolean",
label: "Play",
enabled: () => context.selection.length==1
label: "Play From Frame",
enabled: () => context.selection.length==1,
value: {
get: () => {
if (context.selection.length != 1) return undefined
const selectedObject = context.selection[0]
return context.activeObject.currentFrame.keys[selectedObject.idx].playFromFrame
},
set: (val) => {
if (context.selection.length != 1) return undefined
const selectedObject = context.selection[0]
context.activeObject.currentFrame.keys[selectedObject.idx].playFromFrame = val
updateUI()
}
}
}
}