[Bf-blender-cvs] [9f47ddeb8ad] greasepencil-object: Merge remote-tracking branch 'origin/blender2.8' into greasepencil-object

Dalai Felinto noreply at git.blender.org
Thu Nov 23 14:05:29 CET 2017


Commit: 9f47ddeb8ad6f4db54588db833c7e2d5129e0b2c
Author: Dalai Felinto
Date:   Thu Nov 23 10:49:58 2017 -0200
Branches: greasepencil-object
https://developer.blender.org/rB9f47ddeb8ad6f4db54588db833c7e2d5129e0b2c

Merge remote-tracking branch 'origin/blender2.8' into greasepencil-object

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



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

diff --cc source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 1f2151769aa,948e1410df5..4b376c7c1fb
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@@ -492,22 -438,76 +439,74 @@@ void DepsgraphNodeBuilder::build_object
  	 * on object's level animation, for example in case of rebuilding
  	 * pose for proxy.
  	 */
- 	build_animdata(&ob->id);
- 
- 	/* particle systems */
- 	if (ob->particlesystem.first != NULL) {
- 		build_particles(ob);
+ 	build_animdata(&object->id);
+ 	/* Particle systems. */
+ 	if (object->particlesystem.first != NULL) {
+ 		build_particles(object);
  	}
 -	/* Grease pencil. */
 -	if (object->gpd != NULL) {
 -		build_gpencil(object->gpd);
 -	}
 +
  	/* Object that this is a proxy for. */
- 	if (ob->proxy) {
- 		ob->proxy->proxy_from = ob;
- 		build_object(ob->proxy, DEG_ID_LINKED_INDIRECTLY);
+ 	if (object->proxy) {
+ 		object->proxy->proxy_from = object;
+ 		build_object(object->proxy, DEG_ID_LINKED_INDIRECTLY);
  	}
- 
  	/* Object dupligroup. */
- 	if (ob->dup_group != NULL) {
- 		build_group(ob->dup_group);
+ 	if (object->dup_group != NULL) {
+ 		build_group(object->dup_group);
+ 	}
+ }
+ 
+ void DepsgraphNodeBuilder::build_object_data(Object *object)
+ {
+ 	if (object->data == NULL) {
+ 		return;
+ 	}
+ 	IDDepsNode *id_node = graph_->find_id_node(&object->id);
+ 	/* type-specific data. */
+ 	switch (object->type) {
+ 		case OB_MESH:
+ 		case OB_CURVE:
+ 		case OB_FONT:
+ 		case OB_SURF:
+ 		case OB_MBALL:
+ 		case OB_LATTICE:
++		case OB_GPENCIL:
+ 			build_obdata_geom(object);
+ 			/* TODO(sergey): Only for until we support granular
+ 			 * update of curves.
+ 			 */
+ 			if (object->type == OB_FONT) {
+ 				Curve *curve = (Curve *)object->data;
+ 				if (curve->textoncurve) {
+ 					id_node->eval_flags |= DAG_EVAL_NEED_CURVE_PATH;
+ 				}
+ 			}
+ 			break;
+ 		case OB_ARMATURE:
+ 			if (ID_IS_LINKED(object) && object->proxy_from != NULL) {
+ 				build_proxy_rig(object);
+ 			}
+ 			else {
+ 				build_rig(object);
+ 			}
+ 			break;
+ 		case OB_LAMP:
+ 			build_lamp(object);
+ 			break;
+ 		case OB_CAMERA:
+ 			build_camera(object);
+ 			break;
+ 		case OB_LIGHTPROBE:
+ 			build_lightprobe(object);
+ 			break;
+ 		default:
+ 		{
+ 			ID *obdata = (ID *)object->data;
+ 			if ((obdata->tag & LIB_TAG_DOIT) == 0) {
+ 				build_animdata(obdata);
+ 			}
+ 			break;
+ 		}
  	}
  }
  
diff --cc source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 7e9bdb7678e,26eaea9a18c..c4f502e9f39
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@@ -504,76 -507,27 +507,24 @@@ void DepsgraphRelationBuilder::build_ob
  		}
  		add_relation(ob_ubereval_key, final_transform_key, "Temp Ubereval");
  	}
- 
- 	/* AnimData */
- 	build_animdata(&ob->id);
- 
+ 	/* Animation data */
+ 	build_animdata(&object->id);
  	// XXX: This should be hooked up by the build_animdata code
