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_buttons
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_buttons')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c24
-rw-r--r--source/blender/editors/space_buttons/buttons_texture.c12
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c6
3 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 392efd03ee1..5a9fbd0e0c4 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -186,7 +186,7 @@ static int buttons_context_path_collection(ButsContextPath *path)
return 1;
}
- SceneLayer *sl = ptr->data;
+ ViewLayer *sl = ptr->data;
LayerCollection *sc = BKE_layer_collection_get_active(sl);
if (sc) {
@@ -208,7 +208,7 @@ static int buttons_context_path_object(ButsContextPath *path)
return 1;
}
- SceneLayer *sl = ptr->data;
+ ViewLayer *sl = ptr->data;
Object *ob = (sl->basact) ? sl->basact->object : NULL;
if (ob) {
@@ -411,7 +411,7 @@ static int buttons_context_path_brush(const bContext *C, ButsContextPath *path)
scene = path->ptr[path->len - 1].data;
if (scene) {
- SceneLayer *sl = CTX_data_scene_layer(C);
+ ViewLayer *sl = CTX_data_view_layer(C);
br = BKE_paint_brush(BKE_paint_get_active(scene, sl));
}
@@ -561,7 +561,7 @@ static int buttons_context_path_texture(const bContext *C, ButsContextPath *path
static bool buttons_context_linestyle_pinnable(const bContext *C)
{
Scene *scene = CTX_data_scene(C);
- SceneLayer *active_scene_layer;
+ ViewLayer *active_view_layer;
FreestyleConfig *config;
SpaceButs *sbuts;
@@ -570,8 +570,8 @@ static bool buttons_context_linestyle_pinnable(const bContext *C)
return false;
}
/* if Freestyle is not in the Parameter Editor mode */
- active_scene_layer = BLI_findlink(&scene->render_layers, scene->active_layer);
- config = &active_scene_layer->freestyle_config;
+ active_view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
+ config = &active_view_layer->freestyle_config;
if (config->mode != FREESTYLE_CONTROL_EDITOR_MODE) {
return false;
}
@@ -608,7 +608,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
/* No pinned root, use scene or workspace as initial root. */
else {
if ((mainb != BCONTEXT_WORKSPACE) && (use_scene_settings ||
- ELEM(mainb, BCONTEXT_SCENE, BCONTEXT_RENDER, BCONTEXT_RENDER_LAYER, BCONTEXT_WORLD)))
+ ELEM(mainb, BCONTEXT_SCENE, BCONTEXT_RENDER, BCONTEXT_VIEW_LAYER, BCONTEXT_WORLD)))
{
RNA_id_pointer_create(&scene->id, &path->ptr[0]);
path->len++;
@@ -619,9 +619,9 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
}
}
- if (!ELEM(mainb, BCONTEXT_WORKSPACE, BCONTEXT_SCENE, BCONTEXT_RENDER, BCONTEXT_RENDER_LAYER, BCONTEXT_WORLD)) {
- SceneLayer *scene_layer = BKE_scene_layer_from_workspace_get(scene, workspace);
- RNA_pointer_create(NULL, &RNA_SceneLayer, scene_layer, &path->ptr[path->len]);
+ if (!ELEM(mainb, BCONTEXT_WORKSPACE, BCONTEXT_SCENE, BCONTEXT_RENDER, BCONTEXT_VIEW_LAYER, BCONTEXT_WORLD)) {
+ ViewLayer *view_layer = BKE_view_layer_from_workspace_get(scene, workspace);
+ RNA_pointer_create(NULL, &RNA_ViewLayer, view_layer, &path->ptr[path->len]);
path->len++;
}
@@ -632,7 +632,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
case BCONTEXT_RENDER:
found = buttons_context_path_scene(path);
break;
- case BCONTEXT_RENDER_LAYER:
+ case BCONTEXT_VIEW_LAYER:
#ifdef WITH_FREESTYLE
if (buttons_context_linestyle_pinnable(C)) {
found = buttons_context_path_linestyle(path);
@@ -1186,7 +1186,7 @@ void buttons_context_draw(const bContext *C, uiLayout *layout)
name = RNA_struct_name_get_alloc(ptr, namebuf, sizeof(namebuf), NULL);
if (name) {
- if ((!ELEM(sbuts->mainb, BCONTEXT_RENDER, BCONTEXT_SCENE, BCONTEXT_RENDER_LAYER) && ptr->type == &RNA_Scene) ||
+ if ((!ELEM(sbuts->mainb, BCONTEXT_RENDER, BCONTEXT_SCENE, BCONTEXT_VIEW_LAYER) && ptr->type == &RNA_Scene) ||
(!ELEM(sbuts->mainb, BCONTEXT_WORKSPACE) && ptr->type == &RNA_WorkSpace))
{
uiItemLDrag(row, ptr, "", icon); /* save some space */
diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c
index 8a23c762b8c..036db87e846 100644
--- a/source/blender/editors/space_buttons/buttons_texture.c
+++ b/source/blender/editors/space_buttons/buttons_texture.c
@@ -109,14 +109,14 @@ bool ED_texture_context_check_linestyle(const bContext *C)
{
#ifdef WITH_FREESTYLE
Scene *scene = CTX_data_scene(C);
- SceneLayer *active_render_layer;
+ ViewLayer *active_view_layer;
FreestyleConfig *config;
FreestyleLineSet *lineset;
FreestyleLineStyle *linestyle;
if (scene && (scene->r.mode & R_EDGE_FRS)) {
- active_render_layer = BLI_findlink(&scene->render_layers, scene->active_layer);
- config = &active_render_layer->freestyle_config;
+ active_view_layer = BLI_findlink(&scene->view_layers, scene->active_view_layer);
+ config = &active_view_layer->freestyle_config;
if (config->mode == FREESTYLE_CONTROL_EDITOR_MODE) {
lineset = BKE_freestyle_lineset_get_active(config);
if (lineset) {
@@ -196,7 +196,7 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts)
else if ((sbuts->mainb == BCONTEXT_PARTICLE) && valid_particles) {
sbuts->texture_context = sbuts->texture_context_prev = SB_TEXC_PARTICLES;
}
- else if ((sbuts->mainb == BCONTEXT_RENDER_LAYER) && valid_linestyle) {
+ else if ((sbuts->mainb == BCONTEXT_VIEW_LAYER) && valid_linestyle) {
sbuts->texture_context = sbuts->texture_context_prev = SB_TEXC_LINESTYLE;
}
else if ((ELEM(sbuts->mainb, BCONTEXT_MODIFIER, BCONTEXT_PHYSICS)) && valid_others) {
@@ -363,8 +363,8 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
if (!workspace) {
workspace = CTX_wm_workspace(C);
}
- SceneLayer *scene_layer = BKE_scene_layer_from_workspace_get(scene, workspace);
- ob = OBACT(scene_layer);
+ ViewLayer *view_layer = BKE_view_layer_from_workspace_get(scene, workspace);
+ ob = OBACT(view_layer);
}
if (ob && ob->type == OB_LAMP && !la)
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 3607f817721..74b20360a53 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -147,8 +147,8 @@ static void buttons_main_region_draw(const bContext *C, ARegion *ar)
ED_region_panels(C, ar, "scene", sbuts->mainb, vertical);
else if (sbuts->mainb == BCONTEXT_RENDER)
ED_region_panels(C, ar, "render", sbuts->mainb, vertical);
- else if (sbuts->mainb == BCONTEXT_RENDER_LAYER)
- ED_region_panels(C, ar, "render_layer", sbuts->mainb, vertical);
+ else if (sbuts->mainb == BCONTEXT_VIEW_LAYER)
+ ED_region_panels(C, ar, "view_layer", sbuts->mainb, vertical);
else if (sbuts->mainb == BCONTEXT_WORLD)
ED_region_panels(C, ar, "world", sbuts->mainb, vertical);
else if (sbuts->mainb == BCONTEXT_WORKSPACE)
@@ -248,7 +248,7 @@ static void buttons_area_listener(
switch (wmn->data) {
case ND_RENDER_OPTIONS:
buttons_area_redraw(sa, BCONTEXT_RENDER);
- buttons_area_redraw(sa, BCONTEXT_RENDER_LAYER);
+ buttons_area_redraw(sa, BCONTEXT_VIEW_LAYER);
break;
case ND_WORLD:
buttons_area_redraw(sa, BCONTEXT_WORLD);