add Play from Frame button
This commit is contained in:
parent
7ab61ac77d
commit
745a63f1a8
19
src/main.js
19
src/main.js
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue