[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15344] branches/blender-2.47/source: branches/blender-2.47

Diego Borghetti bdiego at gmail.com
Tue Jun 24 19:38:58 CEST 2008


Revision: 15344
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15344
Author:   bdiego
Date:     2008-06-24 19:38:03 +0200 (Tue, 24 Jun 2008)

Log Message:
-----------
branches/blender-2.47

Merge from trunk:
	Revision: 15302
	Revision: 15310
	Revision: 15315
	Revision: 15325
	Revision: 15331
	Revision: 15334

Modified Paths:
--------------
    branches/blender-2.47/source/blender/blenkernel/intern/action.c
    branches/blender-2.47/source/blender/blenkernel/intern/particle_system.c
    branches/blender-2.47/source/blender/include/transform.h
    branches/blender-2.47/source/blender/render/intern/source/pipeline.c
    branches/blender-2.47/source/blender/src/editobject.c
    branches/blender-2.47/source/blender/src/transform.c
    branches/blender-2.47/source/blender/src/transform_constraints.c
    branches/blender-2.47/source/blender/src/transform_generics.c
    branches/blender-2.47/source/blender/src/transform_snap.c
    branches/blender-2.47/source/creator/creator.c

Modified: branches/blender-2.47/source/blender/blenkernel/intern/action.c
===================================================================
--- branches/blender-2.47/source/blender/blenkernel/intern/action.c	2008-06-24 15:25:25 UTC (rev 15343)
+++ branches/blender-2.47/source/blender/blenkernel/intern/action.c	2008-06-24 17:38:03 UTC (rev 15344)
@@ -344,7 +344,7 @@
 	pchan->flag= chan->flag;
 	
 	con= chan->constraints.first;
