feat: 收口角色动作资产发布前端与验证文档
This commit is contained in:
@@ -62,7 +62,6 @@ import {
|
||||
type ScenePresetInfo,
|
||||
WorldType,
|
||||
} from '../../types';
|
||||
import { buildAnimationClipFromVideoSource } from '../asset-studio/characterAssetWorkflowModel';
|
||||
import {
|
||||
type CharacterAnimationGenerationPayload,
|
||||
generateCharacterAnimationDraft,
|
||||
@@ -3832,28 +3831,19 @@ function RoleSkillEditorModal({
|
||||
throw new Error('当前技能动作预览仅支持图生视频生成。');
|
||||
}
|
||||
|
||||
const clip = await buildAnimationClipFromVideoSource(
|
||||
generationResult.previewVideoPath,
|
||||
{
|
||||
animation: AnimationState.ATTACK,
|
||||
fps: 10,
|
||||
loop: false,
|
||||
frameCount: 8,
|
||||
applyChromaKey: true,
|
||||
},
|
||||
);
|
||||
|
||||
const publishResult = await publishCharacterAnimationAssets({
|
||||
characterId: role.id,
|
||||
visualAssetId: role.generatedVisualAssetId,
|
||||
animations: {
|
||||
[actionKey]: {
|
||||
framesDataUrls: clip.frames,
|
||||
fps: clip.fps,
|
||||
loop: clip.loop,
|
||||
frameWidth: clip.frameWidth,
|
||||
frameHeight: clip.frameHeight,
|
||||
previewVideoPath: clip.previewVideoPath,
|
||||
framesDataUrls: [],
|
||||
fps: 10,
|
||||
loop: false,
|
||||
frameWidth: 192,
|
||||
frameHeight: 256,
|
||||
frameCount: 8,
|
||||
applyChromaKey: true,
|
||||
previewVideoPath: generationResult.previewVideoPath,
|
||||
},
|
||||
},
|
||||
updateCharacterOverride: false,
|
||||
|
||||
Reference in New Issue
Block a user