diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-11-25 14:50:34 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-11-25 14:50:34 +0300 |
commit | 4c3ed98ca27667c3403361199096e31eaa93cce2 (patch) | |
tree | 653c568d9d0547f7ac4beb847a590912d97102c0 /source/blender/editors/object/object_edit.c | |
parent | e60c49ecf06815039137c98f86a7198d6ee81e14 (diff) |
Local View
Bring back per-viewport localview. This is based on Blender 2.79.
We have a limit of 16 different local view viewports.
We are using both the numpad /, as well as the regular /.
Missing features:
* Hack to make sure lights are always visible.
* Make rendered mode with external engines to support this as well
(probably just need to support this in the RNA iterators).
* Support over 16 viewports by taking existing viewports out of local view.
The code can use a cleanup pass in the future to unify the test to see
if an object is visible (or we can use TESTBASE in more places).
Diffstat (limited to 'source/blender/editors/object/object_edit.c')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index c376b0cf78f..5852fcff7e9 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -682,6 +682,7 @@ static int editmode_toggle_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); + View3D *v3d = CTX_wm_view3d(C); Object *obact = OBACT(view_layer); if (!is_mode_set) { @@ -693,7 +694,7 @@ static int editmode_toggle_exec(bContext *C, wmOperator *op) if (!is_mode_set) { ED_object_editmode_enter(C, EM_WAITCURSOR); if (obact->mode & mode_flag) { - FOREACH_SELECTED_OBJECT_BEGIN(view_layer, ob) + FOREACH_SELECTED_OBJECT_BEGIN(view_layer, v3d, ob) { if ((ob != obact) && (ob->type == obact->type)) { ED_object_editmode_enter_ex(bmain, scene, ob, EM_WAITCURSOR | EM_NO_CONTEXT); @@ -805,7 +806,8 @@ static int posemode_exec(bContext *C, wmOperator *op) if (ok) { struct Main *bmain = CTX_data_main(C); ViewLayer *view_layer = CTX_data_view_layer(C); - FOREACH_SELECTED_OBJECT_BEGIN(view_layer, ob) + View3D *v3d = CTX_wm_view3d(C); + FOREACH_SELECTED_OBJECT_BEGIN(view_layer, v3d, ob) { if ((ob != obact) && (ob->type == OB_ARMATURE) && |