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

Bastien Montagne noreply at git.blender.org
Sat Nov 19 16:29:03 CET 2016


Commit: 559bd7576602e04b1895481561b054e67982351c
Author: Bastien Montagne
Date:   Sat Nov 19 16:28:39 2016 +0100
Branches: blender2.8
https://developer.blender.org/rB559bd7576602e04b1895481561b054e67982351c

Merge branch 'master' into blender2.8

Conflicts:
	source/blender/blenloader/intern/versioning_270.c
	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
	source/blender/editors/space_view3d/drawobject.c

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



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

diff --cc source/blender/blenloader/intern/versioning_270.c
index 577c278,25d78b7..3fa3f03
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@@ -1367,26 -1467,10 +1367,33 @@@ void blo_do_versions_270(FileData *fd, 
  		}
  	}
  
+ 	if (!MAIN_VERSION_ATLEAST(main, 278, 4)) {
+ 		const float sqrt_3 = (float)M_SQRT3;
+ 		for (Brush *br = main->brush.first; br; br = br->id.next) {
+ 			br->fill_threshold /= sqrt_3;
+ 		}
+ 	}
++
 +	{
 +		if (!DNA_struct_elem_find(fd->filesdna, "View3DDebug", "char", "background")) {
 +			bScreen *screen;
 +
 +			for (screen = main->screen.first; screen; screen = screen->id.next) {
 +				ScrArea *sa;
 +				for (sa = screen->areabase.first; sa; sa = sa->next) {
 +					SpaceLink *sl;
 +
 +					for (sl = sa->spacedata.first; sl; sl = sl->next) {
 +						switch (sl->spacetype) {
 +							case SPACE_VIEW3D:
 +							{
 +								View3D *v3d = (View3D *)sl;
 +								v3d->debug.background = V3D_DEBUG_BACKGROUND_NONE;
 +							}
 +						}
 +					}
 +				}
 +			}
 +		}
 +	}
  }
diff --cc source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 1abce2e,4de82dd..3cf510e
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@@ -55,9 -55,12 +55,11 @@@ extern "C" 
  #include "DNA_key_types.h"
  #include "DNA_lamp_types.h"
  #include "DNA_material_types.h"
+ #include "DNA_mask_types.h"
  #include "DNA_mesh_types.h"
  #include "DNA_meta_types.h"
+ #include "DNA_movieclip_types.h"
  #include "DNA_node_types.h"
 -#include "DNA_particle_types.h"
  #include "DNA_object_types.h"
  #include "DNA_rigidbody_types.h"
  #include "DNA_scene_types.h"
@@@ -782,207 -692,50 +685,6 @@@ void DepsgraphNodeBuilder::build_rigidb
  	}
  }
  
- /* IK Solver Eval Steps */
- void DepsgraphNodeBuilder::build_ik_pose(Scene *scene, Object *ob, bPoseChannel *pchan, bConstraint *con)
- {
- 	bKinematicConstraint *data = (bKinematicConstraint *)con->data;
- 
- 	/* Find the chain's root. */
- 	bPoseChannel *rootchan = BKE_armature_ik_solver_find_root(pchan, data);
- 
- 	if (has_operation_node(&ob->id, DEPSNODE_TYPE_EVAL_POSE, rootchan->name,
- 	                       DEG_OPCODE_POSE_IK_SOLVER))
- 	{
- 		return;
- 	}
- 
- 	/* Operation node for evaluating/running IK Solver. */
- 	add_operation_node(&ob->id, DEPSNODE_TYPE_EVAL_POSE, rootchan->name,
- 	                   DEPSOP_TYPE_SIM, function_bind(BKE_pose_iktree_evaluate, _1, scene, ob, rootchan),
- 	                   DEG_OPCODE_POSE_IK_SOLVER);
- }
- 
- /* Spline IK Eval Steps */
- void DepsgraphNodeBuilder::build_splineik_pose(Scene *scene, Object *ob, bPoseChannel *pchan, bConstraint *con)
- {
- 	bSplineIKConstraint *data = (bSplineIKConstraint *)con->data;
- 
- 	/* Find the chain's root. */
- 	bPoseChannel *rootchan = BKE_armature_splineik_solver_find_root(pchan, data);
- 
- 	/* Operation node for evaluating/running Spline IK Solver.
- 	 * Store the "root bone" of this chain in the solver, so it knows where to start.
- 	 */
- 	add_operation_node(&ob->id, DEPSNODE_TYPE_EVAL_POSE, rootchan->name,
- 	                   DEPSOP_TYPE_SIM, function_bind(BKE_pose_splineik_evaluate, _1, scene, ob, rootchan),
- 	                   DEG_OPCODE_POSE_SPLINE_IK_SOLVER);
- }
- 
- /* Pose/Armature Bones Graph */
- void DepsgraphNodeBuilder::build_rig(Scene *scene, Object *ob)
 -void DepsgraphNodeBuilder::build_particles(Scene *scene, Object *ob)
