[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51710] branches/soc-2008-mxcurioni: Improvements of Freestyle GUI controls - Part 1.

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Sun Oct 28 17:09:52 CET 2012


Revision: 51710
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51710
Author:   kjym3
Date:     2012-10-28 16:09:51 +0000 (Sun, 28 Oct 2012)
Log Message:
-----------
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.

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/release/datafiles/startup.blend
    branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/__init__.py
    branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/properties_render.py
    branches/soc-2008-mxcurioni/source/blender/blenloader/intern/readfile.c
    branches/soc-2008-mxcurioni/source/blender/editors/space_buttons/buttons_context.c
    branches/soc-2008-mxcurioni/source/blender/editors/space_buttons/buttons_header.c
    branches/soc-2008-mxcurioni/source/blender/editors/space_buttons/space_buttons.c
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
    branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_freestyle_types.h
    branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_space_types.h
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_linestyle.c
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_space.c

Added Paths:
-----------
    branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/properties_render_layer.py

Modified: branches/soc-2008-mxcurioni/release/datafiles/startup.blend
===================================================================
(Binary files differ)

Modified: branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/__init__.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/__init__.py	2012-10-28 15:37:29 UTC (rev 51709)
+++ branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/__init__.py	2012-10-28 16:09:51 UTC (rev 51710)
@@ -51,6 +51,7 @@
     "properties_physics_smoke",
     "properties_physics_softbody",
     "properties_render",
+    "properties_render_layer",
     "properties_scene",
     "properties_texture",
     "properties_world",

Modified: branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/properties_render.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/properties_render.py	2012-10-28 15:37:29 UTC (rev 51709)
+++ branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/properties_render.py	2012-10-28 16:09:51 UTC (rev 51710)
@@ -71,660 +71,6 @@
         layout.prop(rd, "display_mode", text="Display")
 
 
