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

Joshua Leung noreply at git.blender.org
Fri May 4 16:06:32 CEST 2018


Commit: d6a38803e15197319030422f7e8fc9f7a0b2357e
Author: Joshua Leung
Date:   Fri May 4 12:21:12 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBd6a38803e15197319030422f7e8fc9f7a0b2357e

Merge branch 'blender2.8' into greasepencil-object

# Todo's / Need Further Review:
# - material.c - "man->gpcolor = NULL" (commented out for now)
# - rna_material.c - "rna_Material_update()" - Should GP material settings use their own update?
# - GP Modifiers typedefines need updating for the new struct layout
# - Merge conflicts in properties_gp_common.py - Mostly due to panels being removed in GP branch
# - GP Panels in 3D View (toolbar/topbar fixes postponed till after branch merge)
# - GP "Paper" Option/Settings (should become overlay? Design work needed)

# Conflicts:
#	release/scripts/addons
#	release/scripts/addons_contrib
#	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
#	release/scripts/startup/bl_ui/space_view3d.py
#	release/scripts/startup/bl_ui/space_view3d_toolbar.py
#	source/blender/blenkernel/BKE_modifier.h
#	source/blender/blenkernel/intern/material.c
#	source/blender/editors/object/object_transform.c
#	source/blender/editors/space_outliner/outliner_select.c
#	source/blender/gpu/intern/gpu_shader.c
#	source/blender/makesrna/intern/rna_material.c
#	source/blender/modifiers/intern/MOD_armature.c
#	source/blender/modifiers/intern/MOD_array.c
#	source/blender/modifiers/intern/MOD_bevel.c
#	source/blender/modifiers/intern/MOD_boolean.c
#	source/blender/modifiers/intern/MOD_build.c
#	source/blender/modifiers/intern/MOD_cast.c
#	source/blender/modifiers/intern/MOD_cloth.c
#	source/blender/modifiers/intern/MOD_collision.c
#	source/blender/modifiers/intern/MOD_correctivesmooth.c
#	source/blender/modifiers/intern/MOD_curve.c
#	source/blender/modifiers/intern/MOD_datatransfer.c
#	source/blender/modifiers/intern/MOD_decimate.c
#	source/blender/modifiers/intern/MOD_displace.c
#	source/blender/modifiers/intern/MOD_dynamicpaint.c
#	source/blender/modifiers/intern/MOD_edgesplit.c
#	source/blender/modifiers/intern/MOD_explode.c
#	source/blender/modifiers/intern/MOD_fluidsim.c
#	source/blender/modifiers/intern/MOD_hook.c
#	source/blender/modifiers/intern/MOD_laplaciandeform.c
#	source/blender/modifiers/intern/MOD_laplaciansmooth.c
#	source/blender/modifiers/intern/MOD_lattice.c
#	source/blender/modifiers/intern/MOD_mask.c
#	source/blender/modifiers/intern/MOD_meshcache.c
#	source/blender/modifiers/intern/MOD_meshdeform.c
#	source/blender/modifiers/intern/MOD_meshsequencecache.c
#	source/blender/modifiers/intern/MOD_mirror.c
#	source/blender/modifiers/intern/MOD_multires.c
#	source/blender/modifiers/intern/MOD_none.c
#	source/blender/modifiers/intern/MOD_normal_edit.c
#	source/blender/modifiers/intern/MOD_ocean.c
#	source/blender/modifiers/intern/MOD_particleinstance.c
#	source/blender/modifiers/intern/MOD_particlesystem.c
#	source/blender/modifiers/intern/MOD_remesh.c
#	source/blender/modifiers/intern/MOD_screw.c
#	source/blender/modifiers/intern/MOD_shapekey.c
#	source/blender/modifiers/intern/MOD_shrinkwrap.c
#	source/blender/modifiers/intern/MOD_simpledeform.c
#	source/blender/modifiers/intern/MOD_skin.c
#	source/blender/modifiers/intern/MOD_smoke.c
#	source/blender/modifiers/intern/MOD_smooth.c
#	source/blender/modifiers/intern/MOD_softbody.c
#	source/blender/modifiers/intern/MOD_solidify.c
#	source/blender/modifiers/intern/MOD_subsurf.c
#	source/blender/modifiers/intern/MOD_surface.c
#	source/blender/modifiers/intern/MOD_surfacedeform.c
#	source/blender/modifiers/intern/MOD_triangulate.c
#	source/blender/modifiers/intern/MOD_uvproject.c
#	source/blender/modifiers/intern/MOD_uvwarp.c
#	source/blender/modifiers/intern/MOD_warp.c
#	source/blender/modifiers/intern/MOD_wave.c
#	source/blender/modifiers/intern/MOD_weightvgedit.c
#	source/blender/modifiers/intern/MOD_weightvgmix.c
#	source/blender/modifiers/intern/MOD_weightvgproximity.c
#	source/blender/modifiers/intern/MOD_wireframe.c

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



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

