Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2018-11-25 14:50:34 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-11-25 14:50:34 +0300
commit4c3ed98ca27667c3403361199096e31eaa93cce2 (patch)
tree653c568d9d0547f7ac4beb847a590912d97102c0 /source/blender/blenkernel/intern/layer_utils.c
parente60c49ecf06815039137c98f86a7198d6ee81e14 (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/blenkernel/intern/layer_utils.c')
-rw-r--r--source/blender/blenkernel/intern/layer_utils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/layer_utils.c b/source/blender/blenkernel/intern/layer_utils.c
index 94bac8a33d6..556ccdd3f92 100644
--- a/source/blender/blenkernel/intern/layer_utils.c
+++ b/source/blender/blenkernel/intern/layer_utils.c
@@ -40,11 +40,11 @@
#include "MEM_guardedalloc.h"
Base **BKE_view_layer_array_from_bases_in_mode_params(
- ViewLayer *view_layer, uint *r_len,
+ ViewLayer *view_layer, View3D *v3d, uint *r_len,
const struct ObjectsInModeParams *params)
{
if (params->no_dup_data) {
- FOREACH_BASE_IN_MODE_BEGIN(view_layer, params->object_mode, base_iter) {
+ FOREACH_BASE_IN_MODE_BEGIN(view_layer, v3d, params->object_mode, base_iter) {
ID *id = base_iter->object->data;
if (id) {
id->tag |= LIB_TAG_DOIT;
@@ -55,7 +55,7 @@ Base **BKE_view_layer_array_from_bases_in_mode_params(
Base **base_array = NULL;
BLI_array_declare(base_array);
- FOREACH_BASE_IN_MODE_BEGIN(view_layer, params->object_mode, base_iter) {
+ FOREACH_BASE_IN_MODE_BEGIN(view_layer, v3d, params->object_mode, base_iter) {
if (params->filter_fn) {
if (!params->filter_fn(base_iter->object, params->filter_userdata)) {
continue;
@@ -83,11 +83,11 @@ Base **BKE_view_layer_array_from_bases_in_mode_params(
}
Object **BKE_view_layer_array_from_objects_in_mode_params(
- ViewLayer *view_layer, uint *r_len,
+ ViewLayer *view_layer, View3D *v3d, uint *r_len,
const struct ObjectsInModeParams *params)
{
Base **base_array = BKE_view_layer_array_from_bases_in_mode_params(
- view_layer, r_len, params);
+ view_layer, v3d, r_len, params);
if (base_array != NULL) {
for (uint i = 0; i < *r_len; i++) {
((Object **)base_array)[i] = base_array[i]->object;