diff options
author | Ton Roosendaal <ton@blender.org> | 2005-11-24 00:25:20 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-11-24 00:25:20 +0300 |
commit | 899fe6ee9de6ed4b3cdbe0bf62a76c92d3046a29 (patch) | |
tree | 5f940adea572ca912558e47e9fce4006e5996533 /source/blender | |
parent | b7808ebf3efe33dbcc49fa47ca7db4fe90bf4a4e (diff) |
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)
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/render/intern/source/ray.c | 8 | ||||
-rw-r--r-- | source/blender/render/intern/source/rendercore.c | 10 | ||||
-rw-r--r-- | source/blender/src/sequence.c | 4 |
3 files changed, 10 insertions, 12 deletions
diff --git a/source/blender/render/intern/source/ray.c b/source/blender/render/intern/source/ray.c index 50d7d60a19b..0dce37bc8e2 100644 --- a/source/blender/render/intern/source/ray.c +++ b/source/blender/render/intern/source/ray.c @@ -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]; } } diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index bac360a8ca8..303d83cde14 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -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" diff --git a/source/blender/src/sequence.c b/source/blender/src/sequence.c index b154768d413..1564dbce14a 100644 --- a/source/blender/src/sequence.c +++ b/source/blender/src/sequence.c @@ -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; |