[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58206] branches/soc-2013-cycles_mblur: Merged trunk into branch.

Gavin Howard gavin.d.howard at gmail.com
Fri Jul 12 23:36:45 CEST 2013


Revision: 58206
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58206
Author:   gdh
Date:     2013-07-12 21:36:45 +0000 (Fri, 12 Jul 2013)
Log Message:
-----------
Merged trunk into branch. Includes r58185 to r58205.

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58185
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58205

Modified Paths:
--------------
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_object.h
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/dynamicpaint.c
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/object.c
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/particle_system.c
    branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_math_geom.h
    branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/math_geom.c
    branches/soc-2013-cycles_mblur/source/blender/compositor/nodes/COM_ZCombineNode.cpp
    branches/soc-2013-cycles_mblur/source/blender/editors/interface/interface_layout.c
    branches/soc-2013-cycles_mblur/source/blender/editors/mesh/editmesh_loopcut.c
    branches/soc-2013-cycles_mblur/source/blender/editors/render/render_internal.c
    branches/soc-2013-cycles_mblur/source/blender/editors/space_node/drawnode.c
    branches/soc-2013-cycles_mblur/source/blender/editors/space_node/node_select.c
    branches/soc-2013-cycles_mblur/source/blender/editors/space_view3d/view3d_snap.c
    branches/soc-2013-cycles_mblur/source/blender/editors/transform/transform_manipulator.c
    branches/soc-2013-cycles_mblur/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_nodetree.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_object.c
    branches/soc-2013-cycles_mblur/source/blender/render/extern/include/RE_engine.h
    branches/soc-2013-cycles_mblur/source/blender/render/intern/source/convertblender.c
    branches/soc-2013-cycles_mblur/source/blender/render/intern/source/external_engine.c

Property Changed:
----------------
    branches/soc-2013-cycles_mblur/


Property changes on: branches/soc-2013-cycles_mblur
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/branches/soc-2013-depsgraph_mt:57516
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57388-58184
   + /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/branches/soc-2013-depsgraph_mt:57516
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57388-58205

Modified: branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_object.h
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_object.h	2013-07-12 20:49:22 UTC (rev 58205)
+++ branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_object.h	2013-07-12 21:36:45 UTC (rev 58206)
@@ -95,15 +95,16 @@
 void BKE_object_to_mat3(struct Object *ob, float mat[3][3]);
 void BKE_object_to_mat4(struct Object *ob, float mat[4][4]);
 void BKE_object_apply_mat4(struct Object *ob, float mat[4][4], const bool use_compat, const bool use_parent);
+void BKE_object_matrix_local_get(struct Object *ob, float mat[4][4]);
 
 bool BKE_object_pose_context_check(struct Object *ob);
 struct Object *BKE_object_pose_armature_get(struct Object *ob);
 
 void BKE_object_where_is_calc(struct Scene *scene, struct Object *ob);
-void BKE_object_where_is_calc_ex(struct Scene *scene, struct RigidBodyWorld *rbw, struct Object *ob);
+void BKE_object_where_is_calc_ex(struct Scene *scene, struct RigidBodyWorld *rbw, struct Object *ob, float r_originmat[3][3]);
 void BKE_object_where_is_calc_time(struct Scene *scene, struct Object *ob, float ctime);
 void BKE_object_where_is_calc_time_ex(struct Scene *scene, struct Object *ob, float ctime,
-                                      struct RigidBodyWorld *rbw);
+                                      struct RigidBodyWorld *rbw, float r_originmat[3][3]);
 void BKE_object_where_is_calc_simul(struct Scene *scene, struct Object *ob);
 void BKE_object_where_is_calc_mat4(struct Scene *scene, struct Object *ob, float obmat[4][4]);
 