-	for(pcon= pchan->constraints.first; pcon; pcon= pcon->next) {
+	for(pcon= pchan->constraints.first; pcon; pcon= pcon->next, con= con->next) {
 		pcon->enforce= con->enforce;
 		pcon->headtail= con->headtail;
 	}

Modified: branches/blender-2.47/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- branches/blender-2.47/source/blender/blenkernel/intern/particle_system.c	2008-06-24 15:25:25 UTC (rev 15343)
+++ branches/blender-2.47/source/blender/blenkernel/intern/particle_system.c	2008-06-24 17:38:03 UTC (rev 15344)
@@ -2596,6 +2596,7 @@
 	
 	for(ec= lb->first; ec; ec= ec->next) {
 		PartDeflect *pd= ec->ob->pd;
+		co = NULL;
 		
 		if(ec->type==PSYS_EC_EFFECTOR && pd->forcefield==PFIELD_GUIDE && ec->ob->type==OB_CURVE 
 			&& part->phystype!=PART_PHYS_BOIDS) {

Modified: branches/blender-2.47/source/blender/include/transform.h
===================================================================
--- branches/blender-2.47/source/blender/include/transform.h	2008-06-24 15:25:25 UTC (rev 15343)
+++ branches/blender-2.47/source/blender/include/transform.h	2008-06-24 17:38:03 UTC (rev 15344)
@@ -100,9 +100,9 @@
                          /* Apply function pointer for linear vectorial transformation                */
                          /* The last three parameters are pointers to the in/out/printable vectors    */
     void  (*applySize)(struct TransInfo *, struct TransData *, float [3][3]);
-                         /* Apply function pointer for rotation transformation (prototype will change */
-    void  (*applyRot)(struct TransInfo *, struct TransData *, float [3]);
-                         /* Apply function pointer for rotation transformation (prototype will change */
+                         /* Apply function pointer for size transformation */
+    void  (*applyRot)(struct TransInfo *, struct TransData *, float [3], float *);
+                         /* Apply function pointer for rotation transformation */
 } TransCon;
 
 typedef struct TransDataIpokey {

Modified: branches/blender-2.47/source/blender/render/intern/source/pipeline.c
===================================================================
--- branches/blender-2.47/source/blender/render/intern/source/pipeline.c	2008-06-24 15:25:25 UTC (rev 15343)
+++ branches/blender-2.47/source/blender/render/intern/source/pipeline.c	2008-06-24 17:38:03 UTC (rev 15344)
@@ -2675,9 +2675,9 @@
 
 void RE_init_threadcount(Render *re) 
 {
-	if ((re->r.mode & R_FIXED_THREADS)==0 || commandline_threads == 0) { /* Automatic threads */
+        if(commandline_threads >= 1) { /* only set as an arg in background mode */
+		re->r.threads= MIN2(commandline_threads, BLENDER_MAX_THREADS);
+	} else if ((re->r.mode & R_FIXED_THREADS)==0 || commandline_threads == 0) { /* Automatic threads */
 		re->r.threads = BLI_system_thread_count();
-	} else if(commandline_threads >= 1 && commandline_threads<=BLENDER_MAX_THREADS) {
-		re->r.threads= commandline_threads;
 	}
 }

Modified: branches/blender-2.47/source/blender/src/editobject.c
===================================================================
--- branches/blender-2.47/source/blender/src/editobject.c	2008-06-24 15:25:25 UTC (rev 15343)
+++ branches/blender-2.47/source/blender/src/editobject.c	2008-06-24 17:38:03 UTC (rev 15344)
@@ -5939,7 +5939,7 @@
 	Base *base;
 	short changed = 0, changed_act = 0;
 	for(base = FIRSTBASE; base; base=base->next){
-		if(TESTBASELIB(base)==select){
+		if ((base->lay & G.vd->lay) && (TESTBASELIB(base)==select)) {
 			base->flag &= ~SELECT;
 			base->object->flag = base->flag;
 			base->object->restrictflag |= OB_RESTRICT_VIEW;

Modified: branches/blender-2.47/source/blender/src/transform.c
===================================================================
--- branches/blender-2.47/source/blender/src/transform.c	2008-06-24 15:25:25 UTC (rev 15343)
+++ branches/blender-2.47/source/blender/src/transform.c	2008-06-24 17:38:03 UTC (rev 15344)
@@ -2620,7 +2620,7 @@
 		}
 		
 		if (t->con.applyRot) {
-			t->con.applyRot(t, td, axis);
+			t->con.applyRot(t, td, axis, NULL);
 			VecRotToMat3(axis, angle * td->factor, mat);
 		}
 		else if (t->flag & T_PROP_EDIT) {
@@ -2658,7 +2658,7 @@
 	snapGrid(t, &final);
 
 	if (t->con.applyRot) {
-		t->con.applyRot(t, NULL, axis);
+		t->con.applyRot(t, NULL, axis, &final);
 	}
 	
 	applySnapping(t, &final);
@@ -3305,7 +3305,7 @@
 	}
 	
 	if (t->con.applyRot && t->con.mode & CON_APPLY) {
-		t->con.applyRot(t, NULL, axis);
+		t->con.applyRot(t, NULL, axis, NULL);
 	}
 	
 	for(i = 0 ; i < t->total; i++, td++) {
@@ -3317,7 +3317,7 @@
 
 		VecSubf(vec, t->center, td->center);
 		if (t->con.applyRot && t->con.mode & CON_APPLY) {
-			t->con.applyRot(t, td, axis);
+			t->con.applyRot(t, td, axis, NULL);
 			if (isLockConstraint(t)) {
 				float dvec[3];
 				Projf(dvec, vec, axis);

Modified: branches/blender-2.47/source/blender/src/transform_constraints.c
===================================================================
--- branches/blender-2.47/source/blender/src/transform_constraints.c	2008-06-24 15:25:25 UTC (rev 15343)
+++ branches/blender-2.47/source/blender/src/transform_constraints.c	2008-06-24 17:38:03 UTC (rev 15344)
@@ -393,7 +393,7 @@
  * (ie: not doing counterclockwise rotations when the mouse moves clockwise).
  */
 
-static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3])
+static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3], float *angle)
 {
 	if (!td && t->con.mode & CON_APPLY) {
 		int mode = t->con.mode & (CON_AXIS0|CON_AXIS1|CON_AXIS2);
@@ -413,9 +413,9 @@
 			break;
 		}
 		/* don't flip axis if asked to or if num input */
-		if (!(mode & CON_NOFLIP) && hasNumInput(&t->num) == 0) {
+		if (angle && (mode & CON_NOFLIP) == 0 && hasNumInput(&t->num) == 0) {
 			if (Inpf(vec, t->viewinv[2]) > 0.0f) {
-				VecMulf(vec, -1.0f);
+				*angle = -(*angle);
 			}
 		}
 	}
@@ -435,10 +435,15 @@
  * (ie: not doing counterclockwise rotations when the mouse moves clockwise).
  */
 
-static void applyObjectConstraintRot(TransInfo *t, TransData *td, float vec[3])
+static void applyObjectConstraintRot(TransInfo *t, TransData *td, float vec[3], float *angle)
 {
-	if (td && t->con.mode & CON_APPLY) {
+	if (t->con.mode & CON_APPLY) {
 		int mode = t->con.mode & (CON_AXIS0|CON_AXIS1|CON_AXIS2);
+		
+		/* on setup call, use first object */
+		if (td == NULL) {
+			td= t->data;
+		}
 
 		switch(mode) {
 		case CON_AXIS0:
@@ -454,9 +459,9 @@
 			VECCOPY(vec, td->axismtx[2]);
 			break;
 		}
-		if (!(mode & CON_NOFLIP)) {
+		if (angle && (mode & CON_NOFLIP) == 0 && hasNumInput(&t->num) == 0) {
 			if (Inpf(vec, t->viewinv[2]) > 0.0f) {
-				VecMulf(vec, -1.0f);
+				*angle = -(*angle);
 			}
 		}
 	}

Modified: branches/blender-2.47/source/blender/src/transform_generics.c
===================================================================
--- branches/blender-2.47/source/blender/src/transform_generics.c	2008-06-24 15:25:25 UTC (rev 15343)
+++ branches/blender-2.47/source/blender/src/transform_generics.c	2008-06-24 17:38:03 UTC (rev 15344)
@@ -326,7 +326,7 @@
 		else {
 			for (base=G.scene->base.first; base; base=base->next) {
 				/* recalculate scale of selected nla-strips */
-				if (base->object->nlastrips.first) {
+				if (base->object && base->object->nlastrips.first) {
 					Object *bob= base->object;
 					bActionStrip *strip;
 					
@@ -399,8 +399,15 @@
 				}
 			}
 			else if(G.sipo->blocktype==ID_OB) {
+				Object *ob= OBACT;
 				Base *base= FIRSTBASE;
 				
+				/* only if this if active object has this ipo in an action (assumes that current ipo is in action) */
+				if ((ob) && (ob->ipoflag & OB_ACTION_OB) && (G.sipo->pin==0)) {
+					ob->ctime= -1234567.0f;
+					DAG_object_flush_update(G.scene, ob, OB_RECALC_OB);
+				}
+				
 				while(base) {
 					if(base->object->ipo==G.sipo->ipo) {
 						do_ob_ipo(base->object);

Modified: branches/blender-2.47/source/blender/src/transform_snap.c
===================================================================
--- branches/blender-2.47/source/blender/src/transform_snap.c	2008-06-24 15:25:25 UTC (rev 15343)
+++ branches/blender-2.47/source/blender/src/transform_snap.c	2008-06-24 17:38:03 UTC (rev 15344)
@@ -370,7 +370,7 @@
 	if (t->con.applyRot != NULL && (t->con.mode & CON_APPLY)) {
 		float axis[3], tmp[3];
 		
-		t->con.applyRot(t, NULL, axis);
+		t->con.applyRot(t, NULL, axis, NULL);
 
 		Projf(tmp, end, axis);
 		VecSubf(end, end, tmp);

Modified: branches/blender-2.47/source/creator/creator.c
===================================================================
--- branches/blender-2.47/source/creator/creator.c	2008-06-24 15:25:25 UTC (rev 15343)
+++ branches/blender-2.47/source/creator/creator.c	2008-06-24 17:38:03 UTC (rev 15344)
@@ -195,7 +195,7 @@
 	printf ("    (formats that can be compiled into blender, not available on all systems)\n");
 	printf ("    \tHDR TIFF EXR MULTILAYER MPEG AVICODEC QUICKTIME CINEON DPX DDS\n");
 	printf ("    -x <bool>\tSet option to add the file extension to the end of the file.\n");
-	printf ("    -t <threads>\tUse amount of <threads> for rendering.\n");
+	printf ("    -t <threads>\tUse amount of <threads> for rendering (background mode only).\n");
 	printf ("      [1-8], 0 for systems processor count.\n");
 	printf ("\nAnimation playback options:\n");
 	printf ("  -a <file(s)>\tPlayback <file(s)>, only operates this way when -b is not used.\n");
@@ -723,6 +723,8 @@
 				a++;
 				if(G.background) {
 					RE_set_max_threads(atoi(argv[a]));
+				} else {
+					printf("Warning: threads can only be set in background mode\n");
 				}
 				break;
 			case 'x': /* extension */





More information about the Bf-blender-cvs mailing list