diff --cc release/scripts/addons
index 371960484a3,8f2fd7e23f0..4b91309b122
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 371960484a38fc64e0a2635170a41a0d8ab2f6bd
 -Subproject commit 8f2fd7e23f0b5ce023440182f51c40e88d663325
++Subproject commit 4b91309b122bcdcddd1854b1137407b2c4f55c7e
diff --cc release/scripts/addons_contrib
index a8515cfdfe9,34a27a42d78..cd57934bd04
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit a8515cfdfe9a98127b592f36fcbe51b7e23b969a
 -Subproject commit 34a27a42d781d80f9f1833bad8cc5b2abcac2933
++Subproject commit cd57934bd04c174fc3402888d01a74e6e6653b2f
diff --cc release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 8b47561c58d,decbbff5d60..411b3885009
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@@ -932,29 -1037,27 +943,28 @@@ class GreasePencilOnionPanel
          # - 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 GreasePencilPaletteColorPanel:
 -    # subclass must set
 -    bl_label = "Grease Pencil Colors"
 -    bl_region_type = 'UI'
 +        row.active = gp.use_ghost_custom_colors
 +        row.prop(gp, "after_color", text="")
  
 -    @classmethod
 -    def poll(cls, context):
 -        # XXX - disabled in 2.8 branch.
 -        return False
 +        row = sub.row(align=True)
 +        row.active = gp.onion_mode in ('ABSOLUTE', 'RELATIVE')
 +        row.prop(gp, "ghost_after_range", text="After")
  
 -        if context.gpencil_data is None:
 -            return False
 +        # - fade and loop
 +        row = layout.row()
 +        row.active = gp.use_onion_skinning
 +        row.prop(gp, "use_onion_fade", text="Fade")
 +        if hasattr(gp, "use_onion_loop"): # XXX
 +            subrow = row.row()
 +            subrow.active = gp.onion_mode in ('RELATIVE', 'SELECTED')
 +            subrow.prop(gp, "use_onion_loop", text="Loop")
  
- 
 -        gpd = context.gpencil_data
 -        return bool(gpd.layers.active)
 +###############################
  
 +# FIXME: Placeholder - Annotation views shouldn't use this anymore...
 +class GreasePencilDeprecatedUIPanel:
 +    bl_region_type = 'TOOLS'
 +    
      @staticmethod
      def draw(self, context):
          layout = self.layout
diff --cc release/scripts/startup/bl_ui/space_view3d.py
index 3e80cf62a0d,16448c2ad0e..730158c0e7b
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@@ -3498,56 -3622,34 +3651,68 @@@ class VIEW3D_PT_overlay(Panel)
          subsub.active = scene.unit_settings.system == 'NONE'
          subsub.prop(view, "grid_subdivisions", text="Subdivisions")
  
