Bugfix [#8196] sequencer crash when adding scene without camera

added checks for a camera
Also added an error ob bake if there are no active objects.
This commit is contained in:
Campbell Barton
2008-02-17 20:44:07 +00:00
parent 601c7cc318
commit 1648060132
3 changed files with 15 additions and 7 deletions

View File

@@ -2255,7 +2255,7 @@ int RE_bake_shade_all_selected(Render *re, int type, Object *actob)
}
/* calculate return value */
for(a=0; a<re->r.threads; a++) {
for(a=0; a<re->r.threads; a++) {
vdone+= handles[a].vdone;
zbuf_free_span(handles[a].zspan);

View File

@@ -1041,9 +1041,11 @@ void objects_bake_render(short event, char **error_msg)
return;
}
if(active && !actob)
if(active && !actob) {
*error_msg = "No active object";
return;
}
if(event>0) {
Render *re= RE_NewRender("_Bake View_");
ScrArea *area= biggest_image_area();

View File

@@ -1651,14 +1651,16 @@ static void do_build_seq_ibuf(Sequence * seq, TStripElem *se, int cfra,
int doseq, rendering= G.rendering;
char scenename[64];
if (se->ibuf==NULL && seq->scene && !build_proxy_run) {
if (se->ibuf==NULL && seq->scene && seq->scene->camera && !build_proxy_run) {
se->ibuf = seq_proxy_fetch(seq, cfra);
if (se->ibuf) {
input_preprocess(seq, se, cfra);
}
}
if (se->ibuf==NULL && seq->scene) {
if (seq->scene && seq->scene->camera==NULL) {
se->ok = STRIPELEM_FAILED;
} else if (se->ibuf==NULL && seq->scene && seq->scene->camera) {
waitcursor(1);
/* Hack! This function can be called from do_render_seq(), in that case
@@ -1715,7 +1717,11 @@ static void do_build_seq_ibuf(Sequence * seq, TStripElem *se, int cfra,
CFRA = oldcfra;
if (!build_proxy_run) {
input_preprocess(seq, se, cfra);
if(se->ibuf == NULL) {
se->ok = STRIPELEM_FAILED;
} else {
input_preprocess(seq, se, cfra);
}
}
}