[Bf-blender-cvs] [ebbc047dfe2] greasepencil-object: Merge branch 'blender2.8' into greasepencil-object

Joshua Leung noreply at git.blender.org
Tue Jul 3 03:42:35 CEST 2018


Commit: ebbc047dfe2ae183e6f575cb4de7222ffb032a68
Author: Joshua Leung
Date:   Tue Jul 3 13:20:38 2018 +1200
Branches: greasepencil-object
https://developer.blender.org/rBebbc047dfe2ae183e6f575cb4de7222ffb032a68

Merge branch 'blender2.8' into greasepencil-object

# Conflicts:
#	release/scripts/startup/bl_ui/space_view3d.py

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



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

diff --cc release/scripts/startup/bl_ui/space_view3d.py
index feb16ce9566,e5e903f5338..b731d5cf4c3
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@@ -144,12 -117,20 +161,20 @@@ class VIEW3D_HT_header(Header)
          # Mode & Transform Settings
          scene = context.scene
  
-         # Orientation & Pivot
+         # Orientation
 -        if object_mode in {'OBJECT', 'EDIT', 'POSE'}:
 +        if object_mode in {'OBJECT', 'EDIT', 'POSE', 'GPENCIL_EDIT', 'GPENCIL_SCULPT'}:
-             layout.prop(scene, "transform_orientation", text="")
+             orientation = scene.transform_orientation
+             current_orientation = scene.current_orientation
+ 
+             if not current_orientation:
+                 trans_orientation = \
+                     bpy.types.Scene.bl_rna.properties["transform_orientation"].enum_items[orientation]
+                 trans_icon = getattr(trans_orientation, "icon", "BLANK1")
+                 trans_name = getattr(trans_orientation, "name", "Orientation")
+             else:
+                 trans_icon = "VISIBLE_IPO_OFF"
+                 trans_name = getattr(current_orientation, "name", "Orientation")
  
-             pivot_point = tool_settings.transform_pivot_point
-             act_pivot_point = bpy.types.ToolSettings.bl_rna.properties["transform_pivot_point"].enum_items[pivot_point]
              row = layout.row(align=True)
              row.popover(
                  space_type='TOPBAR',
@@@ -234,22 -179,49 +223,51 @@@
                  text=""
              )
  
-         layout.separator_spacer()
+         # Proportional editing
+         if obj:
 -            if context.gpencil_data and context.gpencil_data.use_stroke_edit_mode:
 -                row = layout.row(align=True)
 -                row.prop(tool_settings, "proportional_edit", icon_only=True)
++            gpd = context.gpencil_data
++            if gpd is not None:
++                if gpd.use_stroke_edit_mode or gpd.is_stroke_sculpt_mode:
++                    row = layout.row(align=True)
++                    row.prop(tool_settings, "proportional_edit", icon_only=True)
  
-         # Viewport Settings
-         row = layout.row(align=True)
-         row.prop(shading, "type", text="", expand=True)
 -                sub = row.row(align=True)
 -                sub.active = tool_settings.proportional_edit != 'DISABLED'
 -                sub.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
++                    sub = row.row(align=True)
++                    sub.active = tool_settings.proportional_edit != 'DISABLED'
++                    sub.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
  
-         sub = row.row(align=True)
-         sub.enabled = shading.type != 'RENDERED'
-         sub.popover(space_type='VIEW_3D', region_type='HEADER', panel_type="VIEW3D_PT_shading")
+             elif object_mode in {'EDIT', 'PARTICLE_EDIT'}:
+                 row = layout.row(align=True)
+                 row.prop(tool_settings, "proportional_edit", icon_only=True)
+                 sub = row.row(align=True)
+                 sub.active = tool_settings.proportional_edit != 'DISABLED'
+                 sub.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
  
-         row = layout.row(align=True)
-         row.prop(overlay, "show_overlays", icon='WIRE', text="")
+             elif object_mode == 'OBJECT':
+                 row = layout.row(align=True)
+                 row.prop(tool_settings, "use_proportional_edit_objects", icon_only=True)
+                 sub = row.row(align=True)
+                 sub.active = tool_settings.use_proportional_edit_objects
+                 sub.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
+         else:
+             if context.gpencil_data and context.gpencil_data.use_stroke_edit_mode:
+                 row = layout.row(align=True)
+                 row.prop(tool_settings, "proportional_edit", icon_only=True)
+                 sub = row.row(align=True)
+                 sub.active = tool_settings.proportional_edit != 'DISABLED'
+                 sub.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
  
-         sub = row.row(align=True)
-         sub.active = overlay.show_overlays
-         sub.popover(space_type='VIEW_3D', region_type='HEADER', panel_type="VIEW3D_PT_overlay")
+         # Pivot
+         if object_mode in {'OBJECT', 'EDIT', 'POSE'}:
+             pivot_point = tool_settings.transform_pivot_point
+             act_pivot_point = bpy.types.ToolSettings.bl_rna.properties["transform_pivot_point"].enum_items[pivot_point]
+             row = layout.row(align=True)
+             row.popover(
+                 space_type='TOPBAR',
+                 region_type='HEADER',
+                 panel_type="TOPBAR_PT_pivot_point",
+                 icon=act_pivot_point.icon,
+                 text="",
+             )
  
  
  class VIEW3D_MT_editor_menus(Menu):
@@@ -262,15 -234,11 +280,13 @@@
      @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'}
  
-         # Use aligned row to squeeze out a bit more space.
-         row = layout.row(align=True)
-         row.menu("VIEW3D_MT_view")
+         layout.menu("VIEW3D_MT_view")
  
          # Select Menu
          if gp_edit:
@@@ -4433,10 -4313,10 +4422,11 @@@ classes = 
      VIEW3D_MT_edit_gpencil_interpolate,
      VIEW3D_MT_object_mode_pie,
      VIEW3D_MT_view_pie,
 -    VIEW3D_PT_grease_pencil,
 -    VIEW3D_PT_grease_pencil_palettecolor,
      VIEW3D_PT_view3d_properties,
      VIEW3D_PT_view3d_cursor,
 +    VIEW3D_PT_grease_pencil,
 +    VIEW3D_PT_gp_paper,
++    VIEW3D_PT_GreasePencilMultiFrame,
      VIEW3D_PT_quad_view,
      VIEW3D_PT_view3d_stereo,
      VIEW3D_PT_shading,



More information about the Bf-blender-cvs mailing list