[Bf-blender-cvs] [eaf8608ba5e] blender2.8: Merge branch 'master' into blender2.8

Sergey Sharybin noreply at git.blender.org
Wed Apr 4 09:55:07 CEST 2018


Commit: eaf8608ba5e949f0bc81a57bc54822d4283a312a
Author: Sergey Sharybin
Date:   Wed Apr 4 09:54:50 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBeaf8608ba5e949f0bc81a57bc54822d4283a312a

Merge branch 'master' into blender2.8

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



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

diff --cc source/blender/blenkernel/BKE_armature.h
index 192690c074c,f6de39c897e..bf37224c85f
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@@ -165,49 -165,45 +165,47 @@@ struct bPoseChannel *BKE_armature_splin
          struct bSplineIKConstraint *data);
  
  void BKE_pose_splineik_init_tree(struct Scene *scene, struct Object *ob, float ctime);
 -void BKE_splineik_execute_tree(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan_root, float ctime);
 +void BKE_splineik_execute_tree(
 +        const struct EvaluationContext *eval_ctx, struct Scene *scene,
 +        struct Object *ob, struct bPoseChannel *pchan_root, float ctime);
  
 -void BKE_pose_eval_init(struct EvaluationContext *eval_ctx,
 +void BKE_pose_eval_init(const struct EvaluationContext *eval_ctx,
                          struct Scene *scene,
-                         struct Object *ob,
-                         struct bPose *pose);
+                         struct Object *ob);
  
 -void BKE_pose_eval_init_ik(struct EvaluationContext *eval_ctx,
 +void BKE_pose_eval_init_ik(const struct EvaluationContext *eval_ctx,
                             struct Scene *scene,
-                            struct Object *ob,
-                            struct bPose *pose);
+                            struct Object *ob);
  
 -void BKE_pose_eval_bone(struct EvaluationContext *eval_ctx,
 +void BKE_pose_eval_bone(const struct EvaluationContext *eval_ctx,
                          struct Scene *scene,
                          struct Object *ob,
-                         struct bPoseChannel *pchan);
+                         int pchan_index);
  
 -void BKE_pose_constraints_evaluate(struct EvaluationContext *eval_ctx,
 +void BKE_pose_constraints_evaluate(const struct EvaluationContext *eval_ctx,
                                     struct Scene *scene,
                                     struct Object *ob,
-                                    struct bPoseChannel *pchan);
+                                    int pchan_index);
  
 -void BKE_pose_bone_done(struct EvaluationContext *eval_ctx,
 +void BKE_pose_bone_done(const struct EvaluationContext *eval_ctx,
-                         struct bPoseChannel *pchan);
+                         struct Object *ob,
+                         int pchan_index);
  
 -void BKE_pose_iktree_evaluate(struct EvaluationContext *eval_ctx,
 +void BKE_pose_iktree_evaluate(const struct EvaluationContext *eval_ctx,
                                struct Scene *scene,
                                struct Object *ob,
-                               struct bPoseChannel *rootchan);
+                               int rootchan_index);
  
 -void BKE_pose_splineik_evaluate(struct EvaluationContext *eval_ctx,
 +void BKE_pose_splineik_evaluate(const struct EvaluationContext *eval_ctx,
                                  struct Scene *scene,
                                  struct Object *ob,
-                                 struct bPoseChannel *rootchan);
+                                 int rootchan_index);
  
 -void BKE_pose_eval_flush(struct EvaluationContext *eval_ctx,
 +void BKE_pose_eval_flush(const struct EvaluationContext *eval_ctx,
                           struct Scene *scene,
-                          struct Object *ob,
-                          struct bPose *pose);
+                          struct Object *ob);
  
 -void BKE_pose_eval_proxy_copy(struct EvaluationContext *eval_ctx,
 +void BKE_pose_eval_proxy_copy(const struct EvaluationContext *eval_ctx,
                                struct Object *ob);
  
  #ifdef __cplusplus
diff --cc source/blender/blenkernel/intern/armature_update.c
index 8058dbef577,95a26814e37..54f1a353486
--- a/source/blender/blenkernel/intern/armature_update.c
+++ b/source/blender/blenkernel/intern/armature_update.c
@@@ -558,12 -551,12 +558,12 @@@ void BKE_splineik_execute_tree
  
  /* *************** Depsgraph evaluation callbacks ************ */
  
 -void BKE_pose_eval_init(EvaluationContext *UNUSED(eval_ctx),
 +void BKE_pose_eval_init(const struct EvaluationContext *UNUSED(eval_ctx),
                          Scene *UNUSED(scene),
-                         Object *ob,
-                         bPose *pose)
+                         Object *ob)
  {
- 	bPoseChannel *pchan;
+ 	bPose *pose = ob->pose;
+ 	BLI_assert(pose != NULL);
  
  	DEG_debug_print_eval(__func__, ob->id.name, ob);
  
@@@ -582,10 -581,9 +588,9 @@@
  	}
  }
  
 -void BKE_pose_eval_init_ik(EvaluationContext *UNUSED(eval_ctx),
 +void BKE_pose_eval_init_ik(const struct EvaluationContext *eval_ctx,
                             Scene *scene,
-                            Object *ob,
-                            bPose *UNUSED(pose))
+                            Object *ob)
  {
  	DEG_debug_print_eval(__func__, ob->id.name, ob);
  	BLI_assert(ob->type == OB_ARMATURE);
@@@ -594,20 -592,22 +599,22 @@@
  	if (arm->flag & ARM_RESTPOS) {
  		return;
  	}
- 	/* 2a. construct the IK tree (standard IK) */
+ 	/* construct the IK tree (standard IK) */
 -	BIK_initialize_tree(scene, ob, ctime);
 +	BIK_initialize_tree(eval_ctx, scene, ob, ctime);
- 	/* 2b. construct the Spline IK trees
+ 	/* construct the Spline IK trees
  	 *  - this is not integrated as an IK plugin, since it should be able
- 	 *	  to function in conjunction with standard IK
+ 	 *    to function in conjunction with standard IK
  	 */
  	BKE_pose_splineik_init_tree(scene, ob, ctime);
  }
  
 -void BKE_pose_eval_bone(EvaluationContext *UNUSED(eval_ctx),
 +void BKE_pose_eval_bone(const struct EvaluationContext *eval_ctx,
                          Scene *scene,
                          Object *ob,
-                         bPoseChannel *pchan)
+                         int pchan_index)
  {
+ 	BLI_assert(ob->pose != NULL);
+ 	bPoseChannel *pchan = ob->pose->chan_array[pchan_index];
  	DEG_debug_print_eval_subdata(
  	        __func__, ob->id.name, ob, "pchan", pchan->name, pchan);
  	BLI_assert(ob->type == OB_ARMATURE);
@@@ -639,11 -639,13 +646,13 @@@
  	}
  }
  
 -void BKE_pose_constraints_evaluate(EvaluationContext *UNUSED(eval_ctx),
 +void BKE_pose_constraints_evaluate(const struct EvaluationContext *eval_ctx,
                                     Scene *scene,
                                     Object *ob,
-                                    bPoseChannel *pchan)
+                                    int pchan_index)
  {
+ 	BLI_assert(ob->pose != NULL);
+ 	bPoseChannel *pchan = ob->pose->chan_array[pchan_index];
  	DEG_debug_print_eval_subdata(
  	        __func__, ob->id.name, ob, "pchan", pchan->name, pchan);
  	bArmature *arm = (bArmature *)ob->data;
@@@ -661,9 -663,12 +670,12 @@@
  	}
  }
  
 -void BKE_pose_bone_done(EvaluationContext *UNUSED(eval_ctx),
 +void BKE_pose_bone_done(const struct EvaluationContext *UNUSED(eval_ctx),
-                         bPoseChannel *pchan)
+                         struct Object *ob,
+                         int pchan_index)
  {
+ 	BLI_assert(ob->pose != NULL);
+ 	bPoseChannel *pchan = ob->pose->chan_array[pchan_index];
  	float imat[4][4];
  	DEG_debug_print_eval(__func__, pchan->name, pchan);
  	if (pchan->bone) {
@@@ -672,11 -677,13 +684,13 @@@
  	}
  }
  
 -void BKE_pose_iktree_evaluate(EvaluationContext *UNUSED(eval_ctx),
 +void BKE_pose_iktree_evaluate(const struct EvaluationContext *eval_ctx,
                                Scene *scene,
                                Object *ob,
-                               bPoseChannel *rootchan)
+                               int rootchan_index)
  {
+ 	BLI_assert(ob->pose != NULL);
+ 	bPoseChannel *rootchan = ob->pose->chan_array[rootchan_index];
  	DEG_debug_print_eval_subdata(
  	        __func__, ob->id.name, ob, "rootchan", rootchan->name, rootchan);
  	BLI_assert(ob->type == OB_ARMATURE);
@@@ -685,15 -692,17 +699,17 @@@
  	if (arm->flag & ARM_RESTPOS) {
  		return;
  	}
 -	BIK_execute_tree(scene, ob, rootchan, ctime);
 +	BIK_execute_tree(eval_ctx, scene, ob, rootchan, ctime);
  }
  
 -void BKE_pose_splineik_evaluate(EvaluationContext *UNUSED(eval_ctx),
 +void BKE_pose_splineik_evaluate(const struct EvaluationContext *eval_ctx,
                                  Scene *scene,
                                  Object *ob,
-                                 bPoseChannel *rootchan)
+                                 int rootchan_index)
  
  {
+ 	BLI_assert(ob->pose != NULL);
+ 	bPoseChannel *rootchan = ob->pose->chan_array[rootchan_index];
  	DEG_debug_print_eval_subdata(
  	        __func__, ob->id.name, ob, "rootchan", rootchan->name, rootchan);
  	BLI_assert(ob->type == OB_ARMATURE);
@@@ -702,23 -711,31 +718,29 @@@
  	if (arm->flag & ARM_RESTPOS) {
  		return;
  	}
 -	BKE_splineik_execute_tree(scene, ob, rootchan, ctime);
 +	BKE_splineik_execute_tree(eval_ctx, scene, ob, rootchan, ctime);
  }
  
 -void BKE_pose_eval_flush(EvaluationContext *UNUSED(eval_ctx),
 +void BKE_pose_eval_flush(const struct EvaluationContext *UNUSED(eval_ctx),
                           Scene *scene,
-                          Object *ob,
-                          bPose *UNUSED(pose))
+                          Object *ob)
  {
+ 	bPose *pose = ob->pose;
+ 	BLI_assert(pose != NULL);
+ 
  	float ctime = BKE_scene_frame_get(scene); /* not accurate... */
  	DEG_debug_print_eval(__func__, ob->id.name, ob);
  	BLI_assert(ob->type == OB_ARMATURE);
  
- 	/* 6. release the IK tree */
+ 	/* release the IK tree */
  	BIK_release_tree(scene, ob, ctime);
+ 
 -	ob->recalc &= ~OB_RECALC_ALL;
 -
+ 	BLI_assert(pose->chan_array != NULL);
+ 	MEM_freeN(pose->chan_array);
+ 	pose->chan_array = NULL;
  }
  
 -void BKE_pose_eval_proxy_copy(EvaluationContext *UNUSED(eval_ctx), Object *ob)
 +void BKE_pose_eval_proxy_copy(const struct EvaluationContext *UNUSED(eval_ctx), Object *ob)
  {
  	BLI_assert(ID_IS_LINKED(ob) && ob->proxy_from != NULL);
  	DEG_debug_print_eval(__func__, ob->id.name, ob);
diff --cc source/blender/depsgraph/intern/builder/deg_builder_nodes.h
index 49cccb60843,17d2a4ad558..8dfbc4fa37c
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
@@@ -180,10 -132,9 +180,10 @@@ struct DepsgraphNodeBuilder 
  	void build_object_data(Object 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list