Outliner: Rename "Active View Layer" > "View Layer"

The original name came from a cheap conversion of the "active layer" option
to "active render layer" and then "active view layer".
This commit is contained in:
Dalai Felinto 2018-01-18 14:11:28 -02:00
parent 33ddd926b7
commit 74f872df3a
9 changed files with 17 additions and 17 deletions

View File

@ -43,7 +43,7 @@ class OUTLINER_HT_header(Header):
row.prop(space, "use_filter_complete", text="")
row.prop(space, "use_filter_case_sensitive", text="")
if space.display_mode not in {'DATABLOCKS', 'USER_PREFERENCES', 'KEYMAPS', 'ACT_LAYER', 'COLLECTIONS'}:
if space.display_mode not in {'DATABLOCKS', 'USER_PREFERENCES', 'KEYMAPS', 'VIEW_LAYER', 'COLLECTIONS'}:
row.prop(space, "use_sort_alpha", text="")
elif space.display_mode == 'DATABLOCKS':
@ -83,8 +83,8 @@ class OUTLINER_MT_editor_menus(Menu):
elif space.display_mode == 'ORPHAN_DATA':
layout.menu("OUTLINER_MT_edit_orphan_data")
elif space.display_mode == 'ACT_LAYER':
layout.menu("OUTLINER_MT_edit_active_view_layer")
elif space.display_mode == 'VIEW_LAYER':
layout.menu("OUTLINER_MT_edit_view_layer")
class OUTLINER_MT_view(Menu):
@ -111,7 +111,7 @@ class OUTLINER_MT_view(Menu):
layout.operator("screen.screen_full_area", text="Toggle Fullscreen Area").use_hide_panels = True
class OUTLINER_MT_edit_active_view_layer(Menu):
class OUTLINER_MT_edit_view_layer(Menu):
bl_label = "Edit"
def draw(self, context):
@ -161,7 +161,7 @@ classes = (
OUTLINER_HT_header,
OUTLINER_MT_editor_menus,
OUTLINER_MT_view,
OUTLINER_MT_edit_active_view_layer,
OUTLINER_MT_edit_view_layer,
OUTLINER_MT_edit_datablocks,
OUTLINER_MT_edit_orphan_data,
OUTLINER_MT_context_scene_collection,

View File

@ -503,7 +503,7 @@ void do_versions_after_linking_280(Main *main)
if (view_layer->spacetype == SPACE_OUTLINER) {
SpaceOops *soutliner = (SpaceOops *)view_layer;
soutliner->outlinevis = SO_ACT_LAYER;
soutliner->outlinevis = SO_VIEW_LAYER;
if (BLI_listbase_count_ex(&layer->layer_collections, 2) == 1) {
if (soutliner->treestore == NULL) {

View File

@ -100,7 +100,7 @@ static int collections_editor_poll(bContext *C)
static int view_layer_editor_poll(bContext *C)
{
SpaceOops *so = CTX_wm_space_outliner(C);
return (so != NULL) && (so->outlinevis == SO_ACT_LAYER);
return (so != NULL) && (so->outlinevis == SO_VIEW_LAYER);
}
/* -------------------------------------------------------------------- */

View File

@ -58,7 +58,7 @@ static int outliner_item_drag_drop_poll(bContext *C)
SpaceOops *soops = CTX_wm_space_outliner(C);
return ED_operator_outliner_active(C) &&
/* Only collection display modes supported for now. Others need more design work */
ELEM(soops->outlinevis, SO_ACT_LAYER, SO_COLLECTIONS, SO_GROUPS);
ELEM(soops->outlinevis, SO_VIEW_LAYER, SO_COLLECTIONS, SO_GROUPS);
}
static TreeElement *outliner_item_drag_element_find(SpaceOops *soops, ARegion *ar, const wmEvent *event)

View File

@ -1871,7 +1871,7 @@ static const EnumPropertyItem *outliner_collection_operation_type_itemf(
switch (soops->outlinevis) {
case SO_GROUPS:
return prop_collection_op_group_internal_types;
case SO_ACT_LAYER:
case SO_VIEW_LAYER:
return prop_collection_op_none_types;
}
return NULL;

View File

@ -1475,7 +1475,7 @@ static void outliner_add_layer_collections_recursive(
outliner_make_hierarchy(&ten->subtree);
}
}
static void outliner_add_collections_act_layer(SpaceOops *soops, Scene *scene, ViewLayer *layer)
static void outliner_add_view_layer(SpaceOops *soops, Scene *scene, ViewLayer *layer)
{
outliner_add_layer_collections_recursive(soops, &soops->tree, &scene->id, &layer->layer_collections, NULL);
}
@ -1572,7 +1572,7 @@ static TreeElement *outliner_add_scene_collection_recursive(
return ten;
}
static void outliner_add_collections_master(SpaceOops *soops, Scene *scene)
static void outliner_add_collections(SpaceOops *soops, Scene *scene)
{
SceneCollection *master_collection = BKE_collection_master(&scene->id);
TreeElement *ten = outliner_add_scene_collection_recursive(soops, &soops->tree, &scene->id, master_collection, NULL);
@ -2022,11 +2022,11 @@ void outliner_build_tree(Main *mainvar, Scene *scene, ViewLayer *view_layer, Spa
else if (soops->outlinevis == SO_ID_ORPHANS) {
outliner_add_orphaned_datablocks(mainvar, soops);
}
else if (soops->outlinevis == SO_ACT_LAYER) {
outliner_add_collections_act_layer(soops, scene, view_layer);
else if (soops->outlinevis == SO_VIEW_LAYER) {
outliner_add_view_layer(soops, scene, view_layer);
}
else if (soops->outlinevis == SO_COLLECTIONS) {
outliner_add_collections_master(soops, scene);
outliner_add_collections(soops, scene);
}
else {
if (BASACT(view_layer)) {

View File

@ -437,7 +437,7 @@ static void outliner_main_region_message_subscribe(
.notify = ED_region_do_msg_notify_tag_redraw,
};
if (ELEM(soops->outlinevis, SO_ACT_LAYER, SO_COLLECTIONS)) {
if (ELEM(soops->outlinevis, SO_VIEW_LAYER, SO_COLLECTIONS)) {
WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw);
}
}

View File

@ -298,7 +298,7 @@ typedef enum eSpaceOutliner_Mode {
SO_USERDEF = 12,
/* SO_KEYMAP = 13, */ /* deprecated! */
SO_ID_ORPHANS = 14,
SO_ACT_LAYER = 15,
SO_VIEW_LAYER = 15,
SO_COLLECTIONS = 16,
} eSpaceOutliner_Mode;

View File

@ -2115,7 +2115,7 @@ static void rna_def_space_outliner(BlenderRNA *brna)
{SO_USERDEF, "USER_PREFERENCES", 0, "User Preferences", "Display user preference data"},
{SO_ID_ORPHANS, "ORPHAN_DATA", 0, "Orphan Data",
"Display data-blocks which are unused and/or will be lost when the file is reloaded"},
{SO_ACT_LAYER, "ACT_LAYER", 0, "Active View Layer", "Display the collections of the active view layer"},
{SO_VIEW_LAYER, "VIEW_LAYER", 0, "View Layer", "Display the collections of the active view layer"},
{SO_COLLECTIONS, "COLLECTIONS", 0, "Collections", "Display all collections based on the "
"master collection hierarchy"},
{0, NULL, 0, NULL, NULL}