[Bf-blender-cvs] [ae37d4dac20] experimental-build: Merge branch 'experimental-build' of git.blender.org:blender into experimental-build

Darshan Kadu noreply at git.blender.org
Mon Jul 24 17:27:21 CEST 2017


Commit: ae37d4dac2081f9f4222cfe10cf90aa899cee4e3
Author: Darshan Kadu
Date:   Mon Jul 24 20:51:38 2017 +0530
Branches: experimental-build
https://developer.blender.org/rBae37d4dac2081f9f4222cfe10cf90aa899cee4e3

Merge branch 'experimental-build' of git.blender.org:blender into experimental-build

===================================================================



===================================================================

diff --cc intern/opensubdiv/opensubdiv_capi.cc
index 91803551f12,0a55a432cc6..8797651fc28
--- a/intern/opensubdiv/opensubdiv_capi.cc
+++ b/intern/opensubdiv/opensubdiv_capi.cc
@@@ -385,5 -427,27 +427,31 @@@ int openSubdiv_supportGPUDisplay(void
  
  int openSubdiv_getVersionHex(void)
  {
++<<<<<<< HEAD
++	return OPENSUBDIV_VERSION_NUMBER;
++=======
+ #if defined(OPENSUBDIV_VERSION_NUMBER)
  	return OPENSUBDIV_VERSION_NUMBER;
+ #elif defined(OPENSUBDIV_VERSION_MAJOR)
+ 	return OPENSUBDIV_VERSION_MAJOR * 10000 +
+ 	       OPENSUBDIV_VERSION_MINOR * 100 +
+ 	       OPENSUBDIV_VERSION_PATCH;
+ #elif defined(OPENSUBDIV_VERSION)
+ 	const char* version = STRINGIFY(OPENSUBDIV_VERSION);
+ 	if (version[0] == 'v') {
+ 		version += 1;
+ 	}
+ 	int major = 0, minor = 0, patch = 0;
+ 	vector<string> tokens;
+ 	stringSplit(&tokens, version, "_", true);
+ 	if (tokens.size() == 3) {
+ 		major = atoi(tokens[0].c_str());
+ 		minor = atoi(tokens[1].c_str());
+ 		patch = atoi(tokens[2].c_str());
+ 	}
+ 	return major * 10000 + minor * 100 + patch;
+ #else
+ 	return 0;
+ #endif
++>>>>>>> ba8737c2ab00b5e04561396f68a5b13820ac2788
  }
diff --cc source/blender/blenkernel/intern/DerivedMesh.c
index eba5814d897,7eea8224ba1..6c47f0e2951
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@@ -3322,7 -3322,7 +3322,11 @@@ void DM_calc_loop_tangents_step_0
          const CustomData *loopData, bool calc_active_tangent,
          const char (*tangent_names)[MAX_NAME], int tangent_names_count,
          bool *rcalc_act, bool *rcalc_ren, int *ract_uv_n, int *rren_uv_n,
++<<<<<<< HEAD
 +        char *ract_uv_name, char *rren_uv_name, char *rtangent_mask)