- 	if (needs_animdata_node(&ob->id)) {
- 		ComponentKey adt_key(&ob->id, DEG_NODE_TYPE_ANIMATION);
+ 	if (needs_animdata_node(&object->id)) {
+ 		ComponentKey adt_key(&object->id, DEG_NODE_TYPE_ANIMATION);
  		add_relation(adt_key, local_transform_key, "Object Animation");
  	}
- 
- 	/* object data */
- 	if (ob->data) {
- 		ID *obdata_id = (ID *)ob->data;
- 
- 		/* ob data animation */
- 		build_animdata(obdata_id);
- 
- 		/* type-specific data... */
- 		switch (ob->type) {
- 			case OB_MESH:     /* Geometry */
- 			case OB_CURVE:
- 			case OB_FONT:
- 			case OB_SURF:
- 			case OB_MBALL:
- 			case OB_LATTICE:
- 			case OB_GPENCIL:
- 			{
- 				build_obdata_geom(ob);
- 				break;
- 			}
- 
- 			case OB_ARMATURE: /* Pose */
- 				if (ID_IS_LINKED(ob) && ob->proxy_from != NULL) {
- 					build_proxy_rig(ob);
- 				}
- 				else {
- 					build_rig(ob);
- 				}
- 				break;
- 
- 			case OB_LAMP:   /* Lamp */
- 				build_lamp(ob);
- 				break;
- 
- 			case OB_CAMERA: /* Camera */
- 				build_camera(ob);
- 				break;
- 
- 			case OB_LIGHTPROBE:
- 				build_lightprobe(ob);
- 				break;
- 		}
- 
- 		Key *key = BKE_key_from_object(ob);
- 		if (key != NULL) {
- 			ComponentKey geometry_key((ID *)ob->data, DEG_NODE_TYPE_GEOMETRY);
- 			ComponentKey key_key(&key->id, DEG_NODE_TYPE_GEOMETRY);
- 			add_relation(key_key, geometry_key, "Shapekeys");
- 		}
- 	}
- 
+ 	/* Object data. */
+ 	build_object_data(object);
  	/* Particle systems. */
- 	if (ob->particlesystem.first != NULL) {
- 		build_particles(ob);
+ 	if (object->particlesystem.first != NULL) {
+ 		build_particles(object);
  	}
 -	/* Grease pencil. */
 -	if (object->gpd != NULL) {
 -		build_gpencil(object->gpd);
 -	}
 +
  	/* Object that this is a proxy for. */
- 	if (ob->proxy != NULL) {
- 		ob->proxy->proxy_from = ob;
- 		build_object(ob->proxy);
+ 	if (object->proxy != NULL) {
+ 		object->proxy->proxy_from = object;
+ 		build_object(object->proxy);
  		/* TODO(sergey): This is an inverted relation, matches old depsgraph
  		 * behavior and need to be investigated if it still need to be inverted.
  		 */
@@@ -588,7 -541,53 +538,54 @@@
  	}
  }
  
- void DepsgraphRelationBuilder::build_object_parent(Object *ob)
+ void DepsgraphRelationBuilder::build_object_data(Object *object)
+ {
+ 	if (object->data == NULL) {
+ 		return;
+ 	}
+ 	ID *obdata_id = (ID *)object->data;
+ 	/* Object data animation. */
+ 	build_animdata(obdata_id);
+ 	/* type-specific data. */
+ 	switch (object->type) {
+ 		case OB_MESH:
+ 		case OB_CURVE:
+ 		case OB_FONT:
+ 		case OB_SURF:
+ 		case OB_MBALL:
+ 		case OB_LATTICE:
++		case OB_GPENCIL:
+ 		{
+ 			build_obdata_geom(object);
+ 			break;
+ 		}
+ 		case OB_ARMATURE:
+ 			if (ID_IS_LINKED(object) && object->proxy_from != NULL) {
+ 				build_proxy_rig(object);
+ 			}
+ 			else {
+ 				build_rig(object);
+ 			}
+ 			break;
+ 		case OB_LAMP:
+ 			build_lamp(object);
+ 			break;
+ 		case OB_CAMERA:
+ 			build_camera(object);
+ 			break;
+ 		case OB_LIGHTPROBE:
+ 			build_lightprobe(object);
+ 			break;
+ 	}
+ 	Key *key = BKE_key_from_object(object);
+ 	if (key != NULL) {
+ 		ComponentKey geometry_key((ID *)object->data, DEG_NODE_TYPE_GEOMETRY);
+ 		ComponentKey key_key(&key->id, DEG_NODE_TYPE_GEOMETRY);
+ 		add_relation(key_key, geometry_key, "Shapekeys");
+ 	}
+ }
+ 
+ void DepsgraphRelationBuilder::build_object_parent(Object *object)
  {
  	/* XXX: for now, need to use the component key (not just direct to the parent op),
  	 * or else the matrix doesn't get reset/



More information about the Bf-blender-cvs mailing list