|
@@ -14,11 +14,11 @@
|
|
|
@change-frame-action="(f) => (frameAction = f.action)"
|
|
|
class="animation-right"
|
|
|
v-model:activeAttrib="activeAttrib"
|
|
|
- @add-frame="add('frames', { duration: 0 })"
|
|
|
+ @add-frame="add('frames', { duration: 0.1 })"
|
|
|
@add-path="(preset) => add('paths', { reverse: false, ...preset })"
|
|
|
@add-subtitle="add('subtitles', { content: '', background: '#000000' })"
|
|
|
@add-action="(preset) => add('actions', preset)"
|
|
|
- @apply-global="k => ams.forEach((am: any) => (am[k] = focusAM![k]))"
|
|
|
+ @apply-global="(k) => applyGlobal(k)"
|
|
|
/>
|
|
|
<GlobalFrame
|
|
|
class="global-frame"
|
|
@@ -45,7 +45,7 @@ import Right from "./right/index.vue";
|
|
|
import GlobalFrame from "./right/frame.vue";
|
|
|
import Bottom from "./bottom.vue";
|
|
|
import BottomPano from "@/layout/bottom-pano.vue";
|
|
|
-import router from "@/router";
|
|
|
+import router, { back } from "@/router";
|
|
|
import { enterEdit, sysBus } from "@/store";
|
|
|
import { useViewStack } from "@/hook";
|
|
|
import { ams, AnimationModel, autoSaveAnimationModel } from "@/store/animation";
|
|
@@ -55,12 +55,19 @@ import {
|
|
|
getAddTLItemAttr,
|
|
|
getAddTLItemTimeByTime,
|
|
|
} from "@/components/drawing-time-line/check";
|
|
|
-import { Message } from "bill/expose-common";
|
|
|
+import { Dialog, Message } from "bill/expose-common";
|
|
|
import { mergeFuns, uuid } from "@/components/drawing/hook";
|
|
|
import { title } from "./type";
|
|
|
-import { amMap, getAMKey, currentTime, play } from "@/sdk/association/animation";
|
|
|
+import {
|
|
|
+ amMap,
|
|
|
+ getAMKey,
|
|
|
+ currentTime,
|
|
|
+ play,
|
|
|
+ animationGroup,
|
|
|
+} from "@/sdk/association/animation";
|
|
|
import { sdk, AnimationModel3D } from "@/sdk";
|
|
|
import {
|
|
|
+ bottomBarHeightStack,
|
|
|
showAMsStack,
|
|
|
showBottomBarStack,
|
|
|
showHeadBarStack,
|
|
@@ -74,15 +81,17 @@ import { clickListener } from "@/utils/event";
|
|
|
import { useRMenus } from "@/components/right-menu";
|
|
|
import { asyncTimeout } from "@/utils";
|
|
|
|
|
|
-enterEdit(() => router.back());
|
|
|
+enterEdit(() => back());
|
|
|
useViewStack(autoSaveAnimationModel);
|
|
|
sysBus.on("leave", () => {
|
|
|
updateFocus();
|
|
|
});
|
|
|
useViewStack(() => {
|
|
|
const showRight = ref(false);
|
|
|
+ animationGroup.enterEditPannel();
|
|
|
return mergeFuns(
|
|
|
showBottomBarStack.push(ref(true)),
|
|
|
+ bottomBarHeightStack.push(ref("0px")),
|
|
|
showRightPanoStack.push(showRight),
|
|
|
showLeftPanoStack.push(ref(true)),
|
|
|
showAMsStack.push(ref(true)),
|
|
@@ -90,6 +99,7 @@ useViewStack(() => {
|
|
|
showLeftCtrlPanoStack.push(computed(() => !play.value)),
|
|
|
showModeTabStack.push(computed(() => !play.value)),
|
|
|
showSearchStack.push(computed(() => !play.value)),
|
|
|
+ () => animationGroup.exitEditPannel(),
|
|
|
watchEffect((onCleanup) => {
|
|
|
const cleanups: any[] = [];
|
|
|
if (play.value || activeAttrib.value?.key === "frames") {
|
|
@@ -112,6 +122,12 @@ const activeAttrib = ref<Active>();
|
|
|
const follow = ref(false);
|
|
|
const frameAction = ref<string>();
|
|
|
|
|
|
+const applyGlobal = async (k: keyof AnimationModel) => {
|
|
|
+ console.error(k, focusAM.value![k]);
|
|
|
+ if (!(await Dialog.confirm("确定要将此属性应用到所有动画模型?"))) return;
|
|
|
+ ams.value.forEach((am: any) => (am[k] = focusAM.value![k]));
|
|
|
+};
|
|
|
+
|
|
|
const amM = computed(() => focusAM.value && amMap[getAMKey(focusAM.value)]);
|
|
|
watch(play, (play, _, onCleanup) => {
|
|
|
if (play) {
|