[Bf-blender-cvs] [f36855f0fd8] blender2.8: UI: show all particle brush settings in topbar

Campbell Barton noreply at git.blender.org
Thu Aug 2 14:10:45 CEST 2018


Commit: f36855f0fd8fb5f7150110fdb0d88fb03c898ee5
Author: Campbell Barton
Date:   Thu Aug 2 22:10:38 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBf36855f0fd8fb5f7150110fdb0d88fb03c898ee5

UI: show all particle brush settings in topbar

Also show particle brush in tool-properties panel.

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

M	release/scripts/startup/bl_ui/space_topbar.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py
M	source/blender/editors/space_buttons/space_buttons.c

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

diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 57265b9c130..a417ef856f9 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -225,6 +225,7 @@ class _draw_left_context_mode:
         UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True, text="Strength")
 
     def PARTICLE(context, layout):
+        # See: 'VIEW3D_PT_tools_brush', basically a duplicate
         settings = context.tool_settings.particle_edit
         brush = settings.brush
         tool = settings.tool
@@ -235,6 +236,15 @@ class _draw_left_context_mode:
             else:
                 layout.prop(brush, "strength", slider=True)
 
+            if tool == 'ADD':
+                layout.prop(settings, "use_default_interpolate")
+                layout.prop(brush, "steps", slider=True)
+                layout.prop(settings, "default_key_count", slider=True)
+            elif tool == 'LENGTH':
+                layout.row().prop(brush, "length_mode", expand=True)
+            elif tool == 'PUFF':
+                layout.row().prop(brush, "puff_mode", expand=True)
+                layout.prop(brush, "use_puff_volume")
 
 class INFO_MT_editor_menus(Menu):
     bl_idname = "INFO_MT_editor_menus"
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index ccec7ab941a..ca55429c929 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -289,19 +289,14 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
         if context.particle_edit_object:
             tool = settings.tool
 
-
-            if self.is_popover:
-                # Topbar shows these already.
-                pass
-            else:
-                if tool != 'NONE':
-                    layout.column().prop(settings, "tool", expand=True)
-                    col = layout.column()
-                    col.prop(brush, "size", slider=True)
-                    if tool == 'ADD':
-                        col.prop(brush, "count")
-                    else:
-                        col.prop(brush, "strength", slider=True)
+            if tool != 'NONE':
+                layout.column().prop(settings, "tool")
+                col = layout.column()
+                col.prop(brush, "size", slider=True)
+                if tool == 'ADD':
+                    col.prop(brush, "count")
+                else:
+                    col.prop(brush, "strength", slider=True)
 
             if tool == 'ADD':
                 col = layout.column()
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 98ff2f67b58..0350e3fcd14 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -244,7 +244,7 @@ static void buttons_main_region_layout_tool(const bContext *C, ARegion *ar)
 				ARRAY_SET_ITEMS(contexts, ".paint_common", ".imagepaint");
 				break;
 			case CTX_MODE_PARTICLE:
-				ARRAY_SET_ITEMS(contexts, ".particlemode");
+				ARRAY_SET_ITEMS(contexts, ".paint_common", ".particlemode");
 				break;
 			case CTX_MODE_OBJECT:
 				ARRAY_SET_ITEMS(contexts, ".objectmode");



More information about the Bf-blender-cvs mailing list