Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_select.c
| Show First 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | |||||
| /** | /** | ||||
| * Change active base, it includes the notifier | * Change active base, it includes the notifier | ||||
| */ | */ | ||||
| void ED_object_base_activate(bContext *C, Base *base) | void ED_object_base_activate(bContext *C, Base *base) | ||||
| { | { | ||||
| ViewLayer *view_layer = CTX_data_view_layer(C); | ViewLayer *view_layer = CTX_data_view_layer(C); | ||||
| view_layer->basact = base; | view_layer->basact = base; | ||||
| BKE_workspace_active_base_changed(CTX_wm_workspace(C), view_layer); | |||||
| if (base) { | if (base) { | ||||
| #ifdef USE_WORKSPACE_MODE | |||||
| BKE_workspace_object_mode_set(CTX_wm_workspace(C), CTX_data_scene(C), base->object->mode); | |||||
| #endif | |||||
| WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, view_layer); | WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, view_layer); | ||||
| } | } | ||||
| else { | else { | ||||
| WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, NULL); | WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, NULL); | ||||
| } | } | ||||
| } | } | ||||
| /********************** Selection Operators **********************/ | /********************** Selection Operators **********************/ | ||||
| ▲ Show 20 Lines • Show All 1,092 Lines • Show Last 20 Lines | |||||