-class RENDER_PT_layers(RenderButtonsPanel, Panel):
-    bl_label = "Layers"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        scene = context.scene
-        rd = scene.render
-
-        row = layout.row()
-        row.template_list(rd, "layers", rd.layers, "active_index", rows=2)
-
-        col = row.column(align=True)
-        col.operator("scene.render_layer_add", icon='ZOOMIN', text="")
-        col.operator("scene.render_layer_remove", icon='ZOOMOUT', text="")
-
-        row = layout.row()
-        rl = rd.layers.active
-        if rl:
-            row.prop(rl, "name")
-        row.prop(rd, "use_single_layer", text="", icon_only=True)
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(scene, "layers", text="Scene")
-        col.label(text="")
-        col.prop(rl, "light_override", text="Light")
-        col.prop(rl, "material_override", text="Material")
-
-        col = split.column()
-        col.prop(rl, "layers", text="Layer")
-        col.label(text="Mask Layers:")
-        col.prop(rl, "layers_zmask", text="")
-
-        layout.separator()
-        layout.label(text="Include:")
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(rl, "use_zmask")
-        row = col.row()
-        row.prop(rl, "invert_zmask", text="Negate")
-        row.active = rl.use_zmask
-        col.prop(rl, "use_all_z")
-
-        col = split.column()
-        col.prop(rl, "use_solid")
-        col.prop(rl, "use_halo")
-        col.prop(rl, "use_ztransp")
-        col.prop(rl, "use_sky")
-
-        col = split.column()
-        col.prop(rl, "use_edge_enhance")
-        col.prop(rl, "use_strand")
-        col.prop(rl, "use_freestyle")
-
-        layout.separator()
-
-        split = layout.split()
-
-        col = split.column()
-        col.label(text="Passes:")
-        col.prop(rl, "use_pass_combined")
-        col.prop(rl, "use_pass_z")
-        col.prop(rl, "use_pass_vector")
-        col.prop(rl, "use_pass_normal")
-        col.prop(rl, "use_pass_uv")
-        col.prop(rl, "use_pass_mist")
-        col.prop(rl, "use_pass_object_index")
-        col.prop(rl, "use_pass_material_index")
-        col.prop(rl, "use_pass_color")
-
-        col = split.column()
-        col.label()
-        col.prop(rl, "use_pass_diffuse")
-        row = col.row()
-        row.prop(rl, "use_pass_specular")
-        row.prop(rl, "exclude_specular", text="")
-        row = col.row()
-        row.prop(rl, "use_pass_shadow")
-        row.prop(rl, "exclude_shadow", text="")
-        row = col.row()
-        row.prop(rl, "use_pass_emit")
-        row.prop(rl, "exclude_emit", text="")
-        row = col.row()
-        row.prop(rl, "use_pass_ambient_occlusion")
-        row.prop(rl, "exclude_ambient_occlusion", text="")
-        row = col.row()
-        row.prop(rl, "use_pass_environment")
-        row.prop(rl, "exclude_environment", text="")
-        row = col.row()
-        row.prop(rl, "use_pass_indirect")
-        row.prop(rl, "exclude_indirect", text="")
-        row = col.row()
-        row.prop(rl, "use_pass_reflection")
-        row.prop(rl, "exclude_reflection", text="")
-        row = col.row()
-        row.prop(rl, "use_pass_refraction")
-        row.prop(rl, "exclude_refraction", text="")
-
-
-class RENDER_MT_lineset_specials(Menu):
-    bl_label = "Lineset Specials"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator("scene.freestyle_lineset_copy", icon='COPYDOWN')
-        layout.operator("scene.freestyle_lineset_paste", icon='PASTEDOWN')
-
-
-class RENDER_PT_freestyle(RenderButtonsPanel, Panel):
-    bl_label = "Freestyle"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        rd = context.scene.render
-        if rd.engine not in cls.COMPAT_ENGINES:
-            return False
-        rl = rd.layers.active
-        return rl and rl.use_freestyle
-
-    def draw(self, context):
-        layout = self.layout
-
-        rd = context.scene.render
-        rl = rd.layers.active
-        freestyle = rl.freestyle_settings
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(freestyle, "raycasting_algorithm", text="Raycasting Algorithm")
-        col.prop(freestyle, "mode", text="Control Mode")
-
-        col.label(text="Edge Detection Options:")
-        col.prop(freestyle, "use_smoothness")
-        col.prop(freestyle, "crease_angle")
-        if freestyle.mode == "SCRIPT":
-            col.prop(freestyle, "use_material_boundaries")
-            col.prop(freestyle, "use_ridges_and_valleys")
-            col.prop(freestyle, "use_suggestive_contours")
-        col.prop(freestyle, "use_advanced_options")
-        if freestyle.use_advanced_options:
-            col.prop(freestyle, "sphere_radius")
-            col.prop(freestyle, "kr_derivative_epsilon")
-
-        if freestyle.mode == "EDITOR":
-
-            lineset = freestyle.linesets.active
-
-            col.label(text="Line Sets:")
-            row = col.row()
-            rows = 2
-            if lineset:
-                rows = 5
-            row.template_list(freestyle, "linesets", freestyle.linesets, "active_index", rows=rows)
-
-            sub = row.column()
-            subsub = sub.column(align=True)
-            subsub.operator("scene.freestyle_lineset_add", icon='ZOOMIN', text="")
-            subsub.operator("scene.freestyle_lineset_remove", icon='ZOOMOUT', text="")
-            subsub.menu("RENDER_MT_lineset_specials", icon='DOWNARROW_HLT', text="")
-            if lineset:
-                sub.separator()
-                subsub = sub.column(align=True)
-                subsub.operator("scene.freestyle_lineset_move", icon='TRIA_UP', text="").direction = 'UP'
-                subsub.operator("scene.freestyle_lineset_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
-
-        else: # freestyle.mode == "SCRIPT"
-
-            col.separator()
-            col.operator("scene.freestyle_module_add")
-
-            for i, module in enumerate(freestyle.modules):
-                box = layout.box()
-                box.context_pointer_set("freestyle_module", module)
-                row = box.row(align=True)
-                row.prop(module, "use", text="")
-                row.prop(module, "module_path", text="")
-                row.operator("scene.freestyle_module_remove", icon='X', text="")
-                row.operator("scene.freestyle_module_move", icon='TRIA_UP', text="").direction = 'UP'
-                row.operator("scene.freestyle_module_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
-
-
-class RENDER_PT_freestyle_lineset(RenderButtonsPanel, Panel):
-    bl_label = "Freestyle: Line Set"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        rd = context.scene.render
-        if rd.engine not in cls.COMPAT_ENGINES:
-            return False
-        rl = rd.layers.active
-        if rl and rl.use_freestyle:
-            freestyle = rl.freestyle_settings
-            return freestyle.mode == "EDITOR" and freestyle.linesets.active
-        return False
-
-    def draw_edge_type_buttons(self, box, lineset, edge_type):
-        # property names
-        select_edge_type = "select_" + edge_type
-        exclude_edge_type = "exclude_" + edge_type
-        # draw edge type buttons
-        row = box.row(align=True)
-        row.prop(lineset, select_edge_type)
-        sub = row.column()
-        sub.prop(lineset, exclude_edge_type, text="")
-        sub.enabled = getattr(lineset, select_edge_type)
-
-    def draw(self, context):
-        layout = self.layout
-
-        rd = context.scene.render
-        rl = rd.layers.active
-        freestyle = rl.freestyle_settings
-        lineset = freestyle.linesets.active
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(lineset, "name")
-
-        col.prop(lineset, "select_by_visibility")
-        if lineset.select_by_visibility:
-            sub = col.row(align=True)
-            sub.prop(lineset, "visibility", expand=True)
-            if lineset.visibility == "RANGE":
-                sub = col.row(align=True)
-                sub.prop(lineset, "qi_start")
-                sub.prop(lineset, "qi_end")
-            col.separator() # XXX
-
-        col.prop(lineset, "select_by_edge_types")
-        if lineset.select_by_edge_types:
-            row = col.row()
-            row.prop(lineset, "edge_type_negation", expand=True)
-            row = col.row()
-            row.prop(lineset, "edge_type_combination", expand=True)
-
-            row = col.row()
-            sub = row.column()
-            self.draw_edge_type_buttons(sub, lineset, "silhouette")
-            self.draw_edge_type_buttons(sub, lineset, "border")
-            self.draw_edge_type_buttons(sub, lineset, "contour")
-            self.draw_edge_type_buttons(sub, lineset, "suggestive_contour")
-            self.draw_edge_type_buttons(sub, lineset, "ridge_valley")
-            sub = row.column()
-            self.draw_edge_type_buttons(sub, lineset, "crease")
-            self.draw_edge_type_buttons(sub, lineset, "edge_mark")

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list