Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_select.c
| Context not available. | |||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_tracking_types.h" | #include "DNA_tracking_types.h" | ||||
| #include "DNA_gpencil_types.h" | |||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| Context not available. | |||||
| #include "BKE_editmesh.h" | #include "BKE_editmesh.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "BKE_tracking.h" | #include "BKE_tracking.h" | ||||
| #include "BKE_workspace.h" | |||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| Context not available. | |||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "ED_sculpt.h" | #include "ED_sculpt.h" | ||||
| #include "ED_mball.h" | #include "ED_mball.h" | ||||
| #include "ED_gpencil.h" | |||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| Context not available. | |||||
| if ((oldbasact != basact) && (is_obedit == false)) { | if ((oldbasact != basact) && (is_obedit == false)) { | ||||
| ED_object_base_activate(C, basact); /* adds notifier */ | ED_object_base_activate(C, basact); /* adds notifier */ | ||||
| } | } | ||||
| /* Set special modes for grease pencil | |||||
| The grease pencil modes are not real modes, but a hack to make the interface | |||||
| consistent, so need some tricks to keep UI synchronized */ | |||||
| // XXX: This stuff neeeds reviewing (Aligorith) | |||||
| #if 0 | |||||
| if (((oldbasact) && oldbasact->object->type == OB_GPENCIL) || (basact->object->type == OB_GPENCIL)) { | |||||
| /* set cursor */ | |||||
| if (ELEM(basact->object->mode == OB_MODE_GPENCIL_PAINT, | |||||
| OB_MODE_GPENCIL_SCULPT, | |||||
| OB_MODE_GPENCIL_WEIGHT)) { | |||||
| ED_gpencil_toggle_brush_cursor(C, true, NULL); | |||||
| } | |||||
| else { | |||||
| /* TODO: maybe is better use restore */ | |||||
| ED_gpencil_toggle_brush_cursor(C, false, NULL); | |||||
| } | |||||
| /* set workspace mode */ | |||||
| BKE_workspace_object_mode_set(CTX_wm_workspace(C), scene, basact->object->mode); | |||||
| } | |||||
| #endif | |||||
| } | } | ||||
| WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); | WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); | ||||
| Context not available. | |||||