--{
- 	bArmature *arm = (bArmature *)ob->data;
- 
- 	/* animation and/or drivers linking posebones to base-armature used to define them
- 	 * NOTE: AnimData here is really used to control animated deform properties,
- 	 *       which ideally should be able to be unique across different instances.
- 	 *       Eventually, we need some type of proxy/isolation mechanism in-between here
- 	 *       to ensure that we can use same rig multiple times in same scene...
- 	 */
- 	build_animdata(&arm->id);
- 
- 	/* Rebuild pose if not up to date. */
- 	if (ob->pose == NULL || (ob->pose->flag & POSE_RECALC)) {
- 		BKE_pose_rebuild_ex(ob, arm, false);
- 		/* XXX: Without this animation gets lost in certain circumstances
- 		 * after loading file. Need to investigate further since it does
- 		 * not happen with simple scenes..
- 		 */
- 		if (ob->adt) {
- 			ob->adt->recalc |= ADT_RECALC_ANIM;
- 		}
- 	}
- 
- 	/* speed optimization for animation lookups */
- 	if (ob->pose) {
- 		BKE_pose_channels_hash_make(ob->pose);
- 		if (ob->pose->flag & POSE_CONSTRAINTS_NEED_UPDATE_FLAGS) {
- 			BKE_pose_update_constraint_flags(ob->pose);
- 		}
- 	}
- 
- 	/* Make sure pose is up-to-date with armature updates. */
- 	add_operation_node(&arm->id,
- 	                   DEPSNODE_TYPE_PARAMETERS,
- 	                   DEPSOP_TYPE_EXEC,
- 	                   NULL,
- 	                   DEG_OPCODE_PLACEHOLDER,
- 	                   "Armature Eval");
- 
--	/**
- 	 * Pose Rig Graph
- 	 * ==============
- 	 *
- 	 * Pose Component:
- 	 * - Mainly used for referencing Bone components.
- 	 * - This is where the evaluation operations for init/exec/cleanup
- 	 *   (ik) solvers live, and are later hooked up (so that they can be
- 	 *   interleaved during runtime) with bone-operations they depend on/affect.
- 	 * - init_pose_eval() and cleanup_pose_eval() are absolute first and last
- 	 *   steps of pose eval process. ALL bone operations must be performed
- 	 *   between these two...
 -	 * Particle Systems Nodes
 -	 * ======================
--	 *
- 	 * Bone Component:
- 	 * - Used for representing each bone within the rig
- 	 * - Acts to encapsulate the evaluation operations (base matrix + parenting,
- 	 *   and constraint stack) so that they can be easily found.
- 	 * - Everything else which depends on bone-results hook up to the component only
- 	 *   so that we can redirect those to point at either the the post-IK/
- 	 *   post-constraint/post-matrix steps, as needed.
 -	 * There are two types of nodes associated with representing
 -	 * particle systems:
 -	 *  1) Component (EVAL_PARTICLES) - This is the particle-system
 -	 *     evaluation context for an object. It acts as the container
 -	 *     for all the nodes associated with a particular set of particle
 -	 *     systems.
 -	 *  2) Particle System Eval Operation - This operation node acts as a
 -	 *     blackbox evaluation step for one particle system referenced by
 -	 *     the particle systems stack. All dependencies link to this operation.
--	 */
- 
- 	/* pose eval context */
- 	add_operation_node(&ob->id, DEPSNODE_TYPE_EVAL_POSE,
- 	                   DEPSOP_TYPE_INIT, function_bind(BKE_pose_eval_init, _1, scene, ob, ob->pose), DEG_OPCODE_POSE_INIT);
- 
- 	add_operation_node(&ob->id, DEPSNODE_TYPE_EVAL_POSE,
- 	                   DEPSOP_TYPE_POST, function_bind(BKE_pose_eval_flush, _1, scene, ob, ob->pose), DEG_OPCODE_POSE_DONE);
- 
- 	/* bones */
- 	for (bPoseChannel *pchan = (bPoseChannel *)ob->pose->chanbase.first; pchan; pchan = pchan->next) {
- 		/* node for bone eval */
- 		add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
- 		                   DEPSOP_TYPE_INIT, NULL, // XXX: BKE_pose_eval_bone_local
- 		                   DEG_OPCODE_BONE_LOCAL);
- 
- 		add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
- 		                   DEPSOP_TYPE_EXEC, function_bind(BKE_pose_eval_bone, _1, scene, ob, pchan), // XXX: BKE_pose_eval_bone_pose
- 		                   DEG_OPCODE_BONE_POSE_PARENT);
- 
- 		add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
- 		                   DEPSOP_TYPE_OUT, NULL, /* NOTE: dedicated noop for easier relationship construction */
- 		                   DEG_OPCODE_BONE_READY);
- 
- 		add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
- 		                   DEPSOP_TYPE_POST, function_bind(BKE_pose_bone_done, _1, pchan),
- 		                   DEG_OPCODE_BONE_DONE);
- 
- 		/* constraints */
- 		if (pchan->constraints.first != NULL) {
- 			build_pose_constraints(ob, pchan);
- 		}
- 
- 		/**
- 		 * IK Solvers...
- 		 *
- 		 * - These require separate processing steps are pose-level
- 		 *   to be executed between chains of bones (i.e. once the
- 		 *   base transforms of a bunch of bones is done)
- 		 *
- 		 * Unsolved Issues:
- 		 * - Care is needed to ensure that multi-headed trees work out the same as in ik-tree building
- 		 * - Animated chain-lengths are a problem...
- 		 */
- 		for (bConstraint *con = (bConstraint *)pchan->constraints.first; con; con = con->next) {
- 			switch (con->type) {
- 				case CONSTRAINT_TYPE_KINEMATIC:
- 					build_ik_pose(scene, ob, pchan, con);
- 					break;
- 
- 				case CONSTRAINT_TYPE_SPLINEIK:
- 					build_splineik_pose(scene, ob, pchan, con);
- 					break;
- 
- 				default:
- 					break;
- 			}
- 		}
- 	}
- }
- 
- void DepsgraphNodeBuilder::build_proxy_rig(Object *ob)
- {
- 	ID *obdata = (ID *)ob->data;
- 	build_animdata(obdata);
- 
- 	BLI_assert(ob->pose != NULL);
- 
- 	/* speed optimization for animation lookups */
- 	BKE_pose_channels_hash_make(ob->pose);
- 	if (ob->pose->flag & POSE_CONSTRAINTS_NEED_UPDATE_FLAGS) {
- 		BKE_pose_update_constraint_flags(ob->pose);
- 	}
--
- 	add_operation_node(&ob->id,
- 	                   DEPSNODE_TYPE_EVAL_POSE,
- 	                   DEPSOP_TYPE_INIT,
- 	                   function_bind(BKE_pose_eval_proxy_copy, _1, ob),
- 	                   DEG_OPCODE_POSE_INIT);
 -	/* component for all particle systems */
 -	ComponentDepsNode *psys_comp = add_component_node(&ob->id, DEPSNODE_TYPE_EVAL_PARTICLES);
--
- 	for (bPoseChannel *pchan = (bPoseChannel *)ob->pose->chanbase.first;
- 	     pchan != NULL;
- 	     pchan = pchan->next)
- 	{
- 		add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
- 		                   DEPSOP_TYPE_INIT, NULL,
- 		                   DEG_OPCODE_BONE_LOCAL);
 -	/* particle systems */
 -	LINKLIST_FOREACH (ParticleSystem *, psys, &ob->particlesystem) {
 -		ParticleSettings *part = psys->part;
--
- 		add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
- 		                   DEPSOP_TYPE_EXEC, NULL,
- 		                   DEG_OPCODE_BONE_READY);
 -		/* particle settings */
 -		// XXX: what if this is used more than once!
 -		build_animdata(&part

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list