diff options
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 92 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_render.py | 4 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 34 |
3 files changed, 87 insertions, 43 deletions
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 677c7b9960e..4299cf6035d 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -20,6 +20,7 @@ from bpy.types import Menu, UIList +from bpy.app.translations import pgettext_iface as iface_ def gpencil_stroke_placement_settings(context, layout): @@ -52,6 +53,34 @@ def gpencil_stroke_placement_settings(context, layout): row.prop(ts, "use_gpencil_stroke_endpoints") +def gpencil_active_brush_settings_simple(context, layout): + brush = context.active_gpencil_brush + + col = layout.column() + col.label("Active Brush: ") + + row = col.row(align=True) + row.operator_context = 'EXEC_REGION_WIN' + row.operator_menu_enum("gpencil.brush_change", "brush", text="", icon='BRUSH_DATA') + row.prop(brush, "name", text="") + + col.prop(brush, "line_width", slider=True) + row = col.row(align=True) + row.prop(brush, "use_random_pressure", text='', icon='RNDCURVE') + row.prop(brush, "pen_sensitivity_factor", slider=True) + row.prop(brush, "use_pressure", text='', icon='STYLUS_PRESSURE') + row = col.row(align=True) + row.prop(brush, "use_random_strength", text='', icon='RNDCURVE') + row.prop(brush, "strength", slider=True) + row.prop(brush, "use_strength_pressure", text='', icon='STYLUS_PRESSURE') + row = col.row(align=True) + row.prop(brush, "jitter", slider=True) + row.prop(brush, "use_jitter_pressure", text='', icon='STYLUS_PRESSURE') + row = col.row() + row.prop(brush, "angle", slider=True) + row.prop(brush, "angle_factor", text="Factor", slider=True) + + class GreasePencilDrawingToolsPanel: # subclass must set # bl_space_type = 'IMAGE_EDITOR' @@ -187,6 +216,15 @@ class GreasePencilStrokeEditPanel: col.operator_menu_enum("gpencil.stroke_arrange", text="Arrange Strokes...", property="direction") col.operator("gpencil.stroke_change_color", text="Move to Color") + if is_3d_view: + layout.separator() + col = layout.column(align=True) + col.operator("gpencil.interpolate", text="Interpolate") + col.operator("gpencil.interpolate_sequence", text="Sequence") + settings = context.tool_settings.gpencil_sculpt + col.prop(settings, "interpolate_all_layers") + col.prop(settings, "interpolate_selected_only") + layout.separator() col = layout.column(align=True) col.operator("gpencil.stroke_join", text="Join").type = 'JOIN' @@ -197,6 +235,10 @@ class GreasePencilStrokeEditPanel: if gpd: col.prop(gpd, "show_stroke_direction", text="Show Directions") + if is_3d_view: + layout.separator() + layout.operator("gpencil.reproject") + class GreasePencilBrushPanel: # subclass must set @@ -460,29 +502,7 @@ class GPENCIL_PIE_settings_palette(Menu): col.prop(palcolor, "fill_alpha", text="", slider=True) # S Brush settings - col = pie.column() - col.label("Active Brush: ") - - row = col.row() - row.operator_context = 'EXEC_REGION_WIN' - row.operator_menu_enum("gpencil.brush_change", "brush", text="", icon='BRUSH_DATA') - row.prop(brush, "name", text="") - - col.prop(brush, "line_width", slider=True) - row = col.row(align=True) - row.prop(brush, "use_random_pressure", text='', icon='RNDCURVE') - row.prop(brush, "pen_sensitivity_factor", slider=True) - row.prop(brush, "use_pressure", text='', icon='STYLUS_PRESSURE') - row = col.row(align=True) - row.prop(brush, "use_random_strength", text='', icon='RNDCURVE') - row.prop(brush, "strength", slider=True) - row.prop(brush, "use_strength_pressure", text='', icon='STYLUS_PRESSURE') - row = col.row(align=True) - row.prop(brush, "jitter", slider=True) - row.prop(brush, "use_jitter_pressure", text='', icon='STYLUS_PRESSURE') - row = col.row() - row.prop(brush, "angle", slider=True) - row.prop(brush, "angle_factor", text="Factor", slider=True) + gpencil_active_brush_settings_simple(context, pie) # N - Active Layer col = pie.column() @@ -752,6 +772,7 @@ class GPENCIL_MT_palettecolor_specials(Menu): layout.separator() layout.operator("gpencil.palettecolor_select", icon='COLOR', text="Select Strokes") + layout.operator("gpencil.stroke_change_color", icon='MAN_TRANS', text="Move to Color") class GreasePencilDataPanel: @@ -834,7 +855,10 @@ class GreasePencilDataPanel: split.prop(gpl, "show_points") # Offsets + Parenting (where available) - split = layout.split(percentage=0.5) + if context.space_data.type == 'VIEW_3D': + split = layout.split(percentage=0.5) + else: + split = layout.column() # parenting is not available in 2D editors... split.active = not gpl.lock # Offsets - Color Tint @@ -868,10 +892,10 @@ class GreasePencilDataPanel: row.active = not gpl.lock if gpl.active_frame: - lock_status = "Locked" if gpl.lock_frame else "Unlocked" - lock_label = "Frame: %d (%s)" % (gpl.active_frame.frame_number, lock_status) + lock_status = iface_("Locked") if gpl.lock_frame else iface_("Unlocked") + lock_label = iface_("Frame: %d (%s)") % (gpl.active_frame.frame_number, lock_status) else: - lock_label = "Lock Frame" + lock_label = iface_("Lock Frame") row.prop(gpl, "lock_frame", text=lock_label, icon='UNLOCKED') row.operator("gpencil.active_frame_delete", text="", icon='X') @@ -956,10 +980,13 @@ class GreasePencilPaletteColorPanel: sub.operator("gpencil.palettecolor_move", icon='TRIA_UP', text="").direction = 'UP' sub.operator("gpencil.palettecolor_move", icon='TRIA_DOWN', text="").direction = 'DOWN' - col.separator() - sub = col.column(align=True) + row = layout.row() + sub = row.row(align=True) + sub.label(text="Isolate:") # based on active color only sub.operator("gpencil.palettecolor_isolate", icon='LOCKED', text="").affect_visibility = False sub.operator("gpencil.palettecolor_isolate", icon='RESTRICT_VIEW_OFF', text="").affect_visibility = True + sub = row.row(align=True) + sub.label(text="Lock:") # based on other stuff... sub.operator("gpencil.stroke_lock_color", icon='BORDER_RECT', text="") sub.operator("gpencil.palette_lock_layer", icon='COLOR', text="") @@ -967,9 +994,7 @@ class GreasePencilPaletteColorPanel: if pcolor: self.draw_palettecolors(layout, pcolor) - # ---------------------------------------------- # Draw palette colors - # ---------------------------------------------- def draw_palettecolors(self, layout, pcolor): # color settings split = layout.split(percentage=0.5) @@ -1002,6 +1027,7 @@ class GreasePencilPaletteColorPanel: class GreasePencilToolsPanel: + # For use in "2D" Editors without their own toolbar # subclass must set # bl_space_type = 'IMAGE_EDITOR' # bl_options = {'DEFAULT_CLOSED'} @@ -1031,4 +1057,8 @@ class GreasePencilToolsPanel: layout.separator() layout.separator() + gpencil_active_brush_settings_simple(context, layout) + + layout.separator() + gpencil_stroke_placement_settings(context, layout) diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 794ef5189d6..152d4e96d5d 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -345,7 +345,9 @@ class RENDER_PT_stamp(RenderButtonsPanel, Panel): layout.prop(rd, "use_stamp") col = layout.column() col.active = rd.use_stamp - col.prop(rd, "stamp_font_size", text="Font Size") + row = col.row() + row.prop(rd, "stamp_font_size", text="Font Size") + row.prop(rd, "use_stamp_labels", text="Draw labels") row = col.row() row.column().prop(rd, "stamp_foreground", slider=True) diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index b9cb7f24ebd..1748d1d3738 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -411,6 +411,20 @@ class VIEW3D_MT_uv_map(Menu): layout.operator("uv.reset") +class VIEW3D_MT_edit_proportional(Menu): + bl_label = "Proportional Editing" + + def draw(self, context): + layout = self.layout + + layout.props_enum(context.tool_settings, "proportional_edit") + + layout.separator() + + layout.label("Falloff:") + layout.props_enum(context.tool_settings, "proportional_edit_falloff") + + # ********** View menus ********** @@ -2311,8 +2325,7 @@ class VIEW3D_MT_edit_mesh(Menu): layout.separator() layout.prop(toolsettings, "use_mesh_automerge") - layout.prop_menu_enum(toolsettings, "proportional_edit") - layout.prop_menu_enum(toolsettings, "proportional_edit_falloff") + layout.menu("VIEW3D_MT_edit_proportional") layout.separator() @@ -2427,6 +2440,8 @@ class VIEW3D_MT_edit_mesh_vertices(Menu): layout = self.layout layout.operator_context = 'INVOKE_REGION_WIN' + with_bullet = bpy.app.build_options.bullet + layout.operator("mesh.merge") layout.operator("mesh.rip_move") layout.operator("mesh.rip_move_fill") @@ -2447,7 +2462,8 @@ class VIEW3D_MT_edit_mesh_vertices(Menu): layout.separator() layout.operator("mesh.bevel").vertex_only = True - layout.operator("mesh.convex_hull") + if with_bullet: + layout.operator("mesh.convex_hull") layout.operator("mesh.vertices_smooth") layout.operator("mesh.remove_doubles") @@ -2681,8 +2697,7 @@ def draw_curve(self, context): layout.separator() - layout.prop_menu_enum(toolsettings, "proportional_edit") - layout.prop_menu_enum(toolsettings, "proportional_edit_falloff") + layout.menu("VIEW3D_MT_edit_proportional") layout.separator() @@ -2841,8 +2856,7 @@ class VIEW3D_MT_edit_meta(Menu): layout.separator() - layout.prop_menu_enum(toolsettings, "proportional_edit") - layout.prop_menu_enum(toolsettings, "proportional_edit_falloff") + layout.menu("VIEW3D_MT_edit_proportional") layout.separator() @@ -2879,8 +2893,7 @@ class VIEW3D_MT_edit_lattice(Menu): layout.separator() - layout.prop_menu_enum(toolsettings, "proportional_edit") - layout.prop_menu_enum(toolsettings, "proportional_edit_falloff") + layout.menu("VIEW3D_MT_edit_proportional") class VIEW3D_MT_edit_armature(Menu): @@ -3040,8 +3053,7 @@ class VIEW3D_MT_edit_gpencil(Menu): layout.separator() - layout.prop_menu_enum(toolsettings, "proportional_edit") - layout.prop_menu_enum(toolsettings, "proportional_edit_falloff") + layout.menu("VIEW3D_MT_edit_proportional") layout.separator() |