diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-10-28 20:09:51 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-10-28 20:09:51 +0400 |
commit | 5acd5d14970c829c2873623716a67beeb6da5278 (patch) | |
tree | f805a8fd6d5ae5ad4a6d9903f5c26b511a21c32b /source/blender/editors | |
parent | f252230216ce0b6e73ed69edb1c05a07ac1e373a (diff) |
Improvements of Freestyle GUI controls - Part 1.
This commit makes a set of fixes and improvements based on the results of
Freestyle branch review by Brecht. The discussion thread is:
http://lists.blender.org/pipermail/bf-committers/2012-October/037927.html
* The Layers panel and Freestyle-related panels in the Render tab of the
Properties window were moved to the newly created Render Layers tab.
The idea is to separate per render layer rendering options into a distinct
Properties window tab, and use the existing Render tab to accommodate
per scene rendering options.
* The new Freestyle panel was added in the Render tab. The panel header
contains a toggle button for globally enabling Freestyle, with the aim of making
Freestyle easier to find. Those Freestyle options in the Post Processing panel
were also moved to the new panel.
* GUI code was updated so that UI controls will be greyed out (instead of
being hidden) when Freestyle is disabled. Additional UI changes were also
made to reduce space consumption.
* The list of line sets was moved from the Freestyle panel to the Freestyle:
Line Sets panel.
* Old ray-casting algorithms were removed from the UI. Now only two
algorithms (culled and non-culled cumulative visibility detection algorithms)
are available, and the selection is done by the new "Culling" toggle button
within the edge detection options.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_header.c | 1 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/space_buttons.c | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 7e232a02536..e5f5a4beac6 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -538,6 +538,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma switch (mainb) { case BCONTEXT_SCENE: case BCONTEXT_RENDER: + case BCONTEXT_RENDER_LAYER: found = buttons_context_path_scene(path); break; case BCONTEXT_WORLD: @@ -1032,7 +1033,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) && ptr->type == &RNA_Scene) + if (!ELEM3(sbuts->mainb, BCONTEXT_RENDER, BCONTEXT_SCENE, BCONTEXT_RENDER_LAYER) && ptr->type == &RNA_Scene) uiItemLDrag(row, ptr, "", icon); /* save some space */ else uiItemLDrag(row, ptr, name, icon); diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index ebba7d92819..3c2d9ac2eee 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -128,6 +128,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) } (void)0 BUTTON_HEADER_CTX(BCONTEXT_RENDER, ICON_SCENE, N_("Render")); + BUTTON_HEADER_CTX(BCONTEXT_RENDER_LAYER, ICON_RENDERLAYERS, N_("Render Layers")); BUTTON_HEADER_CTX(BCONTEXT_SCENE, ICON_SCENE_DATA, N_("Scene")); BUTTON_HEADER_CTX(BCONTEXT_WORLD, ICON_WORLD, N_("World")); BUTTON_HEADER_CTX(BCONTEXT_OBJECT, ICON_OBJECT_DATA, N_("Object")); diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index c894c1a980b..a24a292be06 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -155,6 +155,8 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar) ED_region_panels(C, ar, vertical, "scene", sbuts->mainb); else if (sbuts->mainb == BCONTEXT_RENDER) ED_region_panels(C, ar, vertical, "render", sbuts->mainb); + else if (sbuts->mainb == BCONTEXT_RENDER_LAYER) + ED_region_panels(C, ar, vertical, "render_layer", sbuts->mainb); else if (sbuts->mainb == BCONTEXT_WORLD) ED_region_panels(C, ar, vertical, "world", sbuts->mainb); else if (sbuts->mainb == BCONTEXT_OBJECT) @@ -239,6 +241,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn) switch (wmn->data) { case ND_RENDER_OPTIONS: buttons_area_redraw(sa, BCONTEXT_RENDER); + buttons_area_redraw(sa, BCONTEXT_RENDER_LAYER); break; case ND_FRAME: /* any buttons area can have animated properties so redraw all */ |