[Bf-blender-cvs] [618f5a6ff2c] hair_object: Merge branch 'blender2.8' into hair_object

Lukas Toenne noreply at git.blender.org
Sat Oct 27 09:01:21 CEST 2018


Commit: 618f5a6ff2cf078f872047b998935ff1242c8f53
Author: Lukas Toenne
Date:   Sat Oct 27 08:01:14 2018 +0100
Branches: hair_object
https://developer.blender.org/rB618f5a6ff2cf078f872047b998935ff1242c8f53

Merge branch 'blender2.8' into hair_object

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



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

diff --cc source/blender/blenkernel/intern/object.c
index 077b5b1bc8b,745c907a9af..1f1a57d82c0
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@@ -617,50 -608,27 +617,29 @@@ void BKE_object_free(Object *ob
  /* actual check for internal data, not context or flags */
  bool BKE_object_is_in_editmode(const Object *ob)
  {
- 	if (ob->data == NULL)
+ 	if (ob->data == NULL) {
  		return false;
- 
- 	if (ob->type == OB_MESH) {
- 		Mesh *me = ob->data;
- 		if (me->edit_btmesh)
- 			return true;
- 	}
- 	else if (ob->type == OB_ARMATURE) {
- 		bArmature *arm = ob->data;
- 
- 		if (arm->edbo)
- 			return true;
- 	}
- 	else if (ob->type == OB_FONT) {
- 		Curve *cu = ob->data;
- 
- 		if (cu->editfont)
- 			return true;
  	}
- 	else if (ob->type == OB_MBALL) {
- 		MetaBall *mb = ob->data;
  
- 		if (mb->editelems)
- 			return true;
- 	}
- 	else if (ob->type == OB_LATTICE) {
- 		Lattice *lt = ob->data;
- 
- 		if (lt->editlatt)
- 			return true;
- 	}
- 	else if (ob->type == OB_SURF || ob->type == OB_CURVE) {
- 		Curve *cu = ob->data;
- 
- 		if (cu->editnurb)
- 			return true;
- 	}
- 	else if (ob->type == OB_HAIR) {
- 		HairSystem *hsys = ob->data;
- 		if (hsys->edithair)
- 			return true;
+ 	switch (ob->type) {
+ 		case OB_MESH:
+ 			return ((Mesh *)ob->data)->edit_btmesh != NULL;
+ 		case OB_ARMATURE:
+ 			return ((bArmature *)ob->data)->edbo != NULL;
+ 		case OB_FONT:
+ 			return ((Curve *)ob->data)->editfont != NULL;
+ 		case OB_MBALL:
+ 			return ((MetaBall *)ob->data)->editelems != NULL;
+ 		case OB_LATTICE:
+ 			return ((Lattice *)ob->data)->editlatt != NULL;
+ 		case OB_SURF:
+ 		case OB_CURVE:
+ 			return ((Curve *)ob->data)->editnurb != NULL;
++		case OB_HAIR:
++			return ((HairSystem *)ob->data)->edithair != NULL;
+ 		default:
+ 			return false;
  	}
- 	return false;
  }
  
  bool BKE_object_is_in_editmode_vgroup(const Object *ob)
diff --cc source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 8a545977d85,1aabb926d29..424c41a72ef
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@@ -679,17 -681,7 +683,8 @@@ void DepsgraphNodeBuilder::build_object
  		case OB_MBALL:
  		case OB_LATTICE:
  		case OB_GPENCIL:
 +		case OB_HAIR:
  			build_object_data_geometry(object, is_object_visible);
- 			/* 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) {
diff --cc source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index f5b407a53a2,c025bcd41d8..6c656b9aff4
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@@ -670,9 -679,17 +681,18 @@@ void DepsgraphRelationBuilder::build_ob
  		case OB_MBALL:
  		case OB_LATTICE:
  		case OB_GPENCIL:
 +		case OB_HAIR:
  		{
  			build_object_data_geometry(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) {
+ 					add_special_eval_flag(&curve->textoncurve->id, DAG_EVAL_NEED_CURVE_PATH);
+ 				}
+ 			}
  			break;
  		}
  		case OB_ARMATURE:



More information about the Bf-blender-cvs mailing list