Merge branch 'main' into release

This commit is contained in:
Skyler Lehmkuhl 2025-01-10 20:17:16 -05:00
commit 1871bb713c
3 changed files with 19 additions and 2 deletions

View File

@ -1,3 +1,10 @@
# 0.7.1-alpha:
New features:
- Added "Duplicate keyframe" menu option
Bugfixes:
- Fix importing from file
# 0.7.0-alpha:
New features:
- Keyframes can now have both motion and shape tweens on the same frame

View File

@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Lightningbeam",
"version": "0.7.0-alpha",
"version": "0.7.1-alpha",
"identifier": "org.lightningbeam.core",
"build": {
"frontendDist": "../src"

View File

@ -2173,7 +2173,7 @@ class Layer extends Widget {
layer.frames = [];
for (let i in json.frames) {
const frame = json.frames[i];
if (frame.frameType=="keyframe") {
if (frame && frame.frameType=="keyframe") {
layer.frames.push(Frame.fromJSON(frame));
} else {
if (layer.frames[layer.frames.length-1]) {
@ -7431,6 +7431,7 @@ async function renderMenu() {
let activeKeyframe;
let newFrameMenuItem;
let newKeyframeMenuItem;
let duplicateKeyframeMenuItem;
let deleteFrameMenuItem;
// Move this
@ -7665,6 +7666,14 @@ async function renderMenu() {
enabled: !activeKeyframe,
action: addKeyframe,
};
duplicateKeyframeMenuItem = {
text: "Duplicate Keyframe",
enabled: activeKeyframe,
action: () => {
context.activeObject.setFrameNum(context.activeObject.currentFrameNum+1)
addKeyframe()
},
};
deleteFrameMenuItem = {
text: "Delete Frame",
enabled: activeFrame,
@ -7677,6 +7686,7 @@ async function renderMenu() {
newFrameMenuItem,
newKeyframeMenuItem,
deleteFrameMenuItem,
duplicateKeyframeMenuItem,
{
text: "Add Motion Tween",
enabled: true,