-         layout.separator()
  
-         layout.operator("screen.region_quadview", text="Toggle Quad View")
+ class VIEW3D_PT_quad_view(Panel):
+     bl_space_type = 'VIEW_3D'
+     bl_region_type = 'UI'
+     bl_label = "Quad View"
+     bl_options = {'DEFAULT_CLOSED'}
  
-         if view.region_quadviews:
-             region = view.region_quadviews[2]
-             col = layout.column()
-             col.prop(region, "lock_rotation")
-             row = col.row()
-             row.enabled = region.lock_rotation
-             row.prop(region, "show_sync_view")
-             row = col.row()
-             row.enabled = region.lock_rotation and region.show_sync_view
-             row.prop(region, "use_box_clip")
+     @classmethod
+     def poll(cls, context):
+         view = context.space_data
+         return view.region_quadviews
+ 
+     def draw(self, context):
+         layout = self.layout
+ 
+         view = context.space_data
+ 
+         region = view.region_quadviews[2]
+         col = layout.column()
+         col.prop(region, "lock_rotation")
+         row = col.row()
+         row.enabled = region.lock_rotation
+         row.prop(region, "show_sync_view")
+         row = col.row()
+         row.enabled = region.lock_rotation and region.show_sync_view
+         row.prop(region, "use_box_clip")
  
  
 +class VIEW3D_PT_gp_paper(Panel):
 +    bl_space_type = 'VIEW_3D'
 +    bl_region_type = 'UI'
 +    bl_label = "Grease Pencil Paper"
 +    bl_options = {'DEFAULT_CLOSED'}
 +
 +    @classmethod
 +    def poll(cls, context):
 +        view = context.space_data
 +        return (view and context.active_object and context.gpencil_data)
 +
 +    def draw_header(self, context):
 +        view = context.space_data
 +        self.layout.prop(view, "use_gpencil_paper", text="")
 +
 +    def draw(self, context):
 +        layout = self.layout
 +        view = context.space_data
 +        layout.active = view.use_gpencil_paper
 +
 +        row = layout.row()
 +        row.prop(view, "gp_paper_color", text="Color")
 +        row = layout.row()
 +        row.prop(view, "gp_paper_opacity", text="Opacity")
 +
 +        row = layout.row(align=False)
 +        row.prop(view, "use_gpencil_grid", text="Display Grid")
 +
 +        row = layout.row(align=False)
 +        col = row.column(align=True)
 +        col.enabled = view.use_gpencil_grid
 +        col.prop(view, "gpencil_grid_size", text="")
 +
 +
  class VIEW3D_PT_view3d_stereo(Panel):
      bl_space_type = 'VIEW_3D'
      bl_region_type = 'UI'
@@@ -3947,8 -4053,9 +4116,8 @@@ classes = 
      VIEW3D_PT_view3d_properties,
      VIEW3D_PT_view3d_cursor,
      VIEW3D_PT_view3d_name,
-     VIEW3D_PT_view3d_display,
 +    VIEW3D_PT_gp_paper,
+     VIEW3D_PT_quad_view,
      VIEW3D_PT_view3d_stereo,
      VIEW3D_PT_view3d_motion_tracking,
      VIEW3D_PT_view3d_meshdisplay,
