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

Gavin Howard gavin.d.howard at gmail.com
Mon Sep 2 06:36:41 CEST 2013


Revision: 59727
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59727
Author:   gdh
Date:     2013-09-02 04:36:41 +0000 (Mon, 02 Sep 2013)
Log Message:
-----------
Merged trunk into branch. Includes r59718 to r59726.

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

Modified Paths:
--------------
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_object.h
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_text.h
    branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/boids.c
    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/blenkernel/intern/text.c
    branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_edgehash.h
    branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_ghash.h
    branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_kdtree.h
    branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_memarena.h
    branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/BLI_ghash.c
    branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/BLI_kdtree.c
    branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/edgehash.c
    branches/soc-2013-cycles_mblur/source/blender/blenloader/intern/readfile.c
    branches/soc-2013-cycles_mblur/source/blender/bmesh/intern/bmesh_operator_api.h
    branches/soc-2013-cycles_mblur/source/blender/bmesh/intern/bmesh_operator_api_inline.h
    branches/soc-2013-cycles_mblur/source/blender/bmesh/intern/bmesh_operators.c
    branches/soc-2013-cycles_mblur/source/blender/bmesh/operators/bmo_extrude.c
    branches/soc-2013-cycles_mblur/source/blender/bmesh/operators/bmo_subdivide.c
    branches/soc-2013-cycles_mblur/source/blender/editors/include/ED_object.h
    branches/soc-2013-cycles_mblur/source/blender/editors/interface/interface_regions.c
    branches/soc-2013-cycles_mblur/source/blender/editors/object/object_relations.c
    branches/soc-2013-cycles_mblur/source/blender/editors/physics/particle_edit.c
    branches/soc-2013-cycles_mblur/source/blender/editors/space_outliner/outliner_edit.c
    branches/soc-2013-cycles_mblur/source/blender/editors/space_text/text_ops.c
    branches/soc-2013-cycles_mblur/source/blender/makesdna/DNA_modifier_types.h
    branches/soc-2013-cycles_mblur/source/blender/makesdna/DNA_object_types.h
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_modifier.c
    branches/soc-2013-cycles_mblur/source/blender/makesrna/intern/rna_object.c
    branches/soc-2013-cycles_mblur/source/blender/modifiers/intern/MOD_array.c
    branches/soc-2013-cycles_mblur/source/blender/python/bmesh/bmesh_py_ops_call.c

Property Changed:
----------------
    branches/soc-2013-cycles_mblur/
    branches/soc-2013-cycles_mblur/source/blender/editors/space_outliner/


Property changes on: branches/soc-2013-cycles_mblur
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_dev:58091-58422
/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,58822,58989
/branches/soc-2013-depsgraph_mt:57516,57900,57939-57940,57945,57958-57961,58151,58155-58156,58169,58277-58279,58282-58283,58711,58787,58789,58796,59086-59087,59163,59166,59170,59181,59259-59260
/branches/soc-2013-dingto:57424,57487,57507,57525,57599,57670,57918-57919,57981,58091,58245,58253,58587,58772,58774-58775,58828,58835,59032,59214,59220,59251,59601
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57388-59717
   + /branches/ge_dev:58091-58422
/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,58822,58989
/branches/soc-2013-depsgraph_mt:57516,57900,57939-57940,57945,57958-57961,58151,58155-58156,58169,58277-58279,58282-58283,58711,58787,58789,58796,59086-59087,59163,59166,59170,59181,59259-59260
/branches/soc-2013-dingto:57424,57487,57507,57525,57599,57670,57918-57919,57981,58091,58245,58253,58587,58772,58774-58775,58828,58835,59032,59214,59220,59251,59601
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57388-59726

Modified: branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_object.h
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_object.h	2013-09-02 03:13:51 UTC (rev 59726)
+++ branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_object.h	2013-09-02 04:36:41 UTC (rev 59727)
@@ -194,6 +194,8 @@
 struct LinkNode *BKE_object_groups(struct Object *ob);
 void             BKE_object_groups_clear(struct Scene *scene, struct Base *base, struct Object *object);
 
