diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-23 08:04:03 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-23 08:04:03 +0300 |
commit | 9282d305bdc56522543129436db1e8a5d19cf39f (patch) | |
tree | b6d0cdcc7dd3f4113cf9e4f9813c40f44d29746e /release/scripts/startup/bl_ui | |
parent | de724a258eda45d1fed2b2176006c3b2df8abea2 (diff) | |
parent | 646a96bf8edc211a06f3df652101c265ee166e8d (diff) |
Merge branch 'master' into texture_nodes_refactortexture_nodes_refactor
Conflicts:
source/blender/nodes/texture/nodes/node_texture_math.c
Diffstat (limited to 'release/scripts/startup/bl_ui')
24 files changed, 674 insertions, 78 deletions
diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py index 6b72ef12dcc..6174dd95f2a 100644 --- a/release/scripts/startup/bl_ui/__init__.py +++ b/release/scripts/startup/bl_ui/__init__.py @@ -99,10 +99,10 @@ def register(): def addon_filter_items(self, context): import addon_utils - items = [('All', "All", "All Addons"), - ('User', "User", "All Addons Installed by User"), - ('Enabled', "Enabled", "All Enabled Addons"), - ('Disabled', "Disabled", "All Disabled Addons"), + items = [('All', "All", "All Add-ons"), + ('User', "User", "All Add-ons Installed by User"), + ('Enabled', "Enabled", "All Enabled Add-ons"), + ('Disabled', "Disabled", "All Disabled Add-ons"), ] items_unique = set() diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py index c6823f17153..6a8f9c586ed 100644 --- a/release/scripts/startup/bl_ui/properties_data_armature.py +++ b/release/scripts/startup/bl_ui/properties_data_armature.py @@ -144,6 +144,7 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel): if group.color_set: col = split.column() sub = col.row(align=True) + sub.enabled = group.is_custom_color_set # only custom colors are editable sub.prop(group.colors, "normal", text="") sub.prop(group.colors, "select", text="") sub.prop(group.colors, "active", text="") diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index 909c6ab0b56..7178e176c3b 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -29,7 +29,7 @@ class MESH_MT_vertex_group_specials(Menu): def draw(self, context): layout = self.layout - layout.operator("object.vertex_group_sort", icon='SORTALPHA').sort_type = "NAME" + layout.operator("object.vertex_group_sort", icon='SORTALPHA', text="Sort by Name").sort_type = "NAME" layout.operator("object.vertex_group_sort", icon='ARMATURE_DATA', text="Sort by Bone Hierarchy").sort_type = "BONE_HIERARCHY" layout.operator("object.vertex_group_copy", icon='COPY_ID') layout.operator("object.vertex_group_copy_to_linked", icon='LINK_AREA') @@ -58,6 +58,8 @@ class MESH_MT_shape_key_specials(Menu): layout.operator("object.shape_key_mirror", text="Mirror Shape Key (Topology)", icon='ARROW_LEFTRIGHT').use_topology = True layout.operator("object.shape_key_add", icon='ZOOMIN', text="New Shape From Mix").from_mix = True layout.operator("object.shape_key_remove", icon='X', text="Delete All Shapes").all = True + layout.operator("object.shape_key_move", icon='TRIA_UP_BAR', text="Move To Top").type = 'TOP' + layout.operator("object.shape_key_move", icon='TRIA_DOWN_BAR', text="Move To Bottom").type = 'BOTTOM' class MESH_UL_vgroups(UIList): diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index efc430db50f..7a969963911 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -962,7 +962,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col = split.column() col.template_ID(md, "texture", new="texture.new") layout.prop(md, "texture_coords") - if md.texture_coords == 'MAP_UV' and ob.type == 'MESH': + if md.texture_coords == 'UV' and ob.type == 'MESH': layout.prop_search(md, "uv_layer", ob.data, "uv_textures") elif md.texture_coords == 'OBJECT': layout.prop(md, "texture_coords_object") diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py index 6abd6f448f5..606842db01d 100644 --- a/release/scripts/startup/bl_ui/properties_freestyle.py +++ b/release/scripts/startup/bl_ui/properties_freestyle.py @@ -39,7 +39,7 @@ class RenderFreestyleButtonsPanel(): class RENDER_PT_freestyle(RenderFreestyleButtonsPanel, Panel): bl_label = "Freestyle" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'CYCLES'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_header(self, context): rd = context.scene.render @@ -111,7 +111,7 @@ class RENDER_MT_lineset_specials(Menu): class RENDERLAYER_PT_freestyle(RenderLayerFreestyleButtonsPanel, Panel): bl_label = "Freestyle" - COMPAT_ENGINES = {'BLENDER_RENDER', 'CYCLES'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -167,7 +167,7 @@ class RENDERLAYER_PT_freestyle(RenderLayerFreestyleButtonsPanel, Panel): class RENDERLAYER_PT_freestyle_lineset(RenderLayerFreestyleEditorButtonsPanel, Panel): bl_label = "Freestyle Line Set" - COMPAT_ENGINES = {'BLENDER_RENDER', 'CYCLES'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_edge_type_buttons(self, box, lineset, edge_type): # property names @@ -259,7 +259,7 @@ class RENDERLAYER_PT_freestyle_lineset(RenderLayerFreestyleEditorButtonsPanel, P class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel, Panel): bl_label = "Freestyle Line Style" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'CYCLES'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_modifier_box_header(self, box, modifier): row = box.row() @@ -719,7 +719,7 @@ class MaterialFreestyleButtonsPanel(): class MATERIAL_PT_freestyle_line(MaterialFreestyleButtonsPanel, Panel): bl_label = "Freestyle Line" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'CYCLES'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout 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 4789d119192..82f18a15469 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -19,11 +19,34 @@ # <pep8 compliant> -class GreasePencilPanel(): +from bpy.types import Menu, UIList + + +def gpencil_stroke_placement_settings(context, layout, gpd): + col = layout.column(align=True) + + col.label(text="Stroke Placement:") + + row = col.row(align=True) + row.prop_enum(gpd, "draw_mode", 'VIEW') + row.prop_enum(gpd, "draw_mode", 'CURSOR') + + if context.space_data.type == 'VIEW_3D': + row = col.row(align=True) + row.prop_enum(gpd, "draw_mode", 'SURFACE') + row.prop_enum(gpd, "draw_mode", 'STROKE') + + row = col.row(align=False) + row.active = gpd.draw_mode in {'SURFACE', 'STROKE'} + row.prop(gpd, "use_stroke_endpoints") + + +class GreasePencilDrawingToolsPanel(): # subclass must set # bl_space_type = 'IMAGE_EDITOR' - # bl_region_type = 'TOOLS' bl_label = "Grease Pencil" + bl_category = "Grease Pencil" + bl_region_type = 'TOOLS' @staticmethod def draw(self, context): @@ -31,19 +54,421 @@ class GreasePencilPanel(): col = layout.column(align=True) + col.label(text="Draw:") row = col.row(align=True) row.operator("gpencil.draw", text="Draw").mode = 'DRAW' - row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT' + row.operator("gpencil.draw", text="Erase").mode = 'ERASER' row = col.row(align=True) + row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT' row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY' - row.operator("gpencil.draw", text="Erase").mode = 'ERASER' row = col.row(align=True) - row.prop(context.tool_settings, "use_grease_pencil_sessions") + row.prop(context.tool_settings, "use_grease_pencil_sessions", text="Continuous Drawing") + + if context.space_data.type in {'VIEW_3D', 'CLIP_EDITOR'}: + col.separator() + col.label("Data Source:") + row = col.row(align=True) + if context.space_data.type == 'VIEW_3D': + row.prop(context.tool_settings, "grease_pencil_source", expand=True) + elif context.space_data.type == 'CLIP_EDITOR': + row.prop(context.space_data, "grease_pencil_source", expand=True) + + gpd = context.gpencil_data + if gpd: + col.separator() + gpencil_stroke_placement_settings(context, col, gpd) if context.space_data.type == 'VIEW_3D': col.separator() + col.separator() - col.label(text="Measure:") + col.label(text="Tools:") + col.operator("gpencil.convert", text="Convert...") col.operator("view3d.ruler") + + +class GreasePencilStrokeEditPanel(): + # subclass must set + # bl_space_type = 'IMAGE_EDITOR' + bl_label = "Edit Strokes" + bl_category = "Grease Pencil" + bl_region_type = 'TOOLS' + + @classmethod + def poll(cls, context): + return (context.gpencil_data is not None) + + @staticmethod + def draw(self, context): + layout = self.layout + + gpd = context.gpencil_data + edit_ok = bool(context.editable_gpencil_strokes) and bool(gpd.use_stroke_edit_mode) + + col = layout.column(align=True) + col.prop(gpd, "use_stroke_edit_mode", text="Enable Editing", icon='EDIT', toggle=True) + + col.separator() + + col.label(text="Select:") + subcol = col.column(align=True) + subcol.active = edit_ok + subcol.operator("gpencil.select_all", text="Select All") + subcol.operator("gpencil.select_border") + subcol.operator("gpencil.select_circle") + + col.separator() + + subcol = col.column(align=True) + subcol.active = edit_ok + subcol.operator("gpencil.select_linked") + subcol.operator("gpencil.select_more") + subcol.operator("gpencil.select_less") + + col.separator() + + col.label(text="Edit:") + subcol = col.column(align=True) + subcol.active = edit_ok + subcol.operator("gpencil.delete", text="Delete") + subcol.operator("gpencil.duplicate_move", text="Duplicate") + subcol.operator("transform.mirror", text="Mirror").gpencil_strokes = True + + col.separator() + + subcol = col.column(align=True) + subcol.active = edit_ok + subcol.operator("transform.translate").gpencil_strokes = True # icon='MAN_TRANS' + subcol.operator("transform.rotate").gpencil_strokes = True # icon='MAN_ROT' + subcol.operator("transform.resize", text="Scale").gpencil_strokes = True # icon='MAN_SCALE' + + col.separator() + + subcol = col.column(align=True) + subcol.active = edit_ok + subcol.operator("transform.bend", text="Bend").gpencil_strokes = True + subcol.operator("transform.shear", text="Shear").gpencil_strokes = True + subcol.operator("transform.tosphere", text="To Sphere").gpencil_strokes = True + + +############################### + +class GPENCIL_PIE_tool_palette(Menu): + """A pie menu for quick access to Grease Pencil tools""" + bl_label = "Grease Pencil Tools" + + def draw(self, context): + layout = self.layout + + pie = layout.menu_pie() + gpd = context.gpencil_data + + # W - Drawing Types + col = pie.column() + col.operator("gpencil.draw", text="Draw", icon='GREASEPENCIL').mode = 'DRAW' + col.operator("gpencil.draw", text="Straight Lines", icon='LINE_DATA').mode = 'DRAW_STRAIGHT' + col.operator("gpencil.draw", text="Poly", icon='MESH_DATA').mode = 'DRAW_POLY' + + # E - Eraser + # XXX: needs a dedicated icon... + col = pie.column() + col.operator("gpencil.draw", text="Eraser", icon='FORCE_CURVE').mode = 'ERASER' + + # E - "Settings" Palette is included here too, since it needs to be in a stable position... + if gpd and gpd.layers.active: + col.separator() + col.operator("wm.call_menu_pie", text="Settings...", icon='SCRIPTWIN').name = "GPENCIL_PIE_settings_palette" + + # Editing tools + if gpd: + if gpd.use_stroke_edit_mode and context.editable_gpencil_strokes: + # S - Exit Edit Mode + pie.prop(gpd, "use_stroke_edit_mode", text="Exit Edit Mode", icon='EDIT') + + # N - Transforms + col = pie.column() + row = col.row(align=True) + row.operator("transform.translate", icon='MAN_TRANS').gpencil_strokes = True + row.operator("transform.rotate", icon='MAN_ROT').gpencil_strokes = True + row.operator("transform.resize", text="Scale", icon='MAN_SCALE').gpencil_strokes = True + row = col.row(align=True) + row.label("Proportional Edit:") + row.prop(context.tool_settings, "proportional_edit", text="", icon_only=True) + row.prop(context.tool_settings, "proportional_edit_falloff", text="", icon_only=True) + + # NW - Select (Non-Modal) + col = pie.column() + col.operator("gpencil.select_all", text="Select All", icon='PARTICLE_POINT') + col.operator("gpencil.select_all", text="Select Inverse", icon='BLANK1') + col.operator("gpencil.select_linked", text="Select Linked", icon='LINKED') + + # NE - Select (Modal) + col = pie.column() + col.operator("gpencil.select_border", text="Border Select", icon='BORDER_RECT') + col.operator("gpencil.select_circle", text="Circle Select", icon='META_EMPTY') + col.operator("gpencil.select_lasso", text="Lasso Select", icon='BORDER_LASSO') + + # SW - Edit Tools + col = pie.column() + col.operator("gpencil.duplicate_move", icon='PARTICLE_PATH', text="Duplicate") + col.operator("gpencil.delete", icon='X', text="Delete...") + + # SE - More Tools + pie.operator("wm.call_menu_pie", text="More...").name = "GPENCIL_PIE_tools_more" + else: + # Toggle Edit Mode + pie.prop(gpd, "use_stroke_edit_mode", text="Enable Stroke Editing", icon='EDIT') + + +class GPENCIL_PIE_settings_palette(Menu): + """A pie menu for quick access to Grease Pencil settings""" + bl_label = "Grease Pencil Settings" + + @classmethod + def poll(cls, context): + return bool(context.gpencil_data and context.active_gpencil_layer) + + def draw(self, context): + layout = self.layout + + pie = layout.menu_pie() + # gpd = context.gpencil_data + gpl = context.active_gpencil_layer + + # W - Stroke draw settings + col = pie.column(align=True) + col.label(text="Stroke") + col.prop(gpl, "color", text="") + col.prop(gpl, "alpha", text="", slider=True) + + # E - Fill draw settings + col = pie.column(align=True) + col.label(text="Fill") + col.prop(gpl, "fill_color", text="") + col.prop(gpl, "fill_alpha", text="", slider=True) + + # S - Layer settings + col = pie.column() + col.prop(gpl, "line_width", slider=True) + # col.prop(gpl, "use_volumetric_strokes") + col.prop(gpl, "use_onion_skinning") + + # N - Active Layer + # XXX: this should show an operator to change the active layer instead + col = pie.column() + col.label("Active Layer: ") + col.prop(gpl, "info", text="") + # col.prop(gpd, "layers") + row = col.row() + row.prop(gpl, "lock") + row.prop(gpl, "hide") + + +class GPENCIL_PIE_tools_more(Menu): + """A pie menu for accessing more Grease Pencil tools""" + bl_label = "More Grease Pencil Tools" + + @classmethod + def poll(cls, context): + gpd = context.gpencil_data + return bool(gpd and gpd.use_stroke_edit_mode and context.editable_gpencil_strokes) + + def draw(self, context): + layout = self.layout + + pie = layout.menu_pie() + # gpd = context.gpencil_data + + pie.operator("gpencil.select_more", icon='ZOOMIN') + pie.operator("gpencil.select_less", icon='ZOOMOUT') + + pie.operator("transform.mirror", icon='MOD_MIRROR').gpencil_strokes = True + pie.operator("transform.bend", icon='MOD_SIMPLEDEFORM').gpencil_strokes = True + pie.operator("transform.shear", icon='MOD_TRIANGULATE').gpencil_strokes = True + pie.operator("transform.tosphere", icon='MOD_MULTIRES').gpencil_strokes = True + + pie.operator("gpencil.convert", icon='OUTLINER_OB_CURVE') + pie.operator("wm.call_menu_pie", text="Back to Main Palette...").name = "GPENCIL_PIE_tool_palette" + + +class GPENCIL_UL_layer(UIList): + def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): + # assert(isinstance(item, bpy.types.GPencilLayer) + gpl = item + + if self.layout_type in {'DEFAULT', 'COMPACT'}: + if gpl.lock: + layout.active = False + + split = layout.split(percentage=0.2) + split.prop(gpl, "color", text="") + split.prop(gpl, "info", text="", emboss=False) + + row = layout.row(align=True) + row.prop(gpl, "lock", text="", emboss=False) + row.prop(gpl, "hide", text="", emboss=False) + elif self.layout_type in {'GRID'}: + layout.alignment = 'CENTER' + layout.label(text="", icon_value=icon) + + +class GreasePencilDataPanel(): + # subclass must set + # bl_space_type = 'IMAGE_EDITOR' + bl_label = "Grease Pencil" + bl_region_type = 'UI' + + @staticmethod + def draw_header(self, context): + self.layout.prop(context.space_data, "show_grease_pencil", text="") + + @staticmethod + def draw(self, context): + layout = self.layout + + # owner of Grease Pencil data + gpd_owner = context.gpencil_data_owner + gpd = context.gpencil_data + + # Owner Selector + if context.space_data.type == 'VIEW_3D': + layout.prop(context.tool_settings, "grease_pencil_source", expand=True) + elif context.space_data.type == 'CLIP_EDITOR': + layout.prop(context.space_data, "grease_pencil_source", expand=True) + + # Grease Pencil data selector + layout.template_ID(gpd_owner, "grease_pencil", new="gpencil.data_add", unlink="gpencil.data_unlink") + + # Grease Pencil data... + if gpd: + self.draw_layers(context, layout, gpd) + + def draw_layers(self, context, layout, gpd): + row = layout.row() + + col = row.column() + col.template_list("GPENCIL_UL_layer", "", gpd, "layers", gpd.layers, "active_index", rows=5) + + col = row.column() + + sub = col.column(align=True) + sub.operator("gpencil.layer_add", icon='ZOOMIN', text="") + sub.operator("gpencil.layer_remove", icon='ZOOMOUT', text="") + + gpl = context.active_gpencil_layer + if gpl: + col.separator() + + sub = col.column(align=True) + sub.operator("gpencil.layer_move", icon='TRIA_UP', text="").type = 'UP' + sub.operator("gpencil.layer_move", icon='TRIA_DOWN', text="").type = 'DOWN' + + if gpl: + self.draw_layer(layout, gpl) + + def draw_layer(self, layout, gpl): + # layer settings + split = layout.split(percentage=0.5) + split.active = not gpl.lock + + # Column 1 - Stroke + col = split.column(align=True) + col.label(text="Stroke:") + col.prop(gpl, "color", text="") + col.prop(gpl, "alpha", slider=True) + + # Column 2 - Fill + col = split.column(align=True) + col.label(text="Fill:") + col.prop(gpl, "fill_color", text="") + col.prop(gpl, "fill_alpha", text="Opacity", slider=True) + + # Options + split = layout.split(percentage=0.5) + split.active = not gpl.lock + + col = split.column(align=True) + col.prop(gpl, "line_width", slider=True) + col.prop(gpl, "use_volumetric_strokes") + + col = split.column(align=True) + col.prop(gpl, "show_x_ray") + + # if debug: + # layout.prop(gpl, "show_points") + + layout.separator() + + # Full-Row - Frame Locking (and Delete Frame) + row = layout.row(align=True) + 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) + else: + lock_label = "Lock Frame" + row.prop(gpl, "lock_frame", text=lock_label, icon='UNLOCKED') + row.operator("gpencil.active_frame_delete", text="", icon='X') + + layout.separator() + + # Onion skinning + col = layout.column(align=True) + col.active = not gpl.lock + + row = col.row() + row.prop(gpl, "use_onion_skinning") + row.prop(gpl, "use_ghost_custom_colors", text="", icon='COLOR') + + split = col.split(percentage=0.5) + split.active = gpl.use_onion_skinning + + # - Before Frames + sub = split.column(align=True) + row = sub.row(align=True) + row.active = gpl.use_ghost_custom_colors + row.prop(gpl, "before_color", text="") + sub.prop(gpl, "ghost_before_range", text="Before") + + # - After Frames + sub = split.column(align=True) + row = sub.row(align=True) + row.active = gpl.use_ghost_custom_colors + row.prop(gpl, "after_color", text="") + sub.prop(gpl, "ghost_after_range", text="After") + + +class GreasePencilToolsPanel(): + # subclass must set + # bl_space_type = 'IMAGE_EDITOR' + # bl_options = {'DEFAULT_CLOSED'} + bl_label = "Grease Pencil Settings" + bl_region_type = 'UI' + + @classmethod + def poll(cls, context): + return (context.gpencil_data is not None) + + @staticmethod + def draw(self, context): + layout = self.layout + + # gpd_owner = context.gpencil_data_owner + gpd = context.gpencil_data + + layout.prop(gpd, "use_stroke_edit_mode", text="Enable Editing", icon='EDIT', toggle=True) + + layout.separator() + + layout.label("Proportional Edit:") + row = layout.row() + row.prop(context.tool_settings, "proportional_edit", text="") + row.prop(context.tool_settings, "proportional_edit_falloff", text="") + + layout.separator() + layout.separator() + + gpencil_stroke_placement_settings(context, layout, gpd) diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index faf0d4cb0e8..e491d3a7761 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -227,7 +227,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel): class TEXTURE_PT_preview(TextureButtonsPanel, Panel): bl_label = "Preview" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'CYCLES'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py index 0b6ce41eb5d..39a8986a20c 100644 --- a/release/scripts/startup/bl_ui/properties_world.py +++ b/release/scripts/startup/bl_ui/properties_world.py @@ -59,7 +59,7 @@ class WORLD_PT_context_world(WorldButtonsPanel, Panel): elif world: split.template_ID(space, "pin_id") - if texture_count and rd.engine != 'CYCLES': + if texture_count: split.label(text=str(texture_count), icon='TEXTURE') diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 3382633af60..d2f2612c84e 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -21,7 +21,11 @@ import bpy from bpy.types import Panel, Header, Menu, UIList from bpy.app.translations import pgettext_iface as iface_ -from bl_ui.properties_grease_pencil_common import GreasePencilPanel +from bl_ui.properties_grease_pencil_common import ( + GreasePencilDrawingToolsPanel, + GreasePencilStrokeEditPanel, + GreasePencilDataPanel + ) class CLIP_UL_tracking_objects(UIList): @@ -422,7 +426,9 @@ class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel): col = layout.column() row = col.row() row.prop(settings, "use_tripod_solver", text="Tripod") - row.prop(settings, "use_keyframe_selection", text="Keyframe") + sub = row.row() + sub.active = not settings.use_tripod_solver + sub.prop(settings, "use_keyframe_selection", text="Keyframe") col = layout.column(align=True) col.active = (not settings.use_tripod_solver and @@ -1050,12 +1056,6 @@ class CLIP_PT_tools_mask(MASK_PT_tools, Panel): # --- end mask --- -class CLIP_PT_tools_grease_pencil(GreasePencilPanel, Panel): - bl_space_type = 'CLIP_EDITOR' - bl_region_type = 'TOOLS' - bl_category = "Grease Pencil" - - class CLIP_PT_footage(CLIP_PT_clip_view_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' @@ -1110,6 +1110,26 @@ class CLIP_PT_tools_scenesetup(Panel): layout.operator("clip.setup_tracking_scene") +# Grease Pencil properties +class CLIP_PT_grease_pencil(GreasePencilDataPanel, CLIP_PT_clip_view_panel, Panel): + bl_space_type = 'CLIP_EDITOR' + bl_region_type = 'UI' + bl_options = {'DEFAULT_CLOSED'} + + # NOTE: this is just a wrapper around the generic GP Panel + # But, this should only be visible in "clip" view + + +# Grease Pencil drawing tools +class CLIP_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel): + bl_space_type = 'CLIP_EDITOR' + + +# Grease Pencil stroke editing tools +class CLIP_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel): + bl_space_type = 'CLIP_EDITOR' + + class CLIP_MT_view(Menu): bl_label = "View" @@ -1152,7 +1172,8 @@ class CLIP_MT_view(Menu): layout.separator() layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") + layout.operator("screen.screen_full_area", text="Toggle Maximize Area") + layout.operator("screen.screen_full_area").use_hide_panels = True class CLIP_MT_clip(Menu): diff --git a/release/scripts/startup/bl_ui/space_console.py b/release/scripts/startup/bl_ui/space_console.py index ec16cfd89be..327fb94cb95 100644 --- a/release/scripts/startup/bl_ui/space_console.py +++ b/release/scripts/startup/bl_ui/space_console.py @@ -70,7 +70,8 @@ class CONSOLE_MT_console(Menu): layout.separator() layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") + layout.operator("screen.screen_full_area", text="Toggle Maximize Area") + layout.operator("screen.screen_full_area").use_hide_panels = True class CONSOLE_MT_language(Menu): diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index eeb08916416..0458ffe3377 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -91,6 +91,8 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False): row.prop(dopesheet, "show_speakers", text="") if bpy.data.linestyles: row.prop(dopesheet, "show_linestyles", text="") + if bpy.data.grease_pencil: + row.prop(dopesheet, "show_gpencil", text="") ####################################### @@ -186,7 +188,8 @@ class DOPESHEET_MT_view(Menu): layout.separator() layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") + layout.operator("screen.screen_full_area", text="Toggle Maximize Area") + layout.operator("screen.screen_full_area").use_hide_panels = True class DOPESHEET_MT_select(Menu): @@ -364,14 +367,16 @@ class DOPESHEET_MT_gpencil_frame(Menu): layout = self.layout layout.menu("DOPESHEET_MT_key_transform", text="Transform") - - #layout.operator_menu_enum("action.snap", "type", text="Snap") - #layout.operator_menu_enum("action.mirror", "type", text="Mirror") + layout.operator_menu_enum("action.snap", "type", text="Snap") + layout.operator_menu_enum("action.mirror", "type", text="Mirror") layout.separator() layout.operator("action.duplicate") layout.operator("action.delete") + layout.separator() + layout.operator("action.keyframe_type") + #layout.separator() #layout.operator("action.copy") #layout.operator("action.paste") diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py index 3d39234ce08..5861bc0dc95 100644 --- a/release/scripts/startup/bl_ui/space_graph.py +++ b/release/scripts/startup/bl_ui/space_graph.py @@ -118,7 +118,8 @@ class GRAPH_MT_view(Menu): layout.separator() layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") + layout.operator("screen.screen_full_area", text="Toggle Maximize Area") + layout.operator("screen.screen_full_area").use_hide_panels = True class GRAPH_MT_select(Menu): @@ -188,10 +189,14 @@ class GRAPH_MT_channel(Menu): layout.separator() layout.operator("anim.channels_editable_toggle") - layout.operator("anim.channels_visibility_set") layout.operator_menu_enum("graph.extrapolation_type", "type", text="Extrapolation Mode") layout.separator() + layout.operator("graph.hide", text="Hide Selected Curves").unselected = False + layout.operator("graph.hide", text="Hide Unselected Curves").unselected = True + layout.operator("graph.reveal") + + layout.separator() layout.operator("anim.channels_expand") layout.operator("anim.channels_collapse") diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 0b97a2dda28..a1da262d9f2 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -25,7 +25,11 @@ from bl_ui.properties_paint_common import ( brush_texpaint_common, brush_mask_texture_settings, ) -from bl_ui.properties_grease_pencil_common import GreasePencilPanel +from bl_ui.properties_grease_pencil_common import ( + GreasePencilDrawingToolsPanel, + GreasePencilStrokeEditPanel, + GreasePencilDataPanel + ) from bpy.app.translations import pgettext_iface as iface_ @@ -82,6 +86,7 @@ class IMAGE_MT_view(Menu): layout.prop(uv, "show_other_objects") if paint.brush and (context.image_paint_object or sima.mode == 'PAINT'): layout.prop(uv, "show_texpaint") + layout.prop(toolsettings, "show_uv_local_view", text="Show same material") layout.separator() @@ -110,7 +115,8 @@ class IMAGE_MT_view(Menu): layout.separator() layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") + layout.operator("screen.screen_full_area", text="Toggle Maximize Area") + layout.operator("screen.screen_full_area").use_hide_panels = True class IMAGE_MT_select(Menu): @@ -1147,10 +1153,21 @@ class IMAGE_PT_scope_sample(Panel): sub.prop(sima.scopes, "accuracy") -class IMAGE_PT_tools_grease_pencil(GreasePencilPanel, Panel): +# Grease Pencil properties +class IMAGE_PT_grease_pencil(GreasePencilDataPanel, Panel): + bl_space_type = 'IMAGE_EDITOR' + bl_region_type = 'UI' + + # NOTE: this is just a wrapper around the generic GP Panel + +# Grease Pencil drawing tools +class IMAGE_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel): + bl_space_type = 'IMAGE_EDITOR' + + +# Grease Pencil stroke editing tools +class IMAGE_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel): bl_space_type = 'IMAGE_EDITOR' - bl_region_type = 'TOOLS' - bl_category = "Grease Pencil" if __name__ == "__main__": # only for live edit. diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py index 67b2bbe1905..2b075128fef 100644 --- a/release/scripts/startup/bl_ui/space_info.py +++ b/release/scripts/startup/bl_ui/space_info.py @@ -57,12 +57,15 @@ class INFO_HT_header(Header): row = layout.row(align=True) if bpy.app.autoexec_fail is True and bpy.app.autoexec_fail_quiet is False: - row.label("Auto-run disabled: %s" % bpy.app.autoexec_fail_message, icon='ERROR') + row.label("Auto-run disabled", icon='ERROR') if bpy.data.is_saved: props = row.operator("wm.revert_mainfile", icon='SCREEN_BACK', text="Reload Trusted") props.use_scripts = True row.operator("script.autoexec_warn_clear", text="Ignore") + + # include last so text doesn't push buttons out of the header + row.label(bpy.app.autoexec_fail_message) return row.operator("wm.splash", text="", icon='BLENDER', emboss=False) @@ -276,7 +279,7 @@ class INFO_MT_help(Menu): def draw(self, context): layout = self.layout - layout.operator("wm.url_open", text="Manual", icon='HELP').url = "http://wiki.blender.org/index.php/Doc:2.6/Manual" + layout.operator("wm.url_open", text="Manual", icon='HELP').url = "http://www.blender.org/manual" layout.operator("wm.url_open", text="Release Log", icon='URL').url = "http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/%d.%d" % bpy.app.version[:2] layout.separator() diff --git a/release/scripts/startup/bl_ui/space_logic.py b/release/scripts/startup/bl_ui/space_logic.py index 9792a26d224..16182da1018 100644 --- a/release/scripts/startup/bl_ui/space_logic.py +++ b/release/scripts/startup/bl_ui/space_logic.py @@ -120,7 +120,8 @@ class LOGIC_MT_view(Menu): layout.separator() layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") + layout.operator("screen.screen_full_area", text="Toggle Maximize Area") + layout.operator("screen.screen_full_area").use_hide_panels = True if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py index 7634620cf0d..b748e904f31 100644 --- a/release/scripts/startup/bl_ui/space_nla.py +++ b/release/scripts/startup/bl_ui/space_nla.py @@ -89,7 +89,8 @@ class NLA_MT_view(Menu): layout.separator() layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") + layout.operator("screen.screen_full_area", text="Toggle Maximize Area") + layout.operator("screen.screen_full_area").use_hide_panels = True class NLA_MT_select(Menu): diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 24e8d2e4a53..4cc72f1dc4b 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -19,6 +19,12 @@ # <pep8 compliant> import bpy from bpy.types import Header, Menu, Panel +from bl_ui.properties_grease_pencil_common import ( + GreasePencilDrawingToolsPanel, + GreasePencilStrokeEditPanel, + GreasePencilDataPanel, + GreasePencilToolsPanel, + ) class NODE_HT_header(Header): @@ -180,7 +186,8 @@ class NODE_MT_view(Menu): layout.separator() layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") + layout.operator("screen.screen_full_area", text="Toggle Maximize Area") + layout.operator("screen.screen_full_area").use_hide_panels = True class NODE_MT_select(Menu): @@ -438,6 +445,45 @@ class NODE_UL_interface_sockets(bpy.types.UIList): layout.template_node_socket(color) +# Grease Pencil properties +class NODE_PT_grease_pencil(GreasePencilDataPanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'UI' + + # NOTE: this is just a wrapper around the generic GP Panel + + @classmethod + def poll(cls, context): + snode = context.space_data + return snode is not None and snode.node_tree is not None + + +class NODE_PT_grease_pencil_tools(GreasePencilToolsPanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'UI' + bl_options = {'DEFAULT_CLOSED'} + + # NOTE: this is just a wrapper around the generic GP tools panel + # It contains access to some essential tools usually found only in + # toolbar, but which may not necessarily be open + + +# Tool Shelf ------------------ + + +# Grease Pencil drawing tools +class NODE_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'TOOLS' + + +# Grease Pencil stroke editing tools +class NODE_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'TOOLS' + +# ----------------------------- + def node_draw_tree_view(layout, context): pass diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index 01165bf2889..7b508c067e1 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -96,7 +96,8 @@ class OUTLINER_MT_view(Menu): layout.separator() layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") + layout.operator("screen.screen_full_area", text="Toggle Maximize Area") + layout.operator("screen.screen_full_area").use_hide_panels = True class OUTLINER_MT_search(Menu): diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index ce00d4eb8e7..f59d4e8d980 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -19,6 +19,7 @@ # <pep8 compliant> import bpy from bpy.types import Header, Menu, Panel +from bl_ui.properties_grease_pencil_common import GreasePencilDataPanel, GreasePencilToolsPanel from bpy.app.translations import pgettext_iface as iface_ @@ -82,6 +83,7 @@ class SEQUENCER_HT_header(Header): layout.separator() layout.operator("sequencer.refresh_all") + layout.prop(st, "show_backdrop") else: if st.view_type == 'SEQUENCER_PREVIEW': layout.separator() @@ -101,6 +103,17 @@ class SEQUENCER_HT_header(Header): row = layout.row() row.prop(st, "overlay_type", text="") + if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: + gpd = context.gpencil_data + toolsettings = context.tool_settings + + # Proportional editing + if gpd and gpd.use_stroke_edit_mode: + row = layout.row(align=True) + row.prop(toolsettings, "proportional_edit", icon_only=True) + if toolsettings.proportional_edit != 'DISABLED': + row.prop(toolsettings, "proportional_edit_falloff", icon_only=True) + row = layout.row(align=True) row.operator("render.opengl", text="", icon='RENDER_STILL').sequencer = True props = row.operator("render.opengl", text="", icon='RENDER_ANIMATION') @@ -149,8 +162,10 @@ class SEQUENCER_MT_view(Menu): layout = self.layout st = context.space_data + is_preview = st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'} + is_sequencer_view = st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'} - if st.view_type in {'PREVIEW'}: + if st.view_type == 'PREVIEW': # Specifying the REGION_PREVIEW context is needed in preview-only # mode, else the lookup for the shortcut will fail in # wm_keymap_item_find_props() (see #32595). @@ -160,10 +175,10 @@ class SEQUENCER_MT_view(Menu): layout.separator() - if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}: + if is_sequencer_view: layout.operator("sequencer.view_all", text="View all Sequences") layout.operator("sequencer.view_selected") - if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: + if is_preview: layout.operator_context = 'INVOKE_REGION_PREVIEW' layout.operator("sequencer.view_all_preview", text="Fit preview in window") @@ -181,11 +196,14 @@ class SEQUENCER_MT_view(Menu): # # XXX, invokes in the header view # layout.operator("sequencer.view_ghost_border", text="Overlay Border") - if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}: + if is_sequencer_view: layout.prop(st, "show_seconds") layout.prop(st, "show_frame_indicator") + layout.prop(st, "show_strip_offset") - if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: + layout.prop_menu_enum(st, "waveform_draw_type") + + if is_preview: if st.display_mode == 'IMAGE': layout.prop(st, "show_safe_margin") elif st.display_mode == 'WAVEFORM': @@ -193,12 +211,13 @@ class SEQUENCER_MT_view(Menu): layout.separator() - if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}: + if is_sequencer_view: layout.prop(st, "use_marker_sync") layout.separator() layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") + layout.operator("screen.screen_full_area", text="Toggle Maximize Area") + layout.operator("screen.screen_full_area").use_hide_panels = True class SEQUENCER_MT_select(Menu): @@ -337,6 +356,7 @@ class SEQUENCER_MT_strip(Menu): layout.operator("sequencer.cut", text="Cut (hard) at frame").type = 'HARD' layout.operator("sequencer.cut", text="Cut (soft) at frame").type = 'SOFT' + layout.operator("sequencer.slip", text="Slip Strip Contents") layout.operator("sequencer.images_separate") layout.operator("sequencer.offset_clear") layout.operator("sequencer.deinterlace_selected_movies") @@ -714,6 +734,7 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel): def draw(self, context): layout = self.layout + st = context.space_data strip = act_strip(context) sound = strip.sound @@ -732,7 +753,9 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel): row.prop(sound, "use_memory_cache") - layout.prop(strip, "show_waveform") + if st.waveform_draw_type == 'DEFAULT_WAVEFORMS': + layout.prop(strip, "show_waveform") + layout.prop(strip, "volume") layout.prop(strip, "pitch") layout.prop(strip, "pan") @@ -774,6 +797,8 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel): layout.label(text="Camera Override") layout.template_ID(strip, "scene_camera") + layout.prop(strip, "use_grease_pencil", text="Show Grease Pencil") + if scene: layout.prop(scene, "audio_volume", text="Audio Volume") @@ -1010,5 +1035,22 @@ class SEQUENCER_PT_modifiers(SequencerButtonsPanel, Panel): col.prop(mod, "contrast") +class SEQUENCER_PT_grease_pencil(GreasePencilDataPanel, SequencerButtonsPanel_Output, Panel): + bl_space_type = 'SEQUENCE_EDITOR' + bl_region_type = 'UI' + + # NOTE: this is just a wrapper around the generic GP Panel + # But, it should only show up when there are images in the preview region + + +class SEQUENCER_PT_grease_pencil_tools(GreasePencilToolsPanel, SequencerButtonsPanel_Output, Panel): + bl_space_type = 'SEQUENCE_EDITOR' + bl_region_type = 'UI' + + # NOTE: this is just a wrapper around the generic GP tools panel + # It contains access to some essential tools usually found only in + # toolbar, which doesn't exist here... + + if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py index a430fb09165..5eb4e333130 100644 --- a/release/scripts/startup/bl_ui/space_text.py +++ b/release/scripts/startup/bl_ui/space_text.py @@ -181,7 +181,8 @@ class TEXT_MT_view(Menu): layout.separator() layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") + layout.operator("screen.screen_full_area", text="Toggle Maximize Area") + layout.operator("screen.screen_full_area").use_hide_panels = True class TEXT_MT_text(Menu): diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py index cfb147b3566..d23ee84d9d2 100644 --- a/release/scripts/startup/bl_ui/space_time.py +++ b/release/scripts/startup/bl_ui/space_time.py @@ -145,7 +145,8 @@ class TIME_MT_view(Menu): layout.separator() layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") + layout.operator("screen.screen_full_area", text="Toggle Maximize Area") + layout.operator("screen.screen_full_area").use_hide_panels = True class TIME_MT_cache(Menu): diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index a7ddec040a5..10394e50581 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -744,7 +744,7 @@ class USERPREF_PT_theme(Panel): col.separator() col.separator() - col.label("Menu Shadow:") + col.label("Styles:") row = col.row() @@ -762,11 +762,6 @@ class USERPREF_PT_theme(Panel): colsub = padding.column() colsub.row().prop(ui, "menu_shadow_width") - col.separator() - col.separator() - - col.label("Icons:") - row = col.row() subsplit = row.split(percentage=0.95) @@ -774,16 +769,14 @@ class USERPREF_PT_theme(Panel): padding = subsplit.split(percentage=0.15) colsub = padding.column() colsub = padding.column() - # Not working yet. - #~ colsub.active = False - #~ colsub.row().prop(ui, "icon_file") + colsub.row().prop(ui, "icon_alpha") subsplit = row.split(percentage=0.85) padding = subsplit.split(percentage=0.15) colsub = padding.column() colsub = padding.column() - colsub.row().prop(ui, "icon_alpha") + colsub.row().prop(ui, "widget_emboss") col.separator() col.separator() @@ -1167,7 +1160,7 @@ class USERPREF_MT_addons_dev_guides(Menu): class USERPREF_PT_addons(Panel): bl_space_type = 'USER_PREFERENCES' - bl_label = "Addons" + bl_label = "Add-ons" bl_region_type = 'WINDOW' bl_options = {'HIDE_HEADER'} diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index cbae63e1f9a..7f2ec53b8fb 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -19,6 +19,7 @@ # <pep8 compliant> import bpy from bpy.types import Header, Menu, Panel +from bl_ui.properties_grease_pencil_common import GreasePencilDataPanel from bl_ui.properties_paint_common import UnifiedPaintPanel from bpy.app.translations import contexts as i18n_contexts @@ -56,7 +57,12 @@ class VIEW3D_HT_header(Header): row.prop(view, "use_occlude_geometry", text="") # Proportional editing - if mode in {'EDIT', 'PARTICLE_EDIT'}: + if context.gpencil_data and context.gpencil_data.use_stroke_edit_mode: + row = layout.row(align=True) + row.prop(toolsettings, "proportional_edit", icon_only=True) + if toolsettings.proportional_edit != 'DISABLED': + row.prop(toolsettings, "proportional_edit_falloff", icon_only=True) + elif mode in {'EDIT', 'PARTICLE_EDIT'}: row = layout.row(align=True) row.prop(toolsettings, "proportional_edit", icon_only=True) if toolsettings.proportional_edit != 'DISABLED': @@ -66,6 +72,13 @@ class VIEW3D_HT_header(Header): row.prop(toolsettings, "use_proportional_edit_objects", icon_only=True) if toolsettings.use_proportional_edit_objects: row.prop(toolsettings, "proportional_edit_falloff", icon_only=True) + else: + # Proportional editing + if context.gpencil_data and context.gpencil_data.use_stroke_edit_mode: + row = layout.row(align=True) + row.prop(toolsettings, "proportional_edit", icon_only=True) + if toolsettings.proportional_edit != 'DISABLED': + row.prop(toolsettings, "proportional_edit_falloff", icon_only=True) # Snap if not obj or mode not in {'SCULPT', 'VERTEX_PAINT', 'WEIGHT_PAINT', 'TEXTURE_PAINT'}: @@ -421,7 +434,8 @@ class VIEW3D_MT_view(Menu): layout.operator("screen.area_dupli") layout.operator("screen.region_quadview") - layout.operator("screen.screen_full_area") + layout.operator("screen.screen_full_area", text="Toggle Maximize Area") + layout.operator("screen.screen_full_area").use_hide_panels = True class VIEW3D_MT_view_navigation(Menu): @@ -2307,6 +2321,8 @@ class VIEW3D_MT_edit_mesh_faces(Menu): layout.operator("mesh.faces_shade_smooth") layout.operator("mesh.faces_shade_flat") + layout.operator("mesh.normals_make_consistent", text="Recalculate Normals") + layout.separator() layout.operator("mesh.edge_rotate", text="Rotate Edge CW").use_ccw = False @@ -2700,6 +2716,12 @@ class VIEW3D_MT_edit_armature_roll(Menu): # ********** Panel ********** +class VIEW3D_PT_grease_pencil(GreasePencilDataPanel, Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'UI' + + # NOTE: this is just a wrapper around the generic GP Panel + class VIEW3D_PT_view3d_properties(Panel): bl_space_type = 'VIEW_3D' @@ -2810,6 +2832,7 @@ class VIEW3D_PT_view3d_display(Panel): col = layout.column() col.prop(view, "show_only_render") + col.prop(view, "show_world") col = layout.column() display_all = not view.show_only_render diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index da64caa7a30..b7fe9c69c1f 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -19,7 +19,10 @@ # <pep8 compliant> import bpy from bpy.types import Menu, Panel, UIList -from bl_ui.properties_grease_pencil_common import GreasePencilPanel +from bl_ui.properties_grease_pencil_common import ( + GreasePencilDrawingToolsPanel, + GreasePencilStrokeEditPanel + ) from bl_ui.properties_paint_common import ( UnifiedPaintPanel, brush_texture_settings, @@ -313,6 +316,7 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel): col.menu("VIEW3D_MT_edit_mesh_extrude") col.operator("view3d.edit_mesh_extrude_move_normal", text="Extrude Region") col.operator("view3d.edit_mesh_extrude_individual_move", text="Extrude Individual") + col.operator("mesh.edge_face_add") col.operator("mesh.subdivide") col.operator("mesh.loopcut_slide") col.operator("mesh.duplicate_move", text="Duplicate") @@ -793,8 +797,8 @@ class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel): if toolsettings.missing_uvs: col.separator() col.label("Missing UVs", icon='INFO') - col.label("Unwrap the mesh in edit mode or generate a simple UVs") - col.operator("mesh.uv_texture_add", text="Add Simple UVs") + col.label("Unwrap the mesh in edit mode or generate a simple UV layer") + col.operator("paint.add_simple_uvs") if toolsettings.mode == 'MATERIAL': if toolsettings.missing_materials: @@ -1058,7 +1062,7 @@ class TEXTURE_UL_texpaintslots(UIList): if self.layout_type in {'DEFAULT', 'COMPACT'}: layout.prop(item, "name", text="", emboss=False, icon_value=icon) - if (not mat.use_nodes) and (context.scene.render.engine == 'BLENDER_RENDER'): + if (not mat.use_nodes) and context.scene.render.engine in {'BLENDER_RENDER', 'BLENDER_GAME'}: mtex_index = mat.texture_paint_slots[index].index layout.prop(mat, "use_textures", text="", index=mtex_index) elif self.layout_type in {'GRID'}: @@ -1115,7 +1119,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel): mat, "texture_paint_images", mat, "paint_active_slot", rows=2) - if (not mat.use_nodes) and (context.scene.render.engine == 'BLENDER_RENDER'): + if (not mat.use_nodes) and context.scene.render.engine in {'BLENDER_RENDER', 'BLENDER_GAME'}: row = col.row(align=True) row.operator_menu_enum("paint.add_texture_paint_slot", "type") row.operator("paint.delete_texture_paint_slot", text="", icon='X') @@ -1804,11 +1808,14 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, Panel): sub.prop(pe, "fade_frames", slider=True) -# Grease Pencil tools -class VIEW3D_PT_tools_grease_pencil(GreasePencilPanel, Panel): +# Grease Pencil drawing tools +class VIEW3D_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel): + bl_space_type = 'VIEW_3D' + + +# Grease Pencil stroke editing tools +class VIEW3D_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel): bl_space_type = 'VIEW_3D' - bl_region_type = 'TOOLS' - bl_category = "Grease Pencil" # Note: moved here so that it's always in last position in 'Tools' panels! |