[Bf-blender-cvs] [ba064952cb2] greasepencil-object: Merge branch 'blender2.8' into greasepencil-object
Antonio Vazquez
noreply at git.blender.org
Wed May 30 08:52:53 CEST 2018
Commit: ba064952cb2062c249ce8b3a08ffafb7338d7415
Author: Antonio Vazquez
Date: Wed May 30 08:47:44 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBba064952cb2062c249ce8b3a08ffafb7338d7415
Merge branch 'blender2.8' into greasepencil-object
Conflicts:
release/scripts/addons
release/scripts/addons_contrib
source/blender/editors/object/object_edit.c
===================================================================
===================================================================
diff --cc source/blender/editors/object/object_edit.c
index a4d8c298ba5,57d929ceccb..f28946a61b0
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@@ -1355,7 -1361,9 +1355,8 @@@ static int object_mode_set_poll(bContex
static int object_mode_set_exec(bContext *C, wmOperator *op)
{
+ bool use_submode = STREQ(op->idname, "OBJECT_OT_mode_set_or_submode");
Object *ob = CTX_data_active_object(C);
- bGPdata *gpd = CTX_data_gpencil_data(C);
eObjectMode mode = RNA_enum_get(op->ptr, "mode");
eObjectMode restore_mode = (ob) ? ob->mode : OB_MODE_OBJECT;
const bool toggle = RNA_boolean_get(op->ptr, "toggle");
diff --cc source/blender/editors/space_outliner/outliner_select.c
index 727667ad614,2f88cb4469f..7db1cfea90d
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@@ -898,13 -872,9 +898,13 @@@ static void do_outliner_item_activate_t
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 if (ELEM(te->idcode, ID_GD)) {
+ /* set grease pencil to object mode */
+ WM_operator_name_call(C, "GPENCIL_OT_editmode_toggle", WM_OP_INVOKE_REGION_WIN, NULL);
+ }
else { // rest of types
tree_element_active(C, scene, view_layer, soops, te, OL_SETSEL_NORMAL, false);
}
diff --cc source/blender/makesdna/DNA_object_types.h
index b3c8e6844e3,289e06b5a63..21dc4fad0cd
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@@ -391,12 -389,16 +391,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_LP, 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_GD, ID_AR))
#define OB_DATA_SUPPORT_ID_CASE \
- 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
+ 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_GD: case ID_AR
/* partype: first 4 bits: type */
enum {
More information about the Bf-blender-cvs
mailing list