feat: gate video generation on endpoint frames
This commit is contained in:
@@ -38,6 +38,7 @@ const NODE_TYPES = {
|
||||
const KEYFRAME_PANEL_ID = "keyframe-detail-panel"
|
||||
const VIDEO_FRAME_PANEL_ID = "video-frame-panel"
|
||||
const FLOATING_PANEL_IDS = new Set([KEYFRAME_PANEL_ID, VIDEO_FRAME_PANEL_ID])
|
||||
const DIRECT_VIDEO_GENERATION_PAUSED = true
|
||||
const FRAME_TARGET_LABELS: Record<FrameExtractTarget, string> = {
|
||||
transparent_human: "透明骨架人",
|
||||
balanced: "综合关键帧",
|
||||
@@ -592,6 +593,10 @@ export default function Home() {
|
||||
}, [jobs, productionJobIds, startProductionLanesForJob])
|
||||
|
||||
const handleQuickGenerateVideo = useCallback(async (frameIdx: number, scene: StoryboardScene, model: string) => {
|
||||
if (DIRECT_VIDEO_GENERATION_PAUSED) {
|
||||
toast.info("视频生成调用已暂停:先生成并审核每条分镜的首帧/尾帧,再开放单条提交")
|
||||
return
|
||||
}
|
||||
if (!job) return
|
||||
const frame = job.frames.find((f) => f.index === frameIdx)
|
||||
if (!frame) return
|
||||
@@ -728,6 +733,10 @@ export default function Home() {
|
||||
}, [ensureDefaultProductRefs, job, selectedFrames, updateJobInList])
|
||||
|
||||
const handleGenerateProductFusionVideo = useCallback(async (frameIdx: number, shot: ProductFusionShot) => {
|
||||
if (DIRECT_VIDEO_GENERATION_PAUSED) {
|
||||
toast.info("视频生成调用已暂停:当前只做首尾帧和素材规划")
|
||||
return
|
||||
}
|
||||
if (!job) return
|
||||
const frame = job.frames.find((f) => f.index === frameIdx)
|
||||
if (!frame) return
|
||||
|
||||
Reference in New Issue
Block a user