diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2019-09-26 16:58:33 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2019-09-26 17:01:54 +0300 |
commit | 7c544626b7139ab46647a646a3c0e5651825fa79 (patch) | |
tree | 5822c104722e4441ed3aa19cfd169dbedcffda03 | |
parent | 5603725389f7315fe158d93cff650ccaee57c0f9 (diff) |
Sculpt: UI fixes and improvements
- Fix vertical spacing in grab brush grab active vertex option
- Move Remesher popover in the top bar to the right of Dyntopo
- Move topology automasking to the options subpanel
- Remove voxel remesher button from the topbar
- Add default shortcut to voxel remesher [Ctrl R]
- Add default shortcut to quadriflow [Ctrl Alt R]
- Add set pivot position operator to the sculpt menu
Reviewed By: billreynish
Differential Revision: https://developer.blender.org/D5880
-rw-r--r-- | release/scripts/presets/keyconfig/keymap_data/blender_default.py | 3 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 26 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 15 |
3 files changed, 31 insertions, 13 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 9dc23aaf22e..c1d1d0c9915 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -3855,6 +3855,9 @@ def km_sculpt(params): # Dynamic topology ("sculpt.dynamic_topology_toggle", {"type": 'D', "value": 'PRESS', "ctrl": True}, None), ("sculpt.set_detail_size", {"type": 'D', "value": 'PRESS', "shift": True}, None), + # Remesh + ("object.voxel_remesh", {"type": 'R', "value": 'PRESS', "ctrl": True}, None), + ("object.quadriflow_remesh", {"type": 'R', "value": 'PRESS', "ctrl": True, "alt": True}, None), # Brush properties ("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS'}, {"properties": [("scalar", 0.9)]}), diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 4a575a9ae8d..aca8ea701ce 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2898,6 +2898,31 @@ class VIEW3D_MT_sculpt(Menu): props = layout.operator("sculpt.dirty_mask", text='Dirty Mask') + layout.separator() + layout.menu("VIEW3D_MT_sculpt_set_pivot", text="Set Pivot") + + +class VIEW3D_MT_sculpt_set_pivot(Menu): + bl_label = "Sculpt Set Pivot" + + def draw(self, context): + layout = self.layout + + props = layout.operator("sculpt.set_pivot_position", text="Pivot to Origin") + props.mode = 'ORIGIN' + + props = layout.operator("sculpt.set_pivot_position", text="Pivot to Unmasked") + props.mode = 'UNMASKED' + + props = layout.operator("sculpt.set_pivot_position", text="Pivot to Mask Border") + props.mode = 'BORDER' + + props = layout.operator("sculpt.set_pivot_position", text="Pivot to Active Vertex") + props.mode = 'ACTIVE' + + props = layout.operator("sculpt.set_pivot_position", text="Pivot to Surface Under Cursor") + props.mode = 'SURFACE' + class VIEW3D_MT_particle(Menu): bl_label = "Particle" @@ -6782,6 +6807,7 @@ classes = ( VIEW3D_MT_gpencil_vertex_group, VIEW3D_MT_paint_weight, VIEW3D_MT_sculpt, + VIEW3D_MT_sculpt_set_pivot, VIEW3D_MT_particle, VIEW3D_MT_particle_context_menu, VIEW3D_MT_particle_showhide, diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 2fa9c26b776..761b813d576 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -425,9 +425,6 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel): row = col.row() row.prop(brush, "elastic_deform_volume_preservation", slider=True) - col.separator() - row = col.row() - row.prop(brush, "use_automasking_topology") if brush.sculpt_tool == 'GRAB': col.separator() @@ -641,6 +638,7 @@ class VIEW3D_PT_tools_brush_options(Panel, View3DPaintPanel): brush_texpaint_common_options(self, context, layout, brush, settings, True) elif context.sculpt_object and brush: + col.prop(brush, "use_automasking_topology") if capabilities.has_accumulate: col.prop(brush, "use_accumulate") @@ -1228,15 +1226,6 @@ class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel): def poll(cls, context): return (context.sculpt_object and context.tool_settings.sculpt) - def draw_header(self, context): - is_popover = self.is_popover - layout = self.layout - layout.operator( - "object.voxel_remesh", - text="", - emboss=is_popover, - ) - def draw(self, context): layout = self.layout layout.use_property_split = True @@ -2260,12 +2249,12 @@ classes = ( VIEW3D_PT_tools_brush_display_custom_icon, VIEW3D_PT_sculpt_dyntopo, VIEW3D_PT_sculpt_dyntopo_remesh, + VIEW3D_PT_sculpt_voxel_remesh, VIEW3D_PT_sculpt_symmetry, VIEW3D_PT_sculpt_symmetry_for_topbar, VIEW3D_PT_sculpt_options, VIEW3D_PT_sculpt_options_unified, VIEW3D_PT_sculpt_options_gravity, - VIEW3D_PT_sculpt_voxel_remesh, VIEW3D_PT_tools_weightpaint_symmetry, VIEW3D_PT_tools_weightpaint_symmetry_for_topbar, VIEW3D_PT_tools_weightpaint_options, |