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/blenkernel
parent784d8ee37a52f3ef689aa6d02e75e50566efe93f (diff)
parentba8ea9ec63c25b1ce134a846176f7bf252f4d487 (diff)
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17853:HEAD
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_global.h1
-rw-r--r--source/blender/blenkernel/SConscript6
-rw-r--r--source/blender/blenkernel/intern/collision.c2
-rw-r--r--source/blender/blenkernel/intern/constraint.c14
-rw-r--r--source/blender/blenkernel/intern/effect.c2
-rw-r--r--source/blender/blenkernel/intern/image.c36
-rw-r--r--source/blender/blenkernel/intern/particle_system.c8
7 files changed, 56 insertions, 13 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index 07ade7cb208..0d5208ed90d 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -178,6 +178,7 @@ typedef struct Global {
#define G_FILE_GLSL_NO_RAMPS (1 << 19)
#define G_FILE_GLSL_NO_NODES (1 << 20)
#define G_FILE_GLSL_NO_EXTRA_TEX (1 << 21)
+#define G_FILE_IGNORE_DEPRECATION_WARNINGS (1 << 22)
/* G.windowstate */
#define G_WINDOWSTATE_USERDEF 0
diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript
index bf09b2aac03..cb0c60fb1f1 100644
--- a/source/blender/blenkernel/SConscript
+++ b/source/blender/blenkernel/SConscript
@@ -35,6 +35,9 @@ if env['WITH_BF_INTERNATIONAL']:
if env['WITH_BF_OPENEXR']:
defs += ' WITH_OPENEXR'
+if env['WITH_BF_OPENJPEG']:
+ defs += ' WITH_OPENJPEG'
+
if env['WITH_BF_DDS']:
defs += ' WITH_DDS'
@@ -46,6 +49,9 @@ if env['WITH_BF_QUICKTIME']:
defs += ' WITH_QUICKTIME'
incs += ' ' + env['BF_QUICKTIME_INC']
+if env['WITH_BF_BULLET']:
+ defs += ' WITH_BULLET'
+
if env['BF_NO_ELBEEM']:
defs += ' DISABLE_ELBEEM'
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index 9e57fef41f7..c122145c98f 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -1237,7 +1237,7 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat
if(out_normalVelocity < 0.0)
{
out_normalVelocity*= -1.0;
- VecMulf(out_normal, -1.0);
+ VecNegf(out_normal);
}
*/
/* Inelastic repulsion impulse. */
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index f5613a34700..912bc7ab3bd 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -898,7 +898,7 @@ static void vectomat (float *vec, float *target_up, short axis, short upflag, sh
n[2] = 1.0;
}
if (axis > 2) axis -= 3;
- else VecMulf(n,-1);
+ else VecNegf(n);
/* n specifies the transformation of the track axis */
if (flags & TARGET_Z_UP) {
@@ -2039,7 +2039,7 @@ static void locktrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
Projf(vec2, vec, cob->matrix[0]);
VecSubf(totmat[1], vec, vec2);
Normalize(totmat[1]);
- VecMulf(totmat[1],-1);
+ VecNegf(totmat[1]);
/* the x axis is fixed */
totmat[0][0] = cob->matrix[0][0];
@@ -2057,7 +2057,7 @@ static void locktrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
Projf(vec2, vec, cob->matrix[0]);
VecSubf(totmat[2], vec, vec2);
Normalize(totmat[2]);
- VecMulf(totmat[2],-1);
+ VecNegf(totmat[2]);
/* the x axis is fixed */
totmat[0][0] = cob->matrix[0][0];
@@ -2122,7 +2122,7 @@ static void locktrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
Projf(vec2, vec, cob->matrix[1]);
VecSubf(totmat[0], vec, vec2);
Normalize(totmat[0]);
- VecMulf(totmat[0],-1);
+ VecNegf(totmat[0]);
/* the y axis is fixed */
totmat[1][0] = cob->matrix[1][0];
@@ -2140,7 +2140,7 @@ static void locktrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
Projf(vec2, vec, cob->matrix[1]);
VecSubf(totmat[2], vec, vec2);
Normalize(totmat[2]);
- VecMulf(totmat[2],-1);
+ VecNegf(totmat[2]);
/* the y axis is fixed */
totmat[1][0] = cob->matrix[1][0];
@@ -2205,7 +2205,7 @@ static void locktrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
Projf(vec2, vec, cob->matrix[2]);
VecSubf(totmat[0], vec, vec2);
Normalize(totmat[0]);
- VecMulf(totmat[0],-1);
+ VecNegf(totmat[0]);
/* the z axis is fixed */
totmat[2][0] = cob->matrix[2][0];
@@ -2223,7 +2223,7 @@ static void locktrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
Projf(vec2, vec, cob->matrix[2]);
VecSubf(totmat[1], vec, vec2);
Normalize(totmat[1]);
- VecMulf(totmat[1],-1);
+ VecNegf(totmat[1]);
/* the z axis is fixed */
totmat[2][0] = cob->matrix[2][0];
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index d28d4206768..5217464c2c9 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -252,7 +252,7 @@ static float eff_calc_visibility(Scene *scene, Object *ob, float *co, float *dir
return 0;
VECCOPY(norm, dir);
- VecMulf(norm, -1.0);
+ VecNegf(norm);
len = Normalize(norm);
// check all collision objects
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 7890b72f6e2..1b851444e04 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -766,6 +766,10 @@ int BKE_imtype_to_ftype(int imtype)
return RAWTGA;
else if(imtype==R_HAMX)
return AN_hamx;
+#ifdef WITH_OPENJPEG
+ else if(imtype==R_JP2)
+ return JP2;
+#endif
else
return JPG|90;
}
@@ -800,6 +804,10 @@ int BKE_ftype_to_imtype(int ftype)
return R_RAWTGA;
else if(ftype == AN_hamx)
return R_HAMX;
+#ifdef WITH_OPENJPEG
+ else if(ftype & JP2)
+ return R_JP2;
+#endif
else
return R_JPEG90;
}
@@ -876,6 +884,12 @@ void BKE_add_image_extension(Scene *scene, char *string, int imtype)
if(!BLI_testextensie(string, ".tga"))
extension= ".tga";
}
+#ifdef WITH_OPENJPEG
+ else if(imtype==R_JP2) {
+ if(!BLI_testextensie(string, ".jp2"))
+ extension= ".jp2";
+ }
+#endif
else { // R_MOVIE, R_AVICODEC, R_AVIRAW, R_AVIJPEG, R_JPEG90, R_QUICKTIME etc
if(!( BLI_testextensie(string, ".jpg") || BLI_testextensie(string, ".jpeg")))
extension= ".jpg";
@@ -1219,6 +1233,28 @@ int BKE_write_ibuf(Scene *scene, ImBuf *ibuf, char *name, int imtype, int subimt
else if(imtype==R_HAMX) {
ibuf->ftype= AN_hamx;
}
+#ifdef WITH_OPENJPEG
+ else if(imtype==R_JP2) {
+ if(quality < 10) quality= 90;
+ ibuf->ftype= JP2|quality;
+
+ if (subimtype & R_JPEG2K_16BIT) {
+ ibuf->ftype |= JP2_16BIT;
+ } else if (subimtype & R_JPEG2K_12BIT) {
+ ibuf->ftype |= JP2_12BIT;
+ }
+
+ if (subimtype & R_JPEG2K_YCC) {
+ ibuf->ftype |= JP2_YCC;
+ }
+
+ if (subimtype & R_JPEG2K_CINE_PRESET) {
+ ibuf->ftype |= JP2_CINE;
+ if (subimtype & R_JPEG2K_CINE_48FPS)
+ ibuf->ftype |= JP2_CINE_48FPS;
+ }
+ }
+#endif
else {
/* R_JPEG90, R_MOVIE, etc. default we save jpegs */
if(quality < 10) quality= 90;
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 4a4a8b2e5b7..516cdc76125 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -824,7 +824,7 @@ void psys_thread_distribute_particle(ParticleThread *thread, ParticleData *pa, C
VecCopyf(tan,seam->tan);
VecSubf(temp2,co1,temp);
if(Inpf(tan,temp2)<0.0f)
- VecMulf(tan,-1.0f);
+ VecNegf(tan);
}
for(w=0; w<maxw; w++){
VecSubf(temp2,ptn[w].co,temp);
@@ -1878,7 +1878,7 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
}
/* create rotation quat */
- VecMulf(rot_vec,-1.0);
+ VecNegf(rot_vec);
vectoquat(rot_vec, OB_POSX, OB_POSZ, q2);
/* randomize rotation quat */
@@ -3025,7 +3025,7 @@ static void particle_intersect_face(void *userdata, int index, const BVHTreeRay
CalcNormFloat(t0, t1, t2, col->nor);
VECSUB(temp, co2, co1);
if(Inpf(col->nor, temp) > 0.0f)
- VecMulf(col->nor, -1.0f);
+ VecNegf(col->nor);
VECCOPY(col->vel,vel);
@@ -3805,7 +3805,7 @@ static void boid_body(Scene *scene, BoidVecFunc *bvf, ParticleData *pa, Particle
VecRotToQuat(pa->state.vel,bank,q);
VECCOPY(dvec,pa->state.vel);
- VecMulf(dvec,-1.0f);
+ VecNegf(dvec);
vectoquat(dvec, OB_POSX, OB_POSZ, q2);
QuatMul(pa->state.rot,q,q2);