[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58194] branches/soc-2013-depsgraph_mt: Merging r58166 through r58193 from trunk into soc-2013-depsgraph_mt

Sergey Sharybin sergey.vfx at gmail.com
Fri Jul 12 11:13:15 CEST 2013


Revision: 58194
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58194
Author:   nazgul
Date:     2013-07-12 09:13:15 +0000 (Fri, 12 Jul 2013)
Log Message:
-----------
Merging r58166 through r58193 from trunk into soc-2013-depsgraph_mt

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

Modified Paths:
--------------
    branches/soc-2013-depsgraph_mt/intern/cycles/blender/addon/__init__.py
    branches/soc-2013-depsgraph_mt/intern/cycles/blender/addon/ui.py
    branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/particle_system.c
    branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_math_geom.h
    branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_math_vector.h
    branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/math_geom.c
    branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/math_vector.c
    branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_construct.c
    branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_construct.h
    branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_interp.c
    branches/soc-2013-depsgraph_mt/source/blender/bmesh/operators/bmo_bridge.c
    branches/soc-2013-depsgraph_mt/source/blender/bmesh/tools/bmesh_bevel.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/armature/armature_utils.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/mesh/editmesh_loopcut.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/space_node/node_select.c
    branches/soc-2013-depsgraph_mt/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
    branches/soc-2013-depsgraph_mt/source/blender/freestyle/intern/view_map/ViewMap.cpp
    branches/soc-2013-depsgraph_mt/source/blender/makesrna/intern/rna_render.c
    branches/soc-2013-depsgraph_mt/source/blender/render/extern/include/RE_engine.h
    branches/soc-2013-depsgraph_mt/source/blender/render/intern/source/convertblender.c
    branches/soc-2013-depsgraph_mt/source/blender/render/intern/source/external_engine.c

Property Changed:
----------------
    branches/soc-2013-depsgraph_mt/
    branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/space_outliner/


Property changes on: branches/soc-2013-depsgraph_mt
___________________________________________________________________
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
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57395-58165
   + /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
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57395-58193

Modified: branches/soc-2013-depsgraph_mt/intern/cycles/blender/addon/__init__.py
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/cycles/blender/addon/__init__.py	2013-07-12 08:50:05 UTC (rev 58193)
+++ branches/soc-2013-depsgraph_mt/intern/cycles/blender/addon/__init__.py	2013-07-12 09:13:15 UTC (rev 58194)
@@ -41,6 +41,7 @@
     bl_use_shading_nodes = True
     bl_use_preview = True
     bl_use_exclude_layers = True
+    bl_use_save_buffers = True
 
     def __init__(self):
         self.session = None

Modified: branches/soc-2013-depsgraph_mt/intern/cycles/blender/addon/ui.py
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/cycles/blender/addon/ui.py	2013-07-12 08:50:05 UTC (rev 58193)
+++ branches/soc-2013-depsgraph_mt/intern/cycles/blender/addon/ui.py	2013-07-12 09:13:15 UTC (rev 58194)
@@ -213,23 +213,25 @@
         subsub.enabled = not rd.use_border
         subsub.prop(rd, "use_save_buffers")
 
-        col = split.column()
+        col = split.column(align=True)
 
-        sub = col.column(align=True)
-        sub.label(text="Acceleration structure:")
-        sub.prop(cscene, "debug_bvh_type", text="")
-        sub.prop(cscene, "debug_use_spatial_splits")
-        sub.prop(cscene, "use_cache")
+        col.label(text="Viewport:")
+        col.prop(cscene, "debug_bvh_type", text="")
+        col.separator()
+        col.prop(cscene, "preview_start_resolution")
 
-        sub = col.column(align=True)
-        sub.label(text="Viewport:")
-        sub.prop(cscene, "preview_start_resolution")
+        col.separator()
 
-        sub = col.column(align=True)
-        sub.label(text="Final Render:")
-        sub.prop(rd, "use_persistent_data", text="Persistent Images")
+        col.label(text="Final Render:")
+        col.prop(cscene, "use_cache")
+        col.prop(rd, "use_persistent_data", text="Persistent Images")
 
+        col.separator()
 
+        col.label(text="Acceleration structure:")   
+        col.prop(cscene, "debug_use_spatial_splits")
+
+
 class CyclesRender_PT_opengl(CyclesButtonsPanel, Panel):
     bl_label = "OpenGL Render"
     bl_options = {'DEFAULT_CLOSED'}

