Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-02-03 05:30:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-03 05:30:21 +0400
commit075fee4d58a65b4313bb7e984ae195690f4c7bfd (patch)
treee801da2591eda34a4c4c7fd5436ff476353b1c55 /source/blender/render
parent68cc7e168207c4c519f54f7e0f7f638768386cd0 (diff)
parent050963b6a9529e0abdd597d163ddc4343c0b15c2 (diff)
svn merge ^/trunk/blender -r43830:43864
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/pipeline.c2
-rw-r--r--source/blender/render/intern/source/zbuf.c20
2 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 604ba189dcf..100b12aa169 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -1745,7 +1745,7 @@ static int check_valid_camera(Scene *scene, Object *camera_override)
check_comp= 0;
while(seq) {
- if(seq->type == SEQ_SCENE) {
+ if(seq->type == SEQ_SCENE && seq->scene) {
if(!seq->scene_camera) {
if(!seq->scene->camera && !scene_find_camera(seq->scene)) {
if(seq->scene == scene) {
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index a46b3791693..0d5aed7dadb 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -212,9 +212,9 @@ void fillrect(int *rect, int x, int y, int val)
}
/* based on Liang&Barsky, for clipping of pyramidical volume */
-static short cliptestf(float p, float q, float *u1, float *u2)
+static short cliptestf(float a, float b, float c, float d, float *u1, float *u2)
{
- float r;
+ float p= a + b, q= c + d, r;
if(p<0.0f) {
if(q<p) return 0;
@@ -854,20 +854,20 @@ static int clipline(float v1[4], float v2[4]) /* return 0: do not draw */
filled in with zbufwire correctly when rendering in parts. otherwise
you see line endings at edges... */
- if(cliptestf(-dz-dw, v1[3]+v1[2], &u1,&u2)) {
- if(cliptestf(dz-dw, v1[3]-v1[2], &u1,&u2)) {
+ if(cliptestf(-dz, -dw, v1[3], v1[2], &u1,&u2)) {
+ if(cliptestf(dz, -dw, v1[3], -v1[2], &u1,&u2)) {
dx= v2[0]-v1[0];
dz= 1.01f*(v2[3]-v1[3]);
v13= 1.01f*v1[3];
- if(cliptestf(-dx-dz, v1[0]+v13, &u1,&u2)) {
- if(cliptestf(dx-dz, v13-v1[0], &u1,&u2)) {
+ if(cliptestf(-dx, -dz, v1[0], v13, &u1,&u2)) {
+ if(cliptestf(dx, -dz, v13, -v1[0], &u1,&u2)) {
dy= v2[1]-v1[1];
- if(cliptestf(-dy-dz, v1[1]+v13, &u1,&u2)) {
- if(cliptestf(dy-dz, v13-v1[1], &u1,&u2)) {
+ if(cliptestf(-dy, -dz, v1[1], v13, &u1,&u2)) {
+ if(cliptestf(dy, -dz, v13, -v1[1], &u1,&u2)) {
if(u2<1.0f) {
v2[0]= v1[0]+u2*dx;
@@ -1628,8 +1628,8 @@ static void clippyra(float *labda, float *v1, float *v2, int *b2, int *b3, int a
* who would have thought that of L&B!
*/
- if(cliptestf(-da-dw, v13+v1[a], &u1,&u2)) {
- if(cliptestf(da-dw, v13-v1[a], &u1,&u2)) {
+ if(cliptestf(-da, -dw, v13, v1[a], &u1,&u2)) {
+ if(cliptestf(da, -dw, v13, -v1[a], &u1,&u2)) {
*b3=1;
if(u2<1.0f) {
labda[1]= u2;