mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-04 07:19:52 +00:00
The header's Export button started renders with no options at all, so the request carried no `composition` and the server fell back to index.html. Selecting a sub-composition in the Comps panel showed its canvas and timeline but exported the root file instead. Studio starts renders from three controls, and the render target was owned by each of them separately: the Renders panel resolved it, the header omitted it, the sidebar's per-composition button named one explicitly. Give it one owner in `startRender`, which all three route through, defaulting to the active composition and leaving an explicit argument to win. Fixes #3549
50 lines
1.9 KiB
TypeScript
50 lines
1.9 KiB
TypeScript
import { memo } from "react";
|
|
import { RenderQueue } from "./RenderQueue";
|
|
import type { RenderJob } from "./useRenderQueue";
|
|
import { useStudioShellContext } from "../../contexts/StudioContext";
|
|
import { usePreviewVariablesStore } from "../../hooks/previewVariablesStore";
|
|
|
|
/**
|
|
* The Renders tab, wired to the shell context.
|
|
*
|
|
* Split out of StudioRightPanel because every field it needs already lives in
|
|
* that context, so routing them through the panel only made the panel longer
|
|
* without giving anything a second reader.
|
|
*/
|
|
export const RenderQueuePanel = memo(function RenderQueuePanel() {
|
|
const { projectId, compositionDimensions, waitForPendingDomEditSaves, renderQueue } =
|
|
useStudioShellContext();
|
|
|
|
return (
|
|
<RenderQueue
|
|
jobs={renderQueue.jobs as RenderJob[]}
|
|
projectId={projectId}
|
|
onDelete={renderQueue.deleteRender}
|
|
onCancel={renderQueue.cancelRender}
|
|
loadError={renderQueue.loadError}
|
|
onRetryLoad={renderQueue.reloadRenders}
|
|
actionError={renderQueue.actionError}
|
|
onDismissActionError={renderQueue.dismissActionError}
|
|
onClearCompleted={renderQueue.clearCompleted}
|
|
ffmpeg={renderQueue.ffmpeg}
|
|
ffmpegChecking={renderQueue.ffmpegChecking}
|
|
onRecheckFfmpeg={renderQueue.recheckFfmpeg}
|
|
onStartRender={async (format, quality, resolution, fps) => {
|
|
await waitForPendingDomEditSaves();
|
|
// No `composition`: startRender targets the active one by default.
|
|
await renderQueue.startRender({
|
|
fps,
|
|
quality,
|
|
format,
|
|
resolution,
|
|
// Render what the user is previewing: active variable overrides
|
|
// from the Variables panel ride along (undefined = defaults).
|
|
variables: usePreviewVariablesStore.getState().values ?? undefined,
|
|
});
|
|
}}
|
|
compositionDimensions={compositionDimensions}
|
|
isRendering={renderQueue.isRendering}
|
|
/>
|
|
);
|
|
});
|