Modified: branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/particle_system.c	2013-07-12 08:50:05 UTC (rev 58193)
+++ branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/particle_system.c	2013-07-12 09:13:15 UTC (rev 58194)
@@ -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)
-				interp_qt_qtqt(rot, q2, r_rot, part->randrotfac);
-			else
-				copy_qt_qt(rot,q2);
+			if (use_global_space) {
+				/* calculate rotation in global-space */
+				vec_to_quat(q2, rot_vec, OB_POSX, OB_POSZ);
 
+				/* randomize rotation quat */
+				if (part->randrotfac != 0.0f) {
+					interp_qt_qtqt(rot, q2, r_rot, part->randrotfac);
+				}
+				else {
+					copy_qt_qt(rot, q2);
+				}
+			}
+			else {
+				/* calculate rotation in local-space */
+				float q_obmat[4];
+				float q_imat[4];
+				float tvec[3];
+
+				mat4_to_quat(q_obmat, ob->obmat);
+				invert_qt_qt(q_imat, q_obmat);
+
+				copy_v3_v3(tvec, rot_vec);
+				mul_qt_v3(q_imat, tvec);
+				normalize_v3(tvec);
+				vec_to_quat(q2, tvec, OB_POSX, OB_POSZ);
+
+				/* randomize rotation quat */
+				if (part->randrotfac != 0.0f) {
+					mul_qt_qtqt(r_rot, r_rot, q_imat);
+					interp_qt_qtqt(rot, q2, r_rot, part->randrotfac);
+				}
+				else {
+					copy_qt_qt(rot, q2);
+				}
+
+				mul_qt_qtqt(rot, q_obmat, rot);
+			}
+
 			/* rotation phase */
 			phasefac = part->phasefac;
 			if (part->randphasefac != 0.0f)

Modified: branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_math_geom.h
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_math_geom.h	2013-07-12 08:50:05 UTC (rev 58193)
+++ branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_math_geom.h	2013-07-12 09:13:15 UTC (rev 58194)
@@ -75,7 +75,8 @@
 
 float dist_to_plane_normalized_v3(const float p[3], const float plane_co[3], const float plane_no_unit[3]);
 float dist_to_plane_v3(const float p[3], const float plane_co[3], const float plane_no[3]);
-float dist_to_line_segment_v3(const float p[3], const float l1[3], const float l2[3]);
+float dist_squared_to_line_segment_v3(const float p[3], const float l1[3], const float l2[3]);
+float         dist_to_line_segment_v3(const float p[3], const float l1[3], const float l2[3]);
 float dist_to_line_v3(const float p[3], const float l1[3], const float l2[3]);
 float closest_to_line_v3(float r[3], const float p[3], const float l1[3], const float l2[3]);
 float closest_to_line_v2(float r[2], const float p[2], const float l1[2], const float l2[2]);

Modified: branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_math_vector.h
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_math_vector.h	2013-07-12 08:50:05 UTC (rev 58193)
+++ branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_math_vector.h	2013-07-12 09:13:15 UTC (rev 58194)
@@ -240,6 +240,7 @@
 void print_v2(const char *str, const float a[2]);
 void print_v3(const char *str, const float a[3]);
 void print_v4(const char *str, const float a[4]);
+void print_vn(const char *str, const float v[], const int n);
 
 MINLINE void normal_short_to_float_v3(float r[3], const short n[3]);
 MINLINE void normal_float_to_short_v3(short r[3], const float n[3]);

Modified: branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/math_geom.c
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/math_geom.c	2013-07-12 08:50:05 UTC (rev 58193)
+++ branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/math_geom.c	2013-07-12 09:13:15 UTC (rev 58194)
@@ -324,21 +324,26 @@
 	return line_point_factor_v3(p, plane_co, plane_co_other);
 }
 
-/* distance v1 to line-piece v2-v3 in 3D */
-float dist_to_line_segment_v3(const float v1[3], const float v2[3], const float v3[3])
+/* distance v1 to line-piece l1-l2 in 3D */
+float dist_squared_to_line_segment_v3(const float p[3], const float l1[3], const float l2[3])
 {
 	float closest[3];
 
-	closest_to_line_segment_v3(closest, v1, v2, v3);
+	closest_to_line_segment_v3(closest, p, l1, l2);
 
-	return len_v3v3(closest, v1);
+	return len_squared_v3v3(closest, p);
 }
 
-float dist_to_line_v3(const float v1[3], const float v2[3], const float v3[3])
+float dist_to_line_segment_v3(const float p[3], const float l1[3], const float l2[3])
 {
+	return sqrtf(dist_squared_to_line_segment_v3(p, l1, l2));
+}
+
+float dist_to_line_v3(const float v1[3], const float l1[3], const float l2[3])
+{
 	float closest[3];
 
-	closest_to_line_v3(closest, v1, v2, v3);
+	closest_to_line_v3(closest, v1, l1, l2);
 
 	return len_v3v3(closest, v1);
 }
@@ -2598,45 +2603,62 @@
 
 void interp_weights_poly_v3(float *w, float v[][3], const int n, const float co[3])
 {
-	/* TODO: t1 and t2 overlap each iter, we could call this only once per iter and reuse previous value */
-	float totweight, t1, t2, len, *vmid, *vprev, *vnext;
-	int i, i_next, i_curr;
+	const float eps = 0.00001f;  /* take care, low values cause [#36105] */
+	const float eps_sq = eps * eps;
+	float *v_curr, *v_next;
+	float ht_prev, ht;  /* half tangents */
+	float totweight = 0.0f;
+	int i = 0;
+	bool vert_interp = false;
 	bool edge_interp = false;
 
-	totweight = 0.0f;
+	v_curr = v[0];
+	v_next = v[1];
 
-	for (i = 0; i < n; i++) {
-		i_curr = i;
-		i_next = (i == n - 1) ? 0 : i + 1;
+	ht_prev = mean_value_half_tan_v3(co, v[n - 1], v_curr);
 
-		vmid = v[i];

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list