Bug fixes;

#2187: Append to active layer now uses the real active layer
#2191: Stars didnt show up correctly in envmap render
#2194: Startfame > Endframe in anim render crashed (now it gives error)
This commit is contained in:
Ton Roosendaal
2005-01-30 15:40:42 +00:00
parent c94ec03a9e
commit fa2a1c84c7
3 changed files with 36 additions and 21 deletions

View File

@@ -5314,8 +5314,12 @@ static void append_named_part(FileData *fd, Main *mainvar, Scene *scene, char *n
if(id==0) ob= mainvar->object.last;
else ob= (Object *)id;
if((flag & FILE_ACTIVELAY)) ob->lay = G.scene->lay;
/* this is bad code... G.vd nor G.scene should be used on this level... */
if((flag & FILE_ACTIVELAY)) {
if(G.vd) ob->lay= G.vd->layact;
else ob->lay = G.scene->lay;
}
base->lay= ob->lay;
base->object= ob;
ob->id.us++;

View File

@@ -1202,10 +1202,19 @@ void RE_initrender(struct View3D *ogl_render_view3d)
/* IS RENDERING ALLOWED? */
/* forbidden combination */
if((R.r.mode & R_BORDER) && (R.r.mode & R_PANORAMA)) {
error("No border supported for Panorama");
G.afbreek= 1;
return;
if(R.r.mode & R_PANORAMA) {
if(R.r.mode & R_BORDER) {
error("No border supported for Panorama");
G.afbreek= 1;
}
if(R.r.yparts>1) {
error("No Y-Parts supported for Panorama");
G.afbreek= 1;
}
if(R.r.mode & R_ORTHO) {
error("No Ortho render possible for Panorama");
G.afbreek= 1;
}
}
if(R.r.xparts*R.r.yparts>=2 && (R.r.mode & R_MOVIECROP) && (R.r.mode & R_BORDER)) {
@@ -1226,6 +1235,7 @@ void RE_initrender(struct View3D *ogl_render_view3d)
return;
}
if(G.afbreek==1) return;
/* TEST BACKBUF */
/* If an image is specified for use as backdrop, that image is loaded */
@@ -1368,8 +1378,12 @@ void RE_animrender(struct View3D *ogl_render_view3d)
int cfrao;
char name[256];
if(G.scene==0) return;
if(G.scene==NULL) return;
if(G.scene->r.sfra > G.scene->r.efra) {
error("Startframe larger than Endframe");
return;
}
/* scenedata to R: (for backbuf, R.rectx etc) */
R.r= G.scene->r;

View File

@@ -327,7 +327,7 @@ void RE_make_stars(void (*initfunc)(void),
}
/* ------------------------------------------------------------------------ */
/* more star stuff */
/* more star stuff, here used to be a cliptest, removed for envmap render or panorama... */
static HaloRen *initstar(float *vec, float hasize)
{
HaloRen *har;
@@ -335,18 +335,15 @@ static HaloRen *initstar(float *vec, float hasize)
RE_projectverto(vec, hoco);
if( (R.r.mode & R_PANORAMA) || (R.r.xparts*R.r.yparts>1) || RE_testclip(hoco)==0 ) {
har= RE_findOrAddHalo(R.tothalo++);
/* projectvert is done in function zbufvlaggen again, because of parts */
VECCOPY(har->co, vec);
har->hasize= hasize;
har->zd= 0.0;
return har;
}
return NULL;
har= RE_findOrAddHalo(R.tothalo++);
/* projectvert is done in function zbufvlaggen again, because of parts */
VECCOPY(har->co, vec);
har->hasize= hasize;
har->zd= 0.0;
return har;
}