++=======
+         char *ract_uv_name, char *rren_uv_name, short *rtangent_mask)
++>>>>>>> ba8737c2ab00b5e04561396f68a5b13820ac2788
  {
  	/* Active uv in viewport */
  	int layer_index = CustomData_get_layer_index(loopData, CD_MLOOPUV);
diff --cc source/blender/bmesh/intern/bmesh_queries.c
index f5c14304ea3,668fb998254..3e85463cf95
--- a/source/blender/bmesh/intern/bmesh_queries.c
+++ b/source/blender/bmesh/intern/bmesh_queries.c
@@@ -1511,12 -1511,11 +1511,16 @@@ float BM_loop_calc_face_angle(const BML
   * Calculate the normal at this loop corner or fallback to the face normal on straight lines.
   *
   * \param l The loop to calculate the normal at
+  * \param epsilon: Value to avoid numeric errors (1e-5f works well).
   * \param r_normal Resulting normal
   */
- void BM_loop_calc_face_normal(const BMLoop *l, float r_normal[3])
+ float BM_loop_calc_face_normal_safe_ex(const BMLoop *l, const float epsilon_sq, float r_normal[3])
  {
++<<<<<<< HEAD
 +#define FEPSILON 1e-5f
 +
++=======
++>>>>>>> ba8737c2ab00b5e04561396f68a5b13820ac2788
  	/* Note: we cannot use result of normal_tri_v3 here to detect colinear vectors (vertex on a straight line)
  	 * from zero value, because it does not normalize both vectors before making crossproduct.
  	 * Instead of adding two costly normalize computations, just check ourselves for colinear case. */
@@@ -1525,20 -1524,55 +1529,71 @@@
  	sub_v3_v3v3(v1, l->prev->v->co, l->v->co);
  	sub_v3_v3v3(v2, l->next->v->co, l->v->co);
  
++<<<<<<< HEAD
 +	const float fac = (v2[0] == 0.0f) ? ((v2[1] == 0.0f) ? ((v2[2] == 0.0f) ? 0.0f : v1[2] / v2[2]) : v1[1] / v2[1]) : v1[0] / v2[0];
 +
 +	mul_v3_v3fl(v_tmp, v2, fac);
 +	sub_v3_v3(v_tmp, v1);
 +	if (fac != 0.0f && !is_zero_v3(v1) && len_manhattan_v3(v_tmp) > FEPSILON) {
 +		/* Not co-linear, we can compute crossproduct and normalize it into normal. */
 +		cross_v3_v3v3(r_normal, v1, v2);
 +		normalize_v3(r_normal);
++=======
+ 	const float fac =
+ 	        ((v2[0] == 0.0f) ?
+ 	        ((v2[1] == 0.0f) ?
+ 	        ((v2[2] == 0.0f) ?  0.0f : v1[2] / v2[2]) : v1[1] / v2[1]) : v1[0] / v2[0]);
+ 
+ 	mul_v3_v3fl(v_tmp, v2, fac);
+ 	sub_v3_v3(v_tmp, v1);
+ 	if (fac != 0.0f && !is_zero_v3(v1) && len_squared_v3(v_tmp) > epsilon_sq) {
+ 		/* Not co-linear, we can compute crossproduct and normalize it into normal. */
+ 		cross_v3_v3v3(r_normal, v1, v2);
+ 		return normalize_v3(r_normal);
++>>>>>>> ba8737c2ab00b5e04561396f68a5b13820ac2788
  	}
  	else {
  		copy_v3_v3(r_normal, l->f->no);
+ 		return 0.0f;
+ 	}
+ }
+ 
+ /**
+  * #BM_loop_calc_face_normal_safe_ex with pre-defined sane epsilon.
+  *
+  * Since this doesn't scale baed on triangle size, fixed value works well.
+  */
+ float BM_loop_calc_face_normal_safe(const BMLoop *l, float r_normal[3])
+ {
+ 	return BM_loop_calc_face_normal_safe_ex(l, 1e-5f, r_normal);
+ }
+ 
+ /**
+  * \brief BM_loop_calc_face_normal
+  *
+  * Calculate the normal at this loop corner or fallback to the face normal on straight lines.
+  *
+  * \param l The loop to calculate the normal at
+  * \param r_normal Resulting normal
+  * \return The length of the cross product (double the area).
+  */
+ float BM_loop_calc_face_normal(const BMLoop *l, float r_normal[3])
+ {
+ 	float v1[3], v2[3];
+ 	sub_v3_v3v3(v1, l->prev->v->co, l->v->co);
+ 	sub_v3_v3v3(v2, l->next->v->co, l->v->co);
+ 
+ 	cross_v3_v3v3(r_normal, v1, v2);
+ 	const float len = normalize_v3(r_normal);
+ 	if (UNLIKELY(len == 0.0f)) {
+ 		copy_v3_v3(r_normal, l->f->no);
  	}
++<<<<<<< HEAD
 +
 +#undef FEPSILON
++=======
+ 	return len;
++>>>>>>> ba8737c2ab00b5e04561396f68a5b13820ac2788
  }
  
  /**
diff --cc source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 55f1f93be6a,a90f8ff02b6..359ee01652c
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@@ -670,6 -670,13 +670,16 @@@ void DepsgraphNodeBuilder::build_partic
  	/* component for all particle systems */
  	ComponentDepsNode *psys_comp =
  	        add_component_node(&ob->id, DEG_NODE_TYPE_EVAL_PARTICLES);
++<<<<<<< HEAD
++=======
+ 
+ 	add_operation_node(psys_comp,
+ 	                   function_bind(BKE_particle_system_eval_init,
+ 	                                 _1,
+ 	                                 scene,
+ 	                                 ob),
+ 	                   DEG_OPCODE_PSYS_EVAL_INIT);
++>>>>>>> ba8737c2ab00b5e04561396f68a5b13820ac2788
  
  	/* particle systems */
  	LINKLIST_FOREACH (ParticleSystem *, psys, &ob->particlesystem) {
@@@ -682,11 -689,7 +692,15 @@@
  		/* this particle system */
  		// TODO: for now, this will just be a placeholder "ubereval" node
  		add_operation_node(psys_comp,
++<<<<<<< HEAD
 +		                   function_bind(BKE_particle_system_eval,
 +		                                 _1,
 +		                                 scene,
 +		                                 ob,
 +		                                 psys),
++=======
+ 		                   NULL,
++>>>>>>> ba8737c2ab00b5e04561396f68a5b13820ac2788
  		                   DEG_OPCODE_PSYS_EVAL,
  		                   psys->name);
  	}
diff --cc source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index dbe8a5f1984,a1abcb96411..3fc960b3074
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@@ -1254,10 -1261,7 +1261,14 @@@ void DepsgraphRelationBuilder::build_pa
  		if (!psys_check_enabled(ob, psys, G.is_rendering))
  			continue;
  
++<<<<<<< HEAD
 +		/* TODO(sergey): Are all particle systems depends on time?
 +		 * Hair without dynamics i.e.
 +		 */
 +		add_relation(time_src_key, psys_key, "TimeSrc -> PSys");
++=======
+ 		add_relation(eval_init_key, psys_key, "Init -> PSys");
++>>>>>>> ba8737c2ab00b5e04561396f68a5b13820ac2788
  
  		/* TODO(sergey): Currently particle update is just a placeholder,
  		 * hook it to the ubereval node so particle system is getting updated
diff --cc source/blender/editors/object/object_add.c
index a901560079a,4ed1e85fb48..9d3d8defeaf
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@@ -1685,7 -1682,7 +1682,11 @@@ static int convert_exec(bContext *C, wm
  			 * However, changing this is more design than bugfix, not to mention convoluted code below,
  			 * so that will be for later.
  			 * But at the very least, do not do that with linked IDs! */
++<<<<<<< HEAD
 +			if ((ID_IS_LINKED_DATABLOCK(ob) || ID_IS_LINKED_DATABLOCK(ob->data)) && !keep_original) {
++=======
+ 			if ((ID_IS_LINKED_DATABLOCK(ob) || (ob->data && ID_IS_LINKED_DATABLOCK(ob->data))) && !keep_original) {
++>>>>>>> ba8737c2ab00b5e04561396f68a5b13820ac2788
  				keep_original = true;
  				BKE_reportf(op->reports, RPT_INFO,
  				            "Converting some linked object/object data, enforcing 'Keep Original' option to True");
diff --cc source/blender/editors/transform/transform_snap_object.c
index aecd24d4e40,6c62c091a78..fa149c241f0
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@@ -234,52 -861,9 +861,13 @@@ static bool raycastObjects
  
  /* -------------------------------------------------------------------- */
  
++<<<<<<< HEAD
 +/** Common utilities
++=======
+ /** Snap Nearest utilities
++>>>>>>> ba8737c2ab00b5e04561396f68a5b13820ac2788
   * \{ */
  
- /**
-  * Generates a struct with the immutable parameters that will be used on all objects.
-  *
-  * \param snap_to: Element to snap, Vertice, Edge or Face.
-  * \param view_proj: ORTHO or PERSP.
-  * Currently only works one at a time, but can eventually operate as flag.
-  *
-  * \param mval: Mouse coords.
-  * (When NULL, ray-casting is handled without any projection matrix correction.)
-  * \param ray_origin: ray_start before being moved toward the ray_normal at the distance from vew3d clip_min.
-  * \param ray_start: ray_origin moved for the start clipping plane (clip_min).
-  * \param ray_direction: Unit length direction of the ray.
-  * \param depth_range: distances of clipe plane min and clip plane max;
-  */
- static void snap_data_set(
-         SnapData *snapdata,
-         const ARegion *ar, const unsigned short snap_to, const enum eViewProj view_proj,
-         const float mval[2], const float ray_origin[3], const float ray_start[3],
-         const float ray_direction[3], const float depth_range[2])
- {
- 	if (ar) {
- 		copy_m4_m4(snapdata->pmat, ((RegionView3D *)ar->regiondata)->persmat

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list