diff options
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index a837b32b0bb..c8ad2b954a5 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -47,6 +47,7 @@ #include "DNA_gpencil_types.h" #include "DNA_scene_types.h" #include "DNA_meta_types.h" +#include "DNA_mesh_types.h" #include "DNA_mask_types.h" #include "DNA_node_types.h" #include "DNA_workspace_types.h" @@ -359,6 +360,15 @@ bool ED_operator_editmesh_region_view3d(bContext *C) return 0; } +bool ED_operator_editmesh_auto_smooth(bContext *C) +{ + Object *obedit = CTX_data_edit_object(C); + if (obedit && obedit->type == OB_MESH && (((Mesh *)(obedit->data))->flag & ME_AUTOSMOOTH)) { + return NULL != BKE_editmesh_from_object(obedit); + } + return 0; +} + bool ED_operator_editarmature(bContext *C) { Object *obedit = CTX_data_edit_object(C); @@ -2608,11 +2618,14 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op) /* populate tree with keyframe nodes */ scene_to_keylist(&ads, scene, &keys, NULL); - gpencil_to_keylist(&ads, scene->gpd, &keys); if (ob) { ob_to_keylist(&ads, ob, &keys, NULL); - gpencil_to_keylist(&ads, ob->gpd, &keys); + + if (ob->type == OB_GPENCIL) { + const bool active = !(scene->flag & SCE_KEYS_NO_SELONLY); + gpencil_to_keylist(&ads, ob->data, &keys, active); + } } { @@ -4813,7 +4826,7 @@ static void keymap_modal_set(wmKeyConfig *keyconf) } -static bool open_file_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event)) +static bool open_file_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event), const char **UNUSED(tooltip)) { if (drag->type == WM_DRAG_PATH) { if (drag->icon == ICON_FILE_BLEND) |