From 899fe6ee9de6ed4b3cdbe0bf62a76c92d3046a29 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 23 Nov 2005 21:25:20 +0000 Subject: 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) --- source/blender/render/intern/source/ray.c | 8 ++++---- source/blender/render/intern/source/rendercore.c | 10 ++++------ source/blender/src/sequence.c | 4 ++-- 3 files changed, 10 insertions(+), 12 deletions(-) (limited to 'source/blender') 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 +#include +#include /* External modules: */ #include "MEM_guardedalloc.h" @@ -65,12 +69,6 @@ #include "jitter.h" #include "texture.h" -/* system includes */ -#include -#include -#include - - /* 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; -- cgit v1.2.3