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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-26 11:34:40 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-26 11:34:40 +0300
commit87627374000b7de7445736a7239a3f2b168ce7eb (patch)
tree2f0fe5d42d0938fc1b684af702d8613099bea1bd /source/blender/render
parent784d8ee37a52f3ef689aa6d02e75e50566efe93f (diff)
parentba8ea9ec63c25b1ce134a846176f7bf252f4d487 (diff)
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17853:HEAD
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/occlusion.c10
-rw-r--r--source/blender/render/intern/source/pipeline.c32
-rw-r--r--source/blender/render/intern/source/rendercore.c4
-rw-r--r--source/blender/render/intern/source/shadeinput.c2
4 files changed, 26 insertions, 22 deletions
diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c
index 5a2a58ca919..174a9db4398 100644
--- a/source/blender/render/intern/source/occlusion.c
+++ b/source/blender/render/intern/source/occlusion.c
@@ -181,8 +181,8 @@ static void occ_shade(ShadeSample *ssamp, ObjectInstanceRen *obi, VlakRen *vlr,
/* not a pretty solution, but fixes common cases */
if(shi->obr->ob && shi->obr->ob->transflag & OB_NEG_SCALE) {
- VecMulf(shi->vn, -1.0f);
- VecMulf(shi->vno, -1.0f);
+ VecNegf(shi->vn);
+ VecNegf(shi->vno);
}
/* init material vars */
@@ -1288,7 +1288,7 @@ static void occ_compute_passes(Render *re, OcclusionTree *tree, int totpass)
for(pass=0; pass<totpass; pass++) {
for(i=0; i<tree->totface; i++) {
occ_face(&tree->face[i], co, n, NULL);
- VecMulf(n, -1.0f);
+ VecNegf(n);
VECADDFAC(co, co, n, 1e-8f);
occ_lookup(tree, 0, &tree->face[i], co, n, &occ[i], NULL);
@@ -1321,7 +1321,7 @@ static void sample_occ_tree(Render *re, OcclusionTree *tree, OccFace *exclude, f
aocolor= WO_AOPLAIN;
VECCOPY(nn, n);
- VecMulf(nn, -1.0f);
+ VecNegf(nn);
occ_lookup(tree, thread, exclude, co, nn, &occ, (aocolor)? bn: NULL);
@@ -1525,7 +1525,7 @@ static void *exec_strandsurface_sample(void *data)
CalcCent3f(co, co1, co2, co3);
CalcNormFloat(co1, co2, co3, n);
}
- VecMulf(n, -1.0f);
+ VecNegf(n);
sample_occ_tree(re, re->occlusiontree, NULL, co, n, othread->thread, 0, col);
VECCOPY(othread->facecol[a], col);
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 12f904f8f5c..70f03fa8947 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -2622,17 +2622,19 @@ void RE_BlenderAnim(Render *re, Scene *scene, int sfra, int efra, int tfra)
else
nfra+= tfra;
- if (scene->r.mode & (R_NO_OVERWRITE | R_TOUCH) ) {
- BKE_makepicstring(scene, name, scene->r.pic, scene->r.cfra, scene->r.imtype);
- }
-
- if (scene->r.mode & R_NO_OVERWRITE && BLI_exist(name)) {
- printf("skipping existing frame \"%s\"\n", name);
- continue;
- }
- if (scene->r.mode & R_TOUCH && !BLI_exist(name)) {
- BLI_make_existing_file(name); /* makes the dir if its not there */
- BLI_touch(name);
+ /* Touch/NoOverwrite options are only valid for image's */
+ if(BKE_imtype_is_movie(scene->r.imtype) == 0) {
+ if(scene->r.mode & (R_NO_OVERWRITE | R_TOUCH))
+ BKE_makepicstring(scene, name, scene->r.pic, scene->r.cfra, scene->r.imtype);
+
+ if(scene->r.mode & R_NO_OVERWRITE && BLI_exist(name)) {
+ printf("skipping existing frame \"%s\"\n", name);
+ continue;
+ }
+ if(scene->r.mode & R_TOUCH && !BLI_exist(name)) {
+ BLI_make_existing_file(name); /* makes the dir if its not there */
+ BLI_touch(name);
+ }
}
re->r.cfra= scene->r.cfra; /* weak.... */
@@ -2645,8 +2647,10 @@ void RE_BlenderAnim(Render *re, Scene *scene, int sfra, int efra, int tfra)
if(G.afbreek==1) {
/* remove touched file */
- if (scene->r.mode & R_TOUCH && BLI_exist(name) && BLI_filepathsize(name) == 0) {
- BLI_delete(name, 0, 0);
+ if(BKE_imtype_is_movie(scene->r.imtype) == 0) {
+ if (scene->r.mode & R_TOUCH && BLI_exist(name) && BLI_filepathsize(name) == 0) {
+ BLI_delete(name, 0, 0);
+ }
}
break;
@@ -2711,7 +2715,7 @@ void RE_set_max_threads(int threads)
} else if(threads>=1 && threads<=BLENDER_MAX_THREADS) {
commandline_threads= threads;
} else {
- printf("Error, threads has to be in range 1-%d\n", BLENDER_MAX_THREADS);
+ printf("Error, threads has to be in range 0-%d\n", BLENDER_MAX_THREADS);
}
}
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index ebefbad6e21..deb6f0db743 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -1505,8 +1505,8 @@ static void shade_sample_sss(ShadeSample *ssamp, Material *mat, ObjectInstanceRe
/* not a pretty solution, but fixes common cases */
if(shi->obr->ob && shi->obr->ob->transflag & OB_NEG_SCALE) {
- VecMulf(shi->vn, -1.0f);
- VecMulf(shi->vno, -1.0f);
+ VecNegf(shi->vn);
+ VecNegf(shi->vno);
}
/* if nodetree, use the material that we are currently preprocessing
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index 476330152ec..1cd8ec110f9 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -354,7 +354,7 @@ void shade_input_set_strand(ShadeInput *shi, StrandRen *strand, StrandPoint *spo
Normalize(shi->vn);
if(INPR(shi->vn, shi->view) < 0.0f)
- VecMulf(shi->vn, -1.0f);
+ VecNegf(shi->vn);
}
VECCOPY(shi->vno, shi->vn);