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:
@@ -1041,8 +1041,10 @@ 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_");
|
||||
|
||||
@@ -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,8 +1717,12 @@ static void do_build_seq_ibuf(Sequence * seq, TStripElem *se, int cfra,
|
||||
CFRA = oldcfra;
|
||||
|
||||
if (!build_proxy_run) {
|
||||
if(se->ibuf == NULL) {
|
||||
se->ok = STRIPELEM_FAILED;
|
||||
} else {
|
||||
input_preprocess(seq, se, cfra);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user