From 4c3ed98ca27667c3403361199096e31eaa93cce2 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Sun, 25 Nov 2018 09:50:34 -0200 Subject: 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). --- source/blender/editors/object/object_random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/object/object_random.c') diff --git a/source/blender/editors/object/object_random.c b/source/blender/editors/object/object_random.c index 918c1c8d8e7..8291b68f15f 100644 --- a/source/blender/editors/object/object_random.c +++ b/source/blender/editors/object/object_random.c @@ -109,7 +109,7 @@ static int object_rand_verts_exec(bContext *C, wmOperator *op) bool changed_multi = false; uint objects_len = 0; - Object **objects = BKE_view_layer_array_from_objects_in_mode_unique_data(view_layer, &objects_len, ob_mode); + Object **objects = BKE_view_layer_array_from_objects_in_mode_unique_data(view_layer, CTX_wm_view3d(C), &objects_len, ob_mode); for (uint ob_index = 0; ob_index < objects_len; ob_index++) { Object *ob_iter = objects[ob_index]; -- cgit v1.2.3