Bugfix (own discovery!), using sequencer to render a scene updated the
depsgraph 2 times to often, also confusing particle drawing when disp % is set. And: little cleanup in render code (move includes in order)
This commit is contained in:
@@ -1948,7 +1948,7 @@ static float *sphere_sampler(int type, int resol, int xs, int ys)
|
||||
}
|
||||
else {
|
||||
float *sphere;
|
||||
float cosf, sinf, cost, sint;
|
||||
float cosfi, sinfi, cost, sint;
|
||||
float ang, *vec1;
|
||||
int a;
|
||||
|
||||
@@ -1958,15 +1958,15 @@ static float *sphere_sampler(int type, int resol, int xs, int ys)
|
||||
|
||||
// random rotation
|
||||
ang= BLI_thread_frand(ys & 1);
|
||||
sinf= sin(ang); cosf= cos(ang);
|
||||
sinfi= sin(ang); cosfi= cos(ang);
|
||||
ang= BLI_thread_frand(ys & 1);
|
||||
sint= sin(ang); cost= cos(ang);
|
||||
|
||||
vec= R.wrld.aosphere;
|
||||
vec1= sphere;
|
||||
for (a=0; a<tot; a++, vec+=3, vec1+=3) {
|
||||
vec1[0]= cost*cosf*vec[0] - sinf*vec[1] + sint*cosf*vec[2];
|
||||
vec1[1]= cost*sinf*vec[0] + cosf*vec[1] + sint*sinf*vec[2];
|
||||
vec1[0]= cost*cosfi*vec[0] - sinfi*vec[1] + sint*cosfi*vec[2];
|
||||
vec1[1]= cost*sinfi*vec[0] + cosfi*vec[1] + sint*sinfi*vec[2];
|
||||
vec1[2]= -sint*vec[0] + cost*vec[2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
/* system includes */
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* External modules: */
|
||||
#include "MEM_guardedalloc.h"
|
||||
@@ -65,12 +69,6 @@
|
||||
#include "jitter.h"
|
||||
#include "texture.h"
|
||||
|
||||
/* system includes */
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
/* own include */
|
||||
#include "rendercore.h"
|
||||
|
||||
|
||||
@@ -1957,7 +1957,7 @@ void do_build_seqar_cfra(ListBase *seqbase, Sequence ***seqar, int cfra)
|
||||
int redisplay= (!G.background && !(R.flag & R_RENDERING));
|
||||
|
||||
oldsce= G.scene;
|
||||
set_scene_bg(seq->scene);
|
||||
if(seq->scene!=G.scene) set_scene_bg(seq->scene); /* set_scene does full dep updates */
|
||||
|
||||
/* prevent eternal loop */
|
||||
doseq= G.scene->r.scemode & R_DOSEQ;
|
||||
@@ -2003,7 +2003,7 @@ void do_build_seqar_cfra(ListBase *seqbase, Sequence ***seqar, int cfra)
|
||||
R.rectot= rectot;
|
||||
R.rectx=oldx; R.recty=oldy;
|
||||
G.scene->r.scemode |= doseq;
|
||||
set_scene_bg(oldsce);
|
||||
if(seq->scene!=oldsce) set_scene_bg(oldsce); /* set_scene does full dep updates */
|
||||
|
||||
/* restore!! */
|
||||
R.rectx= seqrectx;
|
||||
|
||||
Reference in New Issue
Block a user