Updated Quicktime code so settings can be stored in the blendfile.

This enables Blender to;
- have scenes with different codec settings. (same as avicodec)
- render directly without dialog.
- batch/background render to Quicktime movies.

Only tested on windows. ;)
This commit is contained in:
2003-05-21 01:21:07 +00:00
parent 0bebdabad2
commit 9662763ee0
10 changed files with 211 additions and 163 deletions

View File

@@ -6027,7 +6027,7 @@ void do_renderbuts(unsigned short event)
if (((G.scene->r.imtype == R_AVICODEC)
&& (G.scene->r.avicodecdata == NULL)) ||
((G.scene->r.imtype == R_QUICKTIME)
&& (have_qtcodec == FALSE))) {
&& (G.scene->r.qtcodecdata == NULL))) {
} else {
break;
}
@@ -6589,10 +6589,10 @@ void renderbuts(void)
#if defined (_WIN32) || defined (__APPLE__)
glColor3f(0.65, 0.65, 0.7);
glRecti(892,yofs+46,892+225,yofs+45+20);
if(!have_qtcodec)
if(G.scene->r.qtcodecdata == NULL)
uiDefBut(block, LABEL, 0, "Codec: not set", 892,yofs+44,225,20, 0, 0, 0, 0, 0, "");
else
uiDefBut(block, LABEL, 0, qtcdname, 892,yofs+44,225,20, 0, 0, 0, 0, 0, "");
uiDefBut(block, LABEL, 0, G.scene->r.qtcodecdata->qtcodecname, 892,yofs+44,225,20, 0, 0, 0, 0, 0, "");
uiDefBut(block, BUT,B_SELECTCODEC, "Set codec", 892,yofs,112,20, 0, 0, 0, 0, 0, "Set codec settings for Quicktime");
#else /* libquicktime */
if (!G.scene->r.qtcodecdata) G.scene->r.qtcodecdata = MEM_callocN(sizeof(QtCodecData), "QtCodecData");

View File

@@ -2107,12 +2107,17 @@ Scene *copy_scene(Scene *sce, int level)
if (sce->r.avicodecdata) {
scen->r.avicodecdata = MEM_dupallocN(sce->r.avicodecdata);
scen->r.avicodecdata->lpFormat = MEM_dupallocN(scen->r.avicodecdata->lpFormat);
scen->r.avicodecdata->lpParms = MEM_dupallocN(scen->r.avicodecdata->lpParms);
}
// make a private copy of the qtcodecdata
if (sce->r.qtcodecdata) {
scen->r.qtcodecdata = MEM_dupallocN(sce->r.qtcodecdata);
scen->r.qtcodecdata->cdParms = MEM_dupallocN(scen->r.qtcodecdata->cdParms);
}
return scen;
}
@@ -2209,6 +2214,12 @@ void do_info_buttons(unsigned short event)
sce->r.avicodecdata->lpFormat = MEM_dupallocN(G.scene->r.avicodecdata->lpFormat);
sce->r.avicodecdata->lpParms = MEM_dupallocN(G.scene->r.avicodecdata->lpParms);
}
#endif
#ifdef WITH_QUICKTIME
if (sce->r.qtcodecdata) {
sce->r.qtcodecdata = MEM_dupallocN(G.scene->r.qtcodecdata);
sce->r.qtcodecdata->cdParms = MEM_dupallocN(G.scene->r.qtcodecdata->cdParms);
}
#endif
}
else sce= copy_scene(G.scene, nr-2);