Modified: branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/dynamicpaint.c
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/dynamicpaint.c	2013-07-12 20:49:22 UTC (rev 58205)
+++ branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/dynamicpaint.c	2013-07-12 21:36:45 UTC (rev 58206)
@@ -1942,6 +1942,7 @@
 		/* loop through surfaces */
 		for (; surface; surface = surface->next) {
 			int current_frame = (int)scene->r.cfra;
+			bool no_surface_data;
 
 			/* free bake data if not required anymore */
 			surface_freeUnusedData(surface);
@@ -1951,12 +1952,13 @@
 			if (!(surface->flags & MOD_DPAINT_ACTIVE)) continue;
 
 			/* make sure surface is valid */
+			no_surface_data = surface->data == NULL;
 			if (!dynamicPaint_checkSurfaceData(surface)) continue;
 
 			/* limit frame range */
 			CLAMP(current_frame, surface->start_frame, surface->end_frame);
 
-			if (current_frame != surface->current_frame || (int)scene->r.cfra == surface->start_frame) {
+			if (no_surface_data || current_frame != surface->current_frame || (int)scene->r.cfra == surface->start_frame) {
 				PointCache *cache = surface->pointcache;
 				PTCacheID pid;
 				surface->current_frame = current_frame;

Modified: branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/object.c	2013-07-12 20:49:22 UTC (rev 58205)
+++ branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/object.c	2013-07-12 21:36:45 UTC (rev 58206)
@@ -121,9 +121,6 @@
 
 #include "GPU_material.h"
 
-/* Local function protos */
-float originmat[3][3];  /* after BKE_object_where_is_calc(), can be used in other functions (bad!) */
-
 void BKE_object_workob_clear(Object *workob)
 {
 	memset(workob, 0, sizeof(Object));
@@ -1739,6 +1736,18 @@
 	add_v3_v3v3(mat[3], ob->loc, ob->dloc);
 }
 
+void BKE_object_matrix_local_get(struct Object *ob, float mat[4][4])
+{
+	if (ob->parent) {
+		float invmat[4][4]; /* for inverse of parent's matrix */
+		invert_m4_m4(invmat, ob->parent->obmat);
+		mul_m4_m4m4(mat, invmat, ob->obmat);
+	}
+	else {
+		copy_m4_m4(mat, ob->obmat);
+	}
+}
+
 /* extern */
 int enable_cu_speed = 1;
 
@@ -1991,7 +2000,11 @@
 	}
 }
 
-static void solve_parenting(Scene *scene, Object *ob, Object *par, float obmat[4][4], float slowmat[4][4], int simul)
+/**
+ * \param r_originmat  Optional matrix that stores the space the object is in (without its own matrix applied)
+ */
+static void solve_parenting(Scene *scene, Object *ob, Object *par, float obmat[4][4], float slowmat[4][4],
+                            float r_originmat[3][3], const bool simul)
 {
 	float totmat[4][4];
 	float tmat[4][4];
@@ -2056,8 +2069,10 @@
 
 	}
 	else {
-		/* external usable originmat */
-		copy_m3_m4(originmat, tmat);
+		if (r_originmat) {
+			/* usable originmat */
+			copy_m3_m4(r_originmat, tmat);
+		}
 		
 		/* origin, for help line */
 		if ((ob->partype & PARTYPE) == PARSKEL) {
@@ -2091,7 +2106,7 @@
 
 /* note, scene is the active scene while actual_scene is the scene the object resides in */
 void BKE_object_where_is_calc_time_ex(Scene *scene, Object *ob, float ctime,
-                                      RigidBodyWorld *rbw)
+                                      RigidBodyWorld *rbw, float r_originmat[3][3])
 {
 	if (ob == NULL) return;
 	
@@ -2103,7 +2118,7 @@
 		float slowmat[4][4] = MAT4_UNITY;
 		
 		/* calculate parent matrix */
-		solve_parenting(scene, ob, par, ob->obmat, slowmat, 0);
+		solve_parenting(scene, ob, par, ob->obmat, slowmat, r_originmat, false);
 		
 		/* "slow parent" is definitely not threadsafe, and may also give bad results jumping around 
 		 * An old-fashioned hack which probably doesn't really cut it anymore
@@ -2138,7 +2153,7 @@
 
 void BKE_object_where_is_calc_time(Scene *scene, Object *ob, float ctime)
 {
-	BKE_object_where_is_calc_time_ex(scene, ob, ctime, NULL);
+	BKE_object_where_is_calc_time_ex(scene, ob, ctime, NULL, NULL);
 }
 
 /* get object transformation matrix without recalculating dependencies and
@@ -2152,7 +2167,7 @@
 	if (ob->parent) {
 		Object *par = ob->parent;
 		
-		solve_parenting(scene, ob, par, obmat, slowmat, 1);
+		solve_parenting(scene, ob, par, obmat, slowmat, NULL, true);
 		
 		if (ob->partype & PARSLOW)
 			where_is_object_parslow(ob, obmat, slowmat);
@@ -2162,13 +2177,13 @@
 	}
 }
 
-void BKE_object_where_is_calc_ex(Scene *scene, RigidBodyWorld *rbw, Object *ob)
+void BKE_object_where_is_calc_ex(Scene *scene, RigidBodyWorld *rbw, Object *ob, float r_originmat[3][3])
 {
-	BKE_object_where_is_calc_time_ex(scene, ob, BKE_scene_frame_get(scene), rbw);
+	BKE_object_where_is_calc_time_ex(scene, ob, BKE_scene_frame_get(scene), rbw, r_originmat);
 }
 void BKE_object_where_is_calc(Scene *scene, Object *ob)
 {
-	BKE_object_where_is_calc_time_ex(scene, ob, BKE_scene_frame_get(scene), NULL);
+	BKE_object_where_is_calc_time_ex(scene, ob, BKE_scene_frame_get(scene), NULL, NULL);
 }
 
 /* was written for the old game engine (until 2.04) */
@@ -2186,7 +2201,7 @@
 	if (ob->parent) {
 		par = ob->parent;
 		
-		solve_parenting(scene, ob, par, ob->obmat, slowmat, 1);
+		solve_parenting(scene, ob, par, ob->obmat, slowmat, NULL, true);
 		
 		if (ob->partype & PARSLOW) {
 			fac1 = (float)(1.0 / (1.0 + fabs(ob->sf)));
@@ -2658,7 +2673,7 @@
 					copy_m4_m4(ob->obmat, ob->proxy_from->obmat);
 			}
 			else
-				BKE_object_where_is_calc_ex(scene, rbw, ob);
+				BKE_object_where_is_calc_ex(scene, rbw, ob, NULL);
 		}
 		
 		if (ob->recalc & OB_RECALC_DATA) {

Modified: branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/particle_system.c	2013-07-12 20:49:22 UTC (rev 58205)
+++ branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/particle_system.c	2013-07-12 21:36:45 UTC (rev 58206)
@@ -1823,36 +1823,76 @@
 		unit_qt(state->rot);
 
 		if (part->rotmode) {
+			bool use_global_space;
+
 			/* create vector into which rotation is aligned */
 			switch (part->rotmode) {
 				case PART_ROT_NOR:
 					copy_v3_v3(rot_vec, nor);
+					use_global_space = false;
 					break;
 				case PART_ROT_VEL:
 					copy_v3_v3(rot_vec, vel);
+					use_global_space = true;
 					break;
 				case PART_ROT_GLOB_X:
 				case PART_ROT_GLOB_Y:
 				case PART_ROT_GLOB_Z:
 					rot_vec[part->rotmode - PART_ROT_GLOB_X] = 1.0f;
+					use_global_space = true;
 					break;
 				case PART_ROT_OB_X:
 				case PART_ROT_OB_Y:
 				case PART_ROT_OB_Z:
 					copy_v3_v3(rot_vec, ob->obmat[part->rotmode - PART_ROT_OB_X]);
+					use_global_space = false;
 					break;
+				default:
+					use_global_space = true;
+					break;
 			}
 			
 			/* create rotation quat */
 			negate_v3(rot_vec);
-			vec_to_quat( q2,rot_vec, OB_POSX, OB_POSZ);
 
-			/* randomize rotation quat */
-			if (part->randrotfac!=0.0f)

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list