[Bf-blender-cvs] [64599aff4c3] greasepencil-object: UI: Move Draw on Back to Topbar

Antonio Vazquez noreply at git.blender.org
Fri Jun 15 10:31:18 CEST 2018


Commit: 64599aff4c34e5c0680e2e2588e2cd48dce9c792
Author: Antonio Vazquez
Date:   Fri Jun 15 10:31:08 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB64599aff4c34e5c0680e2e2588e2cd48dce9c792

UI: Move Draw on Back to Topbar

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 43419dfcc5c..7f6f348bb52 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -76,7 +76,6 @@ class VIEW3D_HT_header(Header):
         # Grease Pencil
         # GPXX this is a hack while we merge to keep all running
         if context.active_object and context.gpencil_data and context.active_object.type == 'GPENCIL':
-            ob = context.active_object
             gpd = context.gpencil_data
 
             if gpd.is_stroke_paint_mode:
@@ -88,6 +87,12 @@ class VIEW3D_HT_header(Header):
                 if tool_settings.gpencil_stroke_placement_view3d in ('SURFACE', 'STROKE'):
                     row.prop(tool_settings, "use_gpencil_stroke_endpoints")
 
+                brush = context.active_gpencil_brush
+                if brush is not None:
+                    gp_settings = brush.gpencil_settings
+                    if gp_settings.gpencil_brush_type != 'ERASE':
+                        row.prop(context.tool_settings, "use_gpencil_draw_onback", text="", icon='ORTHO')
+
             if gpd.use_stroke_edit_mode or gpd.is_stroke_sculpt_mode or gpd.is_stroke_weight_mode:
                 row = layout.row(align=True)
                 row.prop(gpd, "use_multiedit", text="", icon="FORCE_HARMONIC")
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 434778130cf..2c14f77341c 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1408,7 +1408,6 @@ class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel):
                 col.prop(brush, "size", text="Thickness")
                 col.prop(gp_settings, "gpencil_fill_simplyfy_level", text="Simplify")
 
-
                 col = layout.row(align=True)
                 col.template_ID(gp_settings, "material")
 
@@ -1435,11 +1434,6 @@ class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel):
                 row = layout.row(align=True)
                 row.template_ID(gp_settings, "material")
 
-            if gp_settings.gpencil_brush_type != 'ERASE':
-                layout.separator()
-                layout.prop(context.tool_settings, "use_gpencil_draw_onback", text="Draw on Back")
-
-
 
 # Grease Pencil drawing brushes options
 class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel):



More information about the Bf-blender-cvs mailing list