[Bf-blender-cvs] [84d2d4e75ed] greasepencil-object: Merge branch 'blender2.8' into greasepencil-object
Antonio Vazquez
noreply at git.blender.org
Wed Jun 13 08:43:49 CEST 2018
Commit: 84d2d4e75ed2c4555c04cae48b5534e984cb81a8
Author: Antonio Vazquez
Date: Wed Jun 13 08:40:46 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB84d2d4e75ed2c4555c04cae48b5534e984cb81a8
Merge branch 'blender2.8' into greasepencil-object
Conflicts:
release/scripts/startup/bl_ui/space_topbar.py
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/space_topbar.py
index 7a0083589ea,a88e8164436..62e0ae16326
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@@ -90,37 -90,6 +90,25 @@@ class TOPBAR_HT_lower_bar(Header)
self.draw_center(context)
def draw_left(self, context):
+ layout = self.layout
- layer = context.view_layer
- object = layer.objects.active
-
- # Object Mode
- # -----------
- object_mode = 'OBJECT' if object is None else object.mode
- act_mode_item = bpy.types.Object.bl_rna.properties['mode'].enum_items[object_mode]
-
- layout.operator_menu_enum("object.mode_set", "mode", text=act_mode_item.name, icon=act_mode_item.icon)
-
- layout.template_header_3D_mode()
-
- # graese pencil multiedit
++ # grease pencil multiedit
+ gpd = context.gpencil_data
+ if gpd and (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")
+
+ sub = row.row(align=True)
+ sub.active = gpd.use_multiedit
+ sub.popover(
+ space_type='TOPBAR',
+ region_type='HEADER',
+ panel_type="TOPBAR_PT_GreasePencilMultiFrame",
+ text="Multiframe"
+ )
+
+ def draw_center(self, context):
layout = self.layout
mode = context.mode
@@@ -159,15 -128,10 +147,18 @@@
pass
elif mode == 'PARTICLE':
layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".paint_common", category="")
+ elif mode == 'GPENCIL_PAINT':
+ layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".greasepencil_paint", category="")
+ elif mode == 'GPENCIL_EDIT':
+ layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".greasepencil_edit", category="")
+ elif mode == 'GPENCIL_SCULPT':
+ layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".greasepencil_sculpt", category="")
+ elif mode == 'GPENCIL_WEIGHT':
+ layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".greasepencil_weight", category="")
+ def draw_center(self, context):
+ pass
+
def draw_right(self, context):
layout = self.layout
@@@ -398,33 -269,7 +296,28 @@@ class TOPBAR_PT_snapping(Panel)
if 'VOLUME' in snap_elements:
col.prop(toolsettings, "use_snap_peel_object")
- # Auto-Merge Editing
- if obj:
- if (object_mode == 'EDIT' and obj.type == 'MESH'):
- col.prop(toolsettings, "use_mesh_automerge", icon='AUTOMERGE_ON')
-
+# Grease Pencil multiframe falloff tools
+class TOPBAR_PT_GreasePencilMultiFrame(Panel):
+ bl_space_type = 'TOPBAR'
+ bl_region_type = 'HEADER'
+ bl_label = "Multi Frame"
+
+ @staticmethod
+ def draw(self, context):
+ gpd = context.gpencil_data
+ settings = context.tool_settings.gpencil_sculpt
+
+ layout = self.layout
+ col = layout.column(align=True)
+ col.prop(gpd, "show_multiedit_line_only", text="Display only edit lines")
+ col.prop(settings, "use_multiframe_falloff")
+
+ # Falloff curve
+ if gpd.use_multiedit and settings.use_multiframe_falloff:
+ layout.template_curve_mapping(settings, "multiframe_falloff_curve", brush=True)
+
+
class INFO_MT_editor_menus(Menu):
bl_idname = "INFO_MT_editor_menus"
bl_label = ""
diff --cc release/scripts/startup/bl_ui/space_view3d.py
index cd1b6f4ff3c,2004c1aa029..7071269bec0
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@@ -147,13 -204,13 +229,15 @@@ class VIEW3D_MT_editor_menus(Menu)
@staticmethod
def draw_menus(layout, context):
obj = context.active_object
+ workspace = context.workspace
mode_string = context.mode
edit_object = context.edit_object
- gp_edit = context.gpencil_data and context.gpencil_data.use_stroke_edit_mode
+ gp_edit = context.active_object and \
+ context.active_object.mode in {'GPENCIL_EDIT', 'GPENCIL_PAINT', 'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'}
- layout.menu("VIEW3D_MT_view")
+ # Use aligned row to squeeze out a bit more space.
+ row = layout.row(align=True)
+ row.menu("VIEW3D_MT_view")
# Select Menu
if gp_edit:
More information about the Bf-blender-cvs
mailing list