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>2017-11-22 15:52:39 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-11-23 12:48:23 +0300
commit3abe8b3292cf7a50a9200b95401993384df24d9a (patch)
tree6c7a853710f1a4264dd1bb4d7b9bf14f44b75f33 /source/blender/editors/space_outliner/outliner_tools.c
parentfb7d23bdb2a5c0ed00067045e4acdf6593258b52 (diff)
Rename any instance of scene layer or render layer in code with view layer
The RenderResult struct still has a listbase of RenderLayer, but that's ok since this is strictly for rendering. * Subversion bump (to 2.80.2) * DNA low level doversion (renames) - only for .blend created since 2.80 started Note: We can't use DNA_struct_elem_find or get file version in init_structDNA, so we are manually iterating over the array of the SDNA elements instead. Note 2: This doversion change with renames can be reverted in a few months. But so far it's required for 2.8 files created between October 2016 and now. Reviewers: campbellbarton, sergey Differential Revision: https://developer.blender.org/D2927
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tools.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 79122de70dd..93cb1c62d01 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -366,9 +366,9 @@ static void object_select_cb(
bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *UNUSED(te),
TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
{
- SceneLayer *sl = CTX_data_scene_layer(C);
+ ViewLayer *sl = CTX_data_view_layer(C);
Object *ob = (Object *)tselem->id;
- Base *base = BKE_scene_layer_base_find(sl, ob);
+ Base *base = BKE_view_layer_base_find(sl, ob);
if (base && ((base->flag & BASE_VISIBLED) != 0)) {
base->flag |= BASE_SELECTED;
@@ -388,9 +388,9 @@ static void object_deselect_cb(
bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *UNUSED(te),
TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
{
- SceneLayer *sl = CTX_data_scene_layer(C);
+ ViewLayer *sl = CTX_data_view_layer(C);
Object *ob = (Object *)tselem->id;
- Base *base = BKE_scene_layer_base_find(sl, ob);
+ Base *base = BKE_view_layer_base_find(sl, ob);
if (base) {
base->flag &= ~BASE_SELECTED;
@@ -522,18 +522,18 @@ static void group_linkobs2scene_cb(
bContext *C, ReportList *UNUSED(reports), Scene *scene, TreeElement *UNUSED(te),
TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
{
- SceneLayer *sl = CTX_data_scene_layer(C);
+ ViewLayer *sl = CTX_data_view_layer(C);
SceneCollection *sc = CTX_data_scene_collection(C);
Group *group = (Group *)tselem->id;
GroupObject *gob;
Base *base;
for (gob = group->gobject.first; gob; gob = gob->next) {
- base = BKE_scene_layer_base_find(sl, gob->ob);
+ base = BKE_view_layer_base_find(sl, gob->ob);
if (!base) {
/* link to scene */
BKE_collection_object_add(scene, sc, gob->ob);
- base = BKE_scene_layer_base_find(sl, gob->ob);
+ base = BKE_view_layer_base_find(sl, gob->ob);
id_us_plus(&gob->ob->id);
}
@@ -848,14 +848,14 @@ static void collection_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tsel
WM_event_add_notifier(C, NC_SCENE | ND_LAYER, scene);
}
else if (event == OL_COLLECTION_OP_COLLECTION_UNLINK) {
- SceneLayer *sl = CTX_data_scene_layer(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
- if (BLI_findindex(&sl->layer_collections, lc) == -1) {
+ if (BLI_findindex(&view_layer->layer_collections, lc) == -1) {
/* we can't unlink if the layer collection wasn't directly linked */
TODO_LAYER_OPERATORS; /* this shouldn't be in the menu in those cases */
}
else {
- BKE_collection_unlink(sl, lc);
+ BKE_collection_unlink(view_layer, lc);
DEG_relations_tag_update(CTX_data_main(C));
WM_event_add_notifier(C, NC_SCENE | ND_LAYER, scene);
}
@@ -896,13 +896,13 @@ static Base *outline_delete_hierarchy(bContext *C, ReportList *reports, Scene *s
{
Base *child_base, *base_next;
Object *parent;
- SceneLayer *scene_layer = CTX_data_scene_layer(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
if (!base) {
return NULL;
}
- for (child_base = scene_layer->object_bases.first; child_base; child_base = base_next) {
+ for (child_base = view_layer->object_bases.first; child_base; child_base = base_next) {
base_next = child_base->next;
for (parent = child_base->object->parent; parent && (parent != base->object); parent = parent->parent);
if (parent) {
@@ -933,12 +933,12 @@ static void object_delete_hierarchy_cb(
bContext *C, ReportList *reports, Scene *scene,
TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
{
- SceneLayer *sl = CTX_data_scene_layer(C);
+ ViewLayer *sl = CTX_data_view_layer(C);
Base *base = (Base *)te->directdata;
Object *obedit = scene->obedit;
if (!base) {
- base = BKE_scene_layer_base_find(sl, (Object *)tselem->id);
+ base = BKE_view_layer_base_find(sl, (Object *)tselem->id);
}
if (base) {
/* Check also library later. */