+struct KDTree *BKE_object_as_kdtree(struct Object *ob, int *r_tot);
+
 #ifdef __cplusplus
 }
 #endif

Modified: branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_text.h
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_text.h	2013-09-02 03:13:51 UTC (rev 59726)
+++ branches/soc-2013-cycles_mblur/source/blender/blenkernel/BKE_text.h	2013-09-02 04:36:41 UTC (rev 59727)
@@ -58,7 +58,7 @@
 
 char   *txt_to_buf			(struct Text *text);
 void	txt_clean_text		(struct Text *text);
-void	txt_order_cursors	(struct Text *text);
+void	txt_order_cursors	(struct Text *text, const bool reverse);
 int		txt_find_string		(struct Text *text, const char *findstr, int wrap, int match_case);
 int		txt_has_sel			(struct Text *text);
 int		txt_get_span		(struct TextLine *from, struct TextLine *to);

Modified: branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/boids.c
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/boids.c	2013-09-02 03:13:51 UTC (rev 59726)
+++ branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/boids.c	2013-09-02 04:36:41 UTC (rev 59727)
@@ -253,7 +253,8 @@
 
 	//check boids in own system
 	if (acbr->options & BRULE_ACOLL_WITH_BOIDS) {
-		neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, acbr->look_ahead * len_v3(pa->prev_state.vel), pa->prev_state.co, pa->prev_state.ave, &ptn);
+		neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, pa->prev_state.co, pa->prev_state.ave,
+		                                    &ptn, acbr->look_ahead * len_v3(pa->prev_state.vel));
 		if (neighbors > 1) for (n=1; n<neighbors; n++) {
 			copy_v3_v3(co1, pa->prev_state.co);
 			copy_v3_v3(vel1, pa->prev_state.vel);
@@ -299,7 +300,8 @@
 		ParticleSystem *epsys = psys_get_target_system(bbd->sim->ob, pt);
 
 		if (epsys) {
-			neighbors = BLI_kdtree_range_search(epsys->tree, acbr->look_ahead * len_v3(pa->prev_state.vel), pa->prev_state.co, pa->prev_state.ave, &ptn);
+			neighbors = BLI_kdtree_range_search(epsys->tree, pa->prev_state.co, pa->prev_state.ave,
+			                                    &ptn, acbr->look_ahead * len_v3(pa->prev_state.vel));
 			if (neighbors > 0) for (n=0; n<neighbors; n++) {
 				copy_v3_v3(co1, pa->prev_state.co);
 				copy_v3_v3(vel1, pa->prev_state.vel);
@@ -354,7 +356,8 @@
 	ParticleTarget *pt;
 	float len = 2.0f * val->personal_space * pa->size + 1.0f;
 	float vec[3] = {0.0f, 0.0f, 0.0f};
-	int neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, 2.0f * val->personal_space * pa->size, pa->prev_state.co, NULL, &ptn);
+	int neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, pa->prev_state.co, NULL,
+	                                        &ptn, 2.0f * val->personal_space * pa->size);
 	int ret = 0;
 
 	if (neighbors > 1 && ptn[1].dist!=0.0f) {
@@ -372,7 +375,8 @@
 		ParticleSystem *epsys = psys_get_target_system(bbd->sim->ob, pt);
 
 		if (epsys) {
-			neighbors = BLI_kdtree_range_search(epsys->tree, 2.0f * val->personal_space * pa->size, pa->prev_state.co, NULL, &ptn);
+			neighbors = BLI_kdtree_range_search(epsys->tree, pa->prev_state.co, NULL,
+			                                    &ptn, 2.0f * val->personal_space * pa->size);
 			
 			if (neighbors > 0 && ptn[0].dist < len) {
 				sub_v3_v3v3(vec, pa->prev_state.co, ptn[0].co);
@@ -392,7 +396,7 @@
 {
 	KDTreeNearest ptn[11];
 	float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f};
-	int neighbors = BLI_kdtree_find_n_nearest(bbd->sim->psys->tree, 11, pa->state.co, pa->prev_state.ave, ptn);
+	int neighbors = BLI_kdtree_find_nearest_n(bbd->sim->psys->tree, pa->state.co, pa->prev_state.ave, ptn, 11);
 	int n;
 	int ret = 0;
 
@@ -619,7 +623,8 @@
 	int n, ret = 0;
 
 	/* calculate own group strength */
-	int neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, fbr->distance, pa->prev_state.co, NULL, &ptn);
+	int neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, pa->prev_state.co, NULL,
+	                                        &ptn, fbr->distance);
 	for (n=0; n<neighbors; n++) {
 		bpa = bbd->sim->psys->particles[ptn[n].index].boid;
 		health += bpa->data.health;
@@ -635,7 +640,8 @@
 		if (epsys) {
 			epars = epsys->particles;
 
-			neighbors = BLI_kdtree_range_search(epsys->tree, fbr->distance, pa->prev_state.co, NULL, &ptn);
+			neighbors = BLI_kdtree_range_search(epsys->tree, pa->prev_state.co, NULL,
+			                                    &ptn, fbr->distance);
 			
 			health = 0.0f;
 

Modified: branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/dynamicpaint.c
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/dynamicpaint.c	2013-09-02 03:13:51 UTC (rev 59726)
+++ branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/dynamicpaint.c	2013-09-02 04:36:41 UTC (rev 59727)
@@ -3802,14 +3802,15 @@
 					 */
 					KDTreeNearest *nearest;
 
-					int n, particles = 0;
+					int n, particles;
 					float smooth_range = smooth * (1.0f - strength), dist;
 					/* calculate max range that can have particles with higher influence than the nearest one */
 					float max_range = smooth - strength * smooth + solidradius;
 					/* Make gcc happy! */
 					dist = max_range;
 
-					particles = BLI_kdtree_range_search(tree, max_range, bData->realCoord[bData->s_pos[index]].v, NULL, &nearest);
+					particles = BLI_kdtree_range_search(tree, bData->realCoord[bData->s_pos[index]].v, NULL,
+					                                    &nearest, max_range);
 
 					/* Find particle that produces highest influence */
 					for (n = 0; n < particles; n++) {

Modified: branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/object.c	2013-09-02 03:13:51 UTC (rev 59726)
+++ branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/object.c	2013-09-02 04:36:41 UTC (rev 59727)
@@ -64,6 +64,7 @@
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
 #include "BLI_linklist.h"
+#include "BLI_kdtree.h"
 
 #include "BLF_translation.h"
 
@@ -2012,30 +2013,24 @@
 
 static void ob_parvert3(Object *ob, Object *par, float mat[4][4])
 {
-	float cmat[3][3], v1[3], v2[3], v3[3], q[4];
 
 	/* in local ob space */
-	unit_m4(mat);
-	
-	if (ELEM4(par->type, OB_MESH, OB_SURF, OB_CURVE, OB_LATTICE)) {
-		
+	if (OB_TYPE_SUPPORT_PARVERT(par->type)) {
+		float cmat[3][3], v1[3], v2[3], v3[3], q[4];
+
 		give_parvert(par, ob->par1, v1);
 		give_parvert(par, ob->par2, v2);
 		give_parvert(par, ob->par3, v3);
-				
+
 		tri_to_quat(q, v1, v2, v3);
 		quat_to_mat3(cmat, q);
 		copy_m4_m3(mat, cmat);
-		
-		if (ob->type == OB_CURVE) {
-			copy_v3_v3(mat[3], v1);
-		}
-		else {
-			add_v3_v3v3(mat[3], v1, v2);
-			add_v3_v3(mat[3], v3);
-			mul_v3_fl(mat[3], 1.0f / 3.0f);
-		}
+
+		mid_v3_v3v3v3(mat[3], v1, v2, v3);
 	}
+	else {
+		unit_m4(mat);
+	}
 }
 
 /**
@@ -3440,3 +3435,128 @@
 		BKE_group_object_unlink(group, object, scene, base);
 	}
 }
+
+/**
+ * Return a KDTree from the deformed object (in worldspace)
+ *
+ * \note Only mesh objects currently support deforming, others are TODO.
+ *
+ * \param ob
+ * \param r_tot
+ * \return The kdtree or NULL if it can't be created.
+ */

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list