|
@@ -65,7 +65,11 @@
|
|
|
<ui-group-option class="item">
|
|
|
<span class="label">字幕</span>
|
|
|
<span class="oper">
|
|
|
- <ui-icon @click="$emit('addSubtitle', {background: '#000'})" type="add_a" ctrl />
|
|
|
+ <ui-icon
|
|
|
+ @click="$emit('addSubtitle', { background: '#000' })"
|
|
|
+ type="add_a"
|
|
|
+ ctrl
|
|
|
+ />
|
|
|
</span>
|
|
|
</ui-group-option>
|
|
|
</ui-group>
|
|
@@ -79,7 +83,14 @@
|
|
|
<ui-icon
|
|
|
type="add_a"
|
|
|
ctrl
|
|
|
- @click="$emit('addAction', { amplitude: 1, speed: 1, key: action.action, name: action.title })"
|
|
|
+ @click="
|
|
|
+ $emit('addAction', {
|
|
|
+ amplitude: 1,
|
|
|
+ speed: 1,
|
|
|
+ key: action.action,
|
|
|
+ name: action.title,
|
|
|
+ })
|
|
|
+ "
|
|
|
/>
|
|
|
</span>
|
|
|
</ui-group-option>
|
|
@@ -123,18 +134,53 @@ import { Switch, Slider, TabPane, Tabs } from "ant-design-vue";
|
|
|
import { AnimationModel } from "@/api";
|
|
|
import SignItem from "@/views/tagging-position/sign-item.vue";
|
|
|
import { computed, ref } from "vue";
|
|
|
-import { amActions } from "@/store/animation";
|
|
|
import { paths } from "@/store/path";
|
|
|
import Message from "bill/components/message/message.vue";
|
|
|
import { Modal } from "ant-design-vue";
|
|
|
+import { amMap } from "@/sdk/association/animation";
|
|
|
|
|
|
-defineProps<{ am: AnimationModel }>();
|
|
|
+const props = defineProps<{ am: AnimationModel }>();
|
|
|
const emit = defineEmits<{
|
|
|
(e: "addFrame" | "addPath" | "addSubtitle" | "addAction", preset?: any): void;
|
|
|
(e: "applyGlobal", d: keyof AnimationModel): void;
|
|
|
}>();
|
|
|
const activeKey = ref("setting");
|
|
|
|
|
|
+const actionsMap: Record<string, string> = {
|
|
|
+ sit_to_stand: "坐:站起",
|
|
|
+ fist_pump: "坐下",
|
|
|
+ end_bicycle_sit_up: "躺:起来",
|
|
|
+ hit_on_legs: "向后倒下",
|
|
|
+ crawling: "爬",
|
|
|
+ medium_hit_to_head: "挨打",
|
|
|
+ illegal_knee: "左膝盖",
|
|
|
+ death_from_back_headshot: "向前倒地",
|
|
|
+ dying: "向前倒地死掉",
|
|
|
+ standard_walk: "标准走",
|
|
|
+ start_walking: "起步走",
|
|
|
+ left_turn_wbriefcase: "向左转",
|
|
|
+ running: "标准跑",
|
|
|
+ drunk_walk: "醉汉走",
|
|
|
+ mma_kick: "右前踢",
|
|
|
+ standing_jump: "标准向上跳",
|
|
|
+ sitting: "标准坐",
|
|
|
+ peone_forward: "匍匐前行",
|
|
|
+ wall_crash: "松手摔倒",
|
|
|
+ head_hit: "头被击中",
|
|
|
+};
|
|
|
+const keys = Object.keys(actionsMap);
|
|
|
+const amActions = computed(() => {
|
|
|
+ const actions = amMap[props.am.id].am?.getSupportActions() || [];
|
|
|
+ return actions.map((action) => {
|
|
|
+ let key = action.toLowerCase().replaceAll(/( |-)/gi, "_");
|
|
|
+ !keys.find((k) => key.includes(k)) && console.log(key);
|
|
|
+ key = keys.find((k) => key.includes(k)) || key;
|
|
|
+
|
|
|
+ console.log(action, key);
|
|
|
+ return { action, title: actionsMap[key] || action };
|
|
|
+ });
|
|
|
+});
|
|
|
+
|
|
|
const options = computed(() =>
|
|
|
paths.value.map((item) => ({ label: item.name, value: item.id }))
|
|
|
);
|