diff --cc release/scripts/startup/bl_ui/space_view3d_toolbar.py
index b6958df6471,f1569e9df8a..476a165bd8b
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@@ -60,444 -64,13 +60,19 @@@ def draw_vpaint_symmetry(layout, vpaint
      col = layout.column()
      col.prop(vpaint, "radial_symmetry", text="Radial")
  
- # ********** default tools for object-mode ****************
- 
- 
 +# Most of these panels should not be visible in GP edit modes
 +def is_not_gpencil_edit_mode(context):
 +    is_gpmode = context.active_object and \
 +                context.active_object.mode in {'GPENCIL_EDIT', 'GPENCIL_PAINT', 'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'}
 +    return not is_gpmode
 +
  
- class VIEW3D_PT_tools_transform(View3DPanel, Panel):
-     bl_category = "Tools"
-     bl_context = "objectmode"
-     bl_label = "Transform"
- 
-     @classmethod
-     def poll(cls, context):
-         return is_not_gpencil_edit_mode(context)
- 
-     def draw(self, context):
-         layout = self.layout
- 
-         col = layout.column(align=True)
-         col.operator("transform.translate")
-         col.operator("transform.rotate")
-         col.operator("transform.resize", text="Scale")
- 
-         col = layout.column(align=True)
-         col.operator("transform.mirror", text="Mirror")
- 
- 
- class VIEW3D_PT_tools_object(View3DPanel, Panel):
-     bl_category = "Tools"
-     bl_context = "objectmode"
-     bl_label = "Edit"
- 
-     @classmethod
-     def poll(cls, context):
-         return is_not_gpencil_edit_mode(context)
- 
-     def draw(self, context):
-         layout = self.layout
- 
-         col = layout.column(align=True)
-         col.operator("object.duplicate_move", text="Duplicate")
-         col.operator("object.duplicate_move_linked", text="Duplicate Linked")
- 
-         col.operator("object.delete")
- 
-         obj = context.active_object
-         if obj:
-             obj_type = obj.type
- 
-             if obj_type in {'MESH', 'CURVE', 'SURFACE', 'ARMATURE'}:
-                 col = layout.column(align=True)
-                 col.operator("object.join")
- 
-             if obj_type in {'MESH', 'CURVE', 'SURFACE', 'ARMATURE', 'FONT', 'LATTICE', 'GPENCIL'}:
-                 col = layout.column(align=True)
-                 col.operator_menu_enum("object.origin_set", "type", text="Set Origin")
- 
-             if obj_type in {'MESH', 'CURVE', 'SURFACE'}:
-                 col = layout.column(align=True)
-                 col.label(text="Shading:")
-                 row = col.row(align=True)
-                 row.operator("object.shade_smooth", text="Smooth")
-                 row.operator("object.shade_flat", text="Flat")
- 
-             if obj_type == 'MESH':
-                 col = layout.column(align=True)
-                 col.label(text="Data Transfer:")
-                 row = col.row(align=True)
-                 row.operator("object.data_transfer", text="Data")
-                 row.operator("object.datalayout_transfer", text="Data Layout")
- 
-             if obj_type == 'GPENCIL':
-                 col = layout.column(align=True)
-                 col.label(text="Grease Pencil:")
-                 row = col.row(align=True)
-                 col.operator_menu_enum("gpencil.convert", text="Convert to Geometry...", property="type")
- 
- 
- class VIEW3D_PT_tools_add_object(View3DPanel, Panel):
-     bl_category = "Create"
-     bl_context = "objectmode"
-     bl_label = "Add Primitive"
- 
-     @classmethod
-     def poll(cls, context):
-         return is_not_gpencil_edit_mode(context)
- 
-     @staticmethod
-     def draw_add_mesh(layout, label=False):
-         if label:
-             layout.label(text="Primitives:")
-         layout.operator("mesh.primitive_plane_add", text="Plane", icon='MESH_PLANE')
-         layout.operator("mesh.primitive_cube_add", text="Cube", icon='MESH_CUBE')
-         layout.operator("mesh.primitive_circle_add", text="Circle", icon='MESH_CIRCLE')
-         layout.operator("mesh.primitive_uv_sphere_add", text="UV Sphere", icon='MESH_UVSPHERE')
-         layout.operator("mesh.primitive_ico_sphere_add", text="Ico Sphere", icon='MESH_ICOSPHERE')
-         layout.operator("mesh.primitive_cylinder_add", text="Cylinder", icon='MESH_CYLINDER')
-         layout.operator("mesh.primitive_c

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list