[Bf-blender-cvs] [9e1d43367cb] functions: Merge 'master' into 'functions'

Jacques Lucke noreply at git.blender.org
Wed Apr 17 11:11:04 CEST 2019


Commit: 9e1d43367cb54ba86d5a0381e1d633eb4f23d712
Author: Jacques Lucke
Date:   Wed Apr 17 10:26:46 2019 +0200
Branches: functions
https://developer.blender.org/rB9e1d43367cb54ba86d5a0381e1d633eb4f23d712

Merge 'master' into 'functions'

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



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

diff --cc release/datafiles/locale
index 199b3a7c2f0,199b3a7c2f0..2b81e2acc01
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@@ -1,1 -1,1 +1,1 @@@
--Subproject commit 199b3a7c2f03a3af6f612e092d3359f7b6f288cc
++Subproject commit 2b81e2acc011a8b79232a18dad3c00b8e654ceee
diff --cc release/scripts/addons
index 3683429de05,3683429de05..72a85d74000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@@ -1,1 -1,1 +1,1 @@@
--Subproject commit 3683429de050b8026835d17ae7288a436c31cdb6
++Subproject commit 72a85d74000d6f5e568dc4fb73381cc3d1ae7af8
diff --cc source/blender/blenkernel/BKE_fcurve.h
index 6610dbcc91b,52a4d00b117..039c6422cfd
--- a/source/blender/blenkernel/BKE_fcurve.h
+++ b/source/blender/blenkernel/BKE_fcurve.h
@@@ -223,10 -255,9 +255,11 @@@ struct FCurve *list_find_fcurve(ListBas
  struct FCurve *iter_step_fcurve(struct FCurve *fcu_iter, const char rna_path[]);
  
  /* high level function to get an fcurve from C without having the rna */
- struct FCurve *id_data_find_fcurve(ID *id, void *data, struct StructRNA *type, const char *prop_name, int index, bool *r_driven);
+ struct FCurve *id_data_find_fcurve(
+     ID *id, void *data, struct StructRNA *type, const char *prop_name, int index, bool *r_driven);
  
 +void *get_driver_variable_function(struct DriverVar *dvar);
 +
  /* Get list of LinkData's containing pointers to the F-Curves which control the types of data indicated
   * e.g.  numMatches = list_find_data_fcurves(matches, &act->curves, "pose.bones[", "MyFancyBone");
   */
diff --cc source/blender/blenkernel/CMakeLists.txt
index 3fe90da7ad4,019ab929f16..14a0071f9b3
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@@ -19,37 -19,36 +19,37 @@@
  # ***** END GPL LICENSE BLOCK *****
  
  set(INC
- 	.
- 	../blenfont
- 	../blenlib
- 	../blenloader
- 	../blentranslation
- 	../depsgraph
- 	../draw
- 	../functions
- 	../gpu
- 	../ikplugin
- 	../imbuf
- 	../makesdna
- 	../makesrna
- 	../bmesh
- 	../modifiers
- 	../gpencil_modifiers
- 	../shader_fx
- 	../nodes
- 	../physics
- 	../render/extern/include
- 	../../../intern/ghost
- 	../../../intern/guardedalloc
- 	../../../intern/glew-mx
- 	../../../intern/iksolver/extern
- 	../../../intern/memutil
- 	../../../intern/mikktspace
- 	../../../intern/atomic
- 	../../../intern/clog
- 	../../../intern/libmv
- 	../../../intern/opensubdiv
- 	../../../extern/curve_fit_nd
+   .
+   ../blenfont
+   ../blenlib
+   ../blenloader
+   ../blentranslation
+   ../depsgraph
+   ../draw
++  ../functions
+   ../gpu
+   ../ikplugin
+   ../imbuf
+   ../makesdna
+   ../makesrna
+   ../bmesh
+   ../modifiers
+   ../gpencil_modifiers
+   ../shader_fx
+   ../nodes
+   ../physics
+   ../render/extern/include
+   ../../../intern/ghost
+   ../../../intern/guardedalloc
+   ../../../intern/glew-mx
+   ../../../intern/iksolver/extern
+   ../../../intern/memutil
+   ../../../intern/mikktspace
+   ../../../intern/atomic
+   ../../../intern/clog
+   ../../../intern/libmv
+   ../../../intern/opensubdiv
+   ../../../extern/curve_fit_nd
  )
  
  set(INC_SYS
diff --cc source/blender/blenkernel/intern/fcurve.c
index 505f1e5b9ee,4a2a610918c..ec40777291b
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@@ -1497,195 -1550,153 +1552,194 @@@ static float dvar_eval_locDiff(ChannelD
  /* evaluate 'transform channel' driver variable */
  static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
  {
- 	DriverTarget *dtar = &dvar->targets[0];
- 	Object *ob = (Object *)dtar_id_ensure_proxy_from(dtar->id);
- 	bPoseChannel *pchan;
- 	float mat[4][4];
- 	float oldEul[3] = {0.0f, 0.0f, 0.0f};
- 	bool use_eulers = false;
- 	short rot_order = ROT_MODE_EUL;
- 
- 	/* check if this target has valid data */
- 	if ((ob == NULL) || (GS(ob->id.name) != ID_OB)) {
- 		/* invalid target, so will not have enough targets */
- 		driver->flag |= DRIVER_FLAG_INVALID;
- 		dtar->flag   |= DTAR_FLAG_INVALID;
- 		return 0.0f;
- 	}
- 	else {
- 		/* target should be valid now */
- 		dtar->flag &= ~DTAR_FLAG_INVALID;
- 	}
- 
- 	/* try to get posechannel */
- 	pchan = BKE_pose_channel_find_name(ob->pose, dtar->pchan_name);
- 
- 	/* check if object or bone, and get transform matrix accordingly
- 	 * - "useEulers" code is used to prevent the problems associated with non-uniqueness
- 	 *   of euler decomposition from matrices [#20870]
- 	 * - localspace is for [#21384], where parent results are not wanted
- 	 *   but local-consts is for all the common "corrective-shapes-for-limbs" situations
- 	 */
- 	if (pchan) {
- 		/* bone */
- 		if (pchan->rotmode > 0) {
- 			copy_v3_v3(oldEul, pchan->eul);
- 			rot_order = pchan->rotmode;
- 			use_eulers = true;
- 		}
- 
- 		if (dtar->flag & DTAR_FLAG_LOCALSPACE) {
- 			if (dtar->flag & DTAR_FLAG_LOCAL_CONSTS) {
- 				/* just like how the constraints do it! */
- 				copy_m4_m4(mat, pchan->pose_mat);
- 				BKE_constraint_mat_convertspace(ob, pchan, mat, CONSTRAINT_SPACE_POSE, CONSTRAINT_SPACE_LOCAL, false);
- 			}
- 			else {
- 				/* specially calculate local matrix, since chan_mat is not valid
- 				 * since it stores delta transform of pose_mat so that deforms work
- 				 * so it cannot be used here for "transform" space
- 				 */
- 				BKE_pchan_to_mat4(pchan, mat);
- 			}
- 		}
- 		else {
- 			/* worldspace matrix */
- 			mul_m4_m4m4(mat, ob->obmat, pchan->pose_mat);
- 		}
- 	}
- 	else {
- 		/* object */
- 		if (ob->rotmode > 0) {
- 			copy_v3_v3(oldEul, ob->rot);
- 			rot_order = ob->rotmode;
- 			use_eulers = true;
- 		}
- 
- 		if (dtar->flag & DTAR_FLAG_LOCALSPACE) {
- 			if (dtar->flag & DTAR_FLAG_LOCAL_CONSTS) {
- 				/* just like how the constraints do it! */
- 				copy_m4_m4(mat, ob->obmat);
- 				BKE_constraint_mat_convertspace(ob, NULL, mat, CONSTRAINT_SPACE_WORLD, CONSTRAINT_SPACE_LOCAL, false);
- 			}
- 			else {
- 				/* transforms to matrix */
- 				BKE_object_to_mat4(ob, mat);
- 			}
- 		}
- 		else {
- 			/* worldspace matrix - just the good-old one */
- 			copy_m4_m4(mat, ob->obmat);
- 		}
- 	}
- 
- 	/* check which transform */
- 	if (dtar->transChan >= MAX_DTAR_TRANSCHAN_TYPES) {
- 		/* not valid channel */
- 		return 0.0f;
- 	}
- 	else if (dtar->transChan >= DTAR_TRANSCHAN_SCALEX) {
- 		/* Extract scale, and choose the right axis,
- 		 * inline 'mat4_to_size'. */
- 		return len_v3(mat[dtar->transChan - DTAR_TRANSCHAN_SCALEX]);
- 	}
- 	else if (dtar->transChan >= DTAR_TRANSCHAN_ROTX) {
- 		/* extract rotation as eulers (if needed)
- 		 * - definitely if rotation order isn't eulers already
- 		 * - if eulers, then we have 2 options:
- 		 *     a) decompose transform matrix as required, then try to make eulers from
- 		 *        there compatible with original values
- 		 *     b) [NOT USED] directly use the original values (no decomposition)
- 		 *         - only an option for "transform space", if quality is really bad with a)
- 		 */
- 		float eul[3];
- 
- 		mat4_to_eulO(eul, rot_order, mat);
- 
- 		if (use_eulers) {
- 			compatible_eul(eul, oldEul);
- 		}
- 
- 		return eul[dtar->transChan - DTAR_TRANSCHAN_ROTX];
- 	}
- 	else {
- 		/* extract location and choose right axis */
- 		return mat[3][dtar->transChan];
- 	}
+   DriverTarget *dtar = &dvar->targets[0];
+   Object *ob = (Object *)dtar_id_ensure_proxy_from(dtar->id);
+   bPoseChannel *pchan;
+   float mat[4][4];
+   float oldEul[3] = {0.0f, 0.0f, 0.0f};
+   bool use_eulers = false;
+   short rot_order = ROT_MODE_EUL;
+ 
+   /* check if this target has valid data */
+   if ((ob == NULL) || (GS(ob->id.name) != ID_OB)) {
+     /* invalid target, so will not have enough targets */
+     driver->flag |= DRIVER_FLAG_INVALID;
+     dtar->flag |= DTAR_FLAG_INVALID;
+     return 0.0f;
+   }
+   else {
+     /* target should be valid now */
+     dtar->flag &= ~DTAR_FLAG_INVALID;
+   }
+ 
+   /* try to get posechannel */
+   pchan = BKE_pose_channel_find_name(ob->pose, dtar->pchan_name);
+ 
+   /* check if object or bone, and get transform matrix accordingly
+    * - "useEulers" code is used to prevent the problems associated with non-uniqueness
+    *   of euler decomposition from matrices [#20870]
+    * - localspace is for [#21384], where parent results are not wanted
+    *   but local-consts is for all the common "corrective-shapes-for-limbs" situations
+    */
+   if (pchan) {
+     /* bone */
+     if (pchan->rotmode > 0) {
+       copy_v3_v3(oldEul, pchan->eul);
+       rot_order = pchan->rotmode;
+       use_eulers = true;
+     }
+ 
+     if (dtar->flag & DTAR_FLAG_LOCALSPACE) {
+       if (dtar->flag & DTAR_FLAG_LOCAL_CONSTS) {
+         /* just like how the constraints do it! */
+         copy_m4_m4(mat, pchan->pose_mat);
+         BKE_constraint_mat_convertspace(
+             ob, pchan, mat, CONSTRAINT_SPACE_POSE, CONSTRAINT_SPACE_LOCAL, false);
+       }
+       else {
+         /* specially calculate local matrix, since chan_mat is not valid
+          * since it stores delta transform of pose_mat so that deforms work
+          * so it cannot be used here for "transform" space
+          */
+         BKE_pchan_to_mat4(pchan, mat);
+       }
+     }
+     else {
+       /* worldspace matrix */
+       mul_m4_m4m4(mat, ob->obmat, pchan->pose_mat);
+     }
+   }
+   else {
+     /* object */
+     if (ob->rotmode > 0) {
+       copy_v3_v3(oldEul, ob->rot);
+       rot_order = ob->rotmode;
+       use_eulers = true;
+     }
+ 
+     if (dtar->flag & DTAR_FLAG_LOCALSPACE) {
+       if (dtar->flag & DTAR_FLAG_LOCAL_CONSTS) {
+         /* just like how the constraints do it! */
+         copy_m4_m4(mat, ob->obmat);
+         BKE_constraint_mat_convertspace(
+             ob, NULL, mat, CONSTRAINT_SPACE_WORLD, CONSTRAINT_SPACE_LOCAL, false);
+       }
+       else {
+         /* transforms to matrix */
+         BKE_object_to_mat4(ob, mat);
+       }
+     }
+     else {
+       /* worldspace matrix - just the good-old one */
+       copy_m4_m4(mat, ob->obmat);
+     }
+   }
+ 
+   /* check which transform */
+   if (dtar->transChan >= MAX_DTAR_TRANSCHAN_TYPES) {
+     /* not valid channel */
+     return 0.0f;
+   }
+   else if (dtar->transChan >= DTAR_TRANSCHAN_SCALEX) {
+     /* Extract scale, and choose the right axis,
+      * inline 'ma

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list