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

Campbell Barton noreply at git.blender.org
Wed May 30 07:35:03 CEST 2018


Commit: 0e0502cbdf9d13a72c96a645c5d886210118ab50
Author: Campbell Barton
Date:   Wed May 30 07:34:22 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB0e0502cbdf9d13a72c96a645c5d886210118ab50

Merge branch 'master' into blender2.8

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



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

diff --cc source/blender/editors/space_outliner/outliner_select.c
index 42fe70be527,9c3b9c7b179..2f88cb4469f
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@@ -846,33 -935,23 +846,33 @@@ static void do_outliner_item_activate_t
  						break;
  					}
  				}
 +				FOREACH_COLLECTION_BASE_RECURSIVE_END
  
 -				for (gob = gr->gobject.first; gob; gob = gob->next) {
 -					ED_base_object_select(BKE_scene_base_find(scene, gob->ob), sel);
 +				FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(gr, object)
 +				{
 +					ED_object_base_select(BKE_view_layer_base_find(view_layer, object), sel);
  				}
 +				FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
  			}
  			else {
 -				BKE_scene_base_deselect_all(scene);
 -
 -				for (gob = gr->gobject.first; gob; gob = gob->next) {
 -					if ((gob->ob->flag & SELECT) == 0)
 -						ED_base_object_select(BKE_scene_base_find(scene, gob->ob), BA_SELECT);
 +				BKE_view_layer_base_deselect_all(view_layer);
 +
 +				FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(gr, object)
 +				{
 +					Base *base = BKE_view_layer_base_find(view_layer, object);
 +					/* Object may not be in this scene */
 +					if (base != NULL) {
 +						if ((base->flag & BASE_SELECTED) == 0) {
 +							ED_object_base_select(base, BA_SELECT);
 +						}
 +					}
  				}
 +				FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
  			}
 -
 +			
  			WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
  		}
- 		else if (ELEM(te->idcode, ID_ME, ID_CU, ID_MB, ID_LT, ID_AR)) {
+ 		else if (OB_DATA_SUPPORT_EDITMODE(te->idcode)) {
  			WM_operator_name_call(C, "OBJECT_OT_editmode_toggle", WM_OP_INVOKE_REGION_WIN, NULL);
  		}
  		else {  // rest of types
diff --cc source/blender/makesdna/DNA_object_types.h
index 64c67f7d325,ae84108864e..289e06b5a63
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@@ -389,12 -378,16 +389,16 @@@ enum 
  #define OB_TYPE_SUPPORT_PARVERT(_type) \
  	(ELEM(_type, OB_MESH, OB_SURF, OB_CURVE, OB_LATTICE))
  
+ /** Matches #OB_TYPE_SUPPORT_EDITMODE. */
+ #define OB_DATA_SUPPORT_EDITMODE(_type) \
+ 	(ELEM(_type, ID_ME, ID_CU, ID_MB, ID_LT, ID_AR))
+ 
  /* is this ID type used as object data */
  #define OB_DATA_SUPPORT_ID(_id_type) \
 -	(ELEM(_id_type, ID_ME, ID_CU, ID_MB, ID_LA, ID_SPK, ID_CA, ID_LT, ID_AR))
 +	(ELEM(_id_type, ID_ME, ID_CU, ID_MB, ID_LA, ID_SPK, ID_LP, ID_CA, ID_LT, ID_AR))
  
  #define OB_DATA_SUPPORT_ID_CASE \
 -	ID_ME: case ID_CU: case ID_MB: case ID_LA: case ID_SPK: case ID_CA: case ID_LT: case ID_AR
 +	ID_ME: case ID_CU: case ID_MB: case ID_LA: case ID_SPK: case ID_LP: case ID_CA: case ID_LT: case ID_AR
  
  /* partype: first 4 bits: type */
  enum {



More information about the Bf-blender-cvs mailing list