Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_utils.cc
| Show All 38 Lines | |||||
| void outliner_viewcontext_init(const bContext *C, TreeViewContext *tvc) | void outliner_viewcontext_init(const bContext *C, TreeViewContext *tvc) | ||||
| { | { | ||||
| memset(tvc, 0, sizeof(*tvc)); | memset(tvc, 0, sizeof(*tvc)); | ||||
| /* Scene level. */ | /* Scene level. */ | ||||
| tvc->scene = CTX_data_scene(C); | tvc->scene = CTX_data_scene(C); | ||||
| tvc->view_layer = CTX_data_view_layer(C); | tvc->view_layer = CTX_data_view_layer(C); | ||||
| /* Video Edit. */ | |||||
| tvc->video_edit = CTX_data_video_edit(C); | |||||
| /* Objects. */ | /* Objects. */ | ||||
| BKE_view_layer_synced_ensure(tvc->scene, tvc->view_layer); | BKE_view_layer_synced_ensure(tvc->scene, tvc->view_layer); | ||||
| tvc->obact = BKE_view_layer_active_object_get(tvc->view_layer); | tvc->obact = BKE_view_layer_active_object_get(tvc->view_layer); | ||||
| if (tvc->obact != nullptr) { | if (tvc->obact != nullptr) { | ||||
| tvc->ob_edit = OBEDIT_FROM_OBACT(tvc->obact); | tvc->ob_edit = OBEDIT_FROM_OBACT(tvc->obact); | ||||
| if ((tvc->obact->type == OB_ARMATURE) || | if ((tvc->obact->type == OB_ARMATURE) || | ||||
| /* This could be made into its own function. */ | /* This could be made into its own function. */ | ||||
| ▲ Show 20 Lines • Show All 422 Lines • Show Last 20 Lines | |||||