forked from bartvdbraak/blender
Bug fix #1937
In unified render, halos can give black/colored overflows. Found it this happens with halos that are behind the camera clipping range. Halo clip just had some weird code for panorama corrections... In the provided .blend of report found 3 more glitches; - after render particle system with Material Ipo, values for material were not restored correctly - Meshes with particles didn't draw axis (draw extra) on correct location - Same as above, axis didn't draw in selected color.
This commit is contained in:
parent
38f9dc057a
commit
a7e250e85c
@ -1189,7 +1189,7 @@ void build_particle_system(Object *ob)
|
||||
}
|
||||
|
||||
/* for static particles, calculate system on current frame */
|
||||
do_mat_ipo(ma);
|
||||
if(ma) do_mat_ipo(ma);
|
||||
|
||||
/* set it all at first frame */
|
||||
G.scene->r.cfra= cfralast= (int)floor(ftime);
|
||||
@ -1208,7 +1208,7 @@ void build_particle_system(Object *ob)
|
||||
}
|
||||
|
||||
if((paf->flag & PAF_STATIC)==0) {
|
||||
do_mat_ipo(ma); // nor for static
|
||||
if(ma) do_mat_ipo(ma); // nor for static
|
||||
|
||||
where_is_object(ob);
|
||||
Mat4CpyMat4(prevobmat, ob->obmat);
|
||||
@ -1278,7 +1278,7 @@ void build_particle_system(Object *ob)
|
||||
do_ob_key(par);
|
||||
par= par->parent;
|
||||
}
|
||||
do_mat_ipo(ma);
|
||||
if(ma) do_mat_ipo(ma);
|
||||
Mat4CpyMat4(prevobmat, ob->obmat);
|
||||
where_is_object(ob);
|
||||
Mat4Invert(ob->imat, ob->obmat);
|
||||
@ -1371,6 +1371,7 @@ void build_particle_system(Object *ob)
|
||||
/* restore: AFTER popfirst */
|
||||
ob->sf= sfraont;
|
||||
|
||||
if(ma) do_mat_ipo(ma); // set back on current time
|
||||
disable_speed_curve(0);
|
||||
|
||||
waitcursor(0);
|
||||
|
@ -190,8 +190,8 @@ void setzbufvlaggen( void (*projectfunc)(float *, float *) )
|
||||
|
||||
projectfunc(vec, hoco);
|
||||
|
||||
hoco[3]*= 2.0;
|
||||
|
||||
if(R.r.mode & R_PANORAMA) hoco[3]*= 2.0; /* asking for troubles! */
|
||||
|
||||
if( panotestclip(hoco) ) {
|
||||
har->miny= har->maxy= -10000; /* that way render clips it */
|
||||
}
|
||||
@ -200,7 +200,9 @@ void setzbufvlaggen( void (*projectfunc)(float *, float *) )
|
||||
}
|
||||
else /* do the projection...*/
|
||||
{
|
||||
zn= hoco[3]/2.0;
|
||||
if(R.r.mode & R_PANORAMA) hoco[3]*= 0.5; /* asking for troubles! */
|
||||
|
||||
zn= hoco[3];
|
||||
har->xs= 0.5*R.rectx*(1.0+hoco[0]/zn); /* the 0.5 negates the previous 2...*/
|
||||
har->ys= 0.5*R.recty*(1.0+hoco[1]/zn);
|
||||
|
||||
|
@ -939,6 +939,12 @@ static void render_particle_system(Object *ob, PartEff *paf)
|
||||
ma->ren->seed1++;
|
||||
}
|
||||
|
||||
/* restore material */
|
||||
for(a=1; a<=ob->totcol; a++) {
|
||||
ma= give_render_material(ob, a);
|
||||
if(ma) do_mat_ipo(ma);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -2449,7 +2449,8 @@ static void draw_particle_system(Object *ob, PartEff *paf)
|
||||
}
|
||||
}
|
||||
if(paf->stype!=PAF_VECT) glEnd();
|
||||
|
||||
|
||||
mymultmatrix(ob->obmat); // bring back local matrix for dtx
|
||||
}
|
||||
|
||||
static void draw_static_particle_system(Object *ob, PartEff *paf)
|
||||
@ -4248,7 +4249,7 @@ void draw_object(Base *base)
|
||||
if(col) cpack(0xFFFFFF); /* for visibility */
|
||||
if(paf->flag & PAF_STATIC) draw_static_particle_system(ob, paf);
|
||||
else draw_particle_system(ob, paf);
|
||||
cpack(col);
|
||||
if(col) cpack(col);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user