Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_select.c
| Context not available. | |||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_sequence_types.h" | #include "DNA_sequence_types.h" | ||||
| #include "DNA_world_types.h" | #include "DNA_world_types.h" | ||||
| #include "DNA_gpencil_types.h" | |||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLI_listbase.h" | #include "BLI_listbase.h" | ||||
| Context not available. | |||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "BKE_sequencer.h" | #include "BKE_sequencer.h" | ||||
| #include "BKE_armature.h" | #include "BKE_armature.h" | ||||
| #include "BKE_workspace.h" | |||||
| #include "BKE_paint.h" | |||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| Context not available. | |||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "ED_sequencer.h" | #include "ED_sequencer.h" | ||||
| #include "ED_util.h" | #include "ED_util.h" | ||||
| #include "ED_gpencil.h" | |||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| /* set special grease pencil modes */ | |||||
| if (ob->type == OB_GPENCIL) { | |||||
| /* set cursor */ | |||||
| if (ob->mode == OB_MODE_GPENCIL_PAINT) { | |||||
| WM_cursor_modal_set(CTX_wm_window(C), BC_PAINTBRUSHCURSOR); | |||||
| ED_gpencil_toggle_brush_cursor(C, false, NULL); | |||||
| } | |||||
| else if (ob->mode == OB_MODE_GPENCIL_SCULPT) { | |||||
| WM_cursor_modal_set(CTX_wm_window(C), BC_CROSSCURSOR); | |||||
| ED_gpencil_toggle_brush_cursor(C, true, NULL); | |||||
| } | |||||
| else if (ob->mode == OB_MODE_GPENCIL_WEIGHT) { | |||||
| WM_cursor_modal_set(CTX_wm_window(C), BC_CROSSCURSOR); | |||||
| ED_gpencil_toggle_brush_cursor(C, true, NULL); | |||||
| } | |||||
| else { | |||||
| WM_cursor_modal_set(CTX_wm_window(C), CURSOR_STD); | |||||
| ED_gpencil_toggle_brush_cursor(C, false, NULL); | |||||
| } | |||||
| /* set workspace mode */ | |||||
| BKE_workspace_object_mode_set(CTX_wm_workspace(C), scene, ob->mode); | |||||
| } | |||||
| if (ob != scene->obedit) | if (ob != scene->obedit) | ||||
| ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); | ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); | ||||
| Context not available. | |||||
| else if (ELEM(te->idcode, ID_ME, ID_CU, ID_MB, ID_LT, ID_AR)) { | else if (ELEM(te->idcode, ID_ME, ID_CU, ID_MB, ID_LT, ID_AR)) { | ||||
| WM_operator_name_call(C, "OBJECT_OT_editmode_toggle", WM_OP_INVOKE_REGION_WIN, NULL); | 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 | else { // rest of types | ||||
| tree_element_active(C, scene, view_layer, soops, te, OL_SETSEL_NORMAL, false); | tree_element_active(C, scene, view_layer, soops, te, OL_SETSEL_NORMAL, false); | ||||
| } | } | ||||
| Context not available. | |||||