Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-08-30 13:22:55 +0300
committerAntonioya <blendergit@gmail.com>2018-08-30 13:23:08 +0300
commit9a646b6a2060dbc3b2f4031f7933842c597d0716 (patch)
treec9e02dd7168547a246c11177c977311f24435a8d /release/scripts/startup/bl_ui/space_view3d.py
parent9d00b0f7963508c3f8de8eff6a376dcb085da438 (diff)
GP: New Armature modifier and tools to handle weights
This commit adds a new armature modifier for grease pencil. The deformations are done reusing the mesh deform routines. There is also a new operator in weight paint mode to help the artist to generate weights base on armatures. This operator is required because 2D animation workflow is not equal to meshes when parent an object to armatures. In the drawing engine has been added the option to handle the Fade object parameter used in armatures to see the strokes while move the bones. When rename bones, all related data of grease pencil is renamed too. This not only affect new armature code, but also layers parented and hook modifiers. Thanks @aligorith for his review and help.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d.py')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 8d2cdd4b11b..60f312c9d6b 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3535,6 +3535,15 @@ class VIEW3D_MT_edit_armature_delete(Menu):
# ********** Grease Pencil Stroke menus **********
+class VIEW3D_MT_gpencil_autoweights(Menu):
+ bl_label = "Generate Weights"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator("gpencil.generate_weights", text="With Empty Groups").mode = 'NAME'
+ layout.operator("gpencil.generate_weights", text="With Automatic Weights").mode = 'AUTO'
+
+
class VIEW3D_MT_gpencil_simplify(Menu):
bl_label = "Simplify"
@@ -3704,6 +3713,9 @@ class VIEW3D_MT_weight_gpencil(Menu):
layout.operator("gpencil.vertex_group_invert", text="Invert")
layout.operator("gpencil.vertex_group_smooth", text="Smooth")
+ layout.separator()
+ layout.menu("VIEW3D_MT_gpencil_autoweights")
+
class VIEW3D_MT_gpencil_animation(Menu):
bl_label = "Animation"
@@ -5001,7 +5013,6 @@ class VIEW3D_MT_gpencil_sculpt_specials(Menu):
def draw(self, context):
layout = self.layout
- is_3d_view = context.space_data.type == 'VIEW_3D'
layout.operator_context = 'INVOKE_REGION_WIN'
layout.menu("VIEW3D_MT_assign_material")
@@ -5016,6 +5027,9 @@ class VIEW3D_MT_gpencil_sculpt_specials(Menu):
layout.operator("gpencil.stroke_simplify_fixed", text="Simplify")
layout.operator("gpencil.stroke_simplify", text="Simplify Adaptative")
+ if context.mode == 'GPENCIL_WEIGHT':
+ layout.separator()
+ layout.menu("VIEW3D_MT_gpencil_autoweights")
classes = (
VIEW3D_HT_header,
@@ -5161,6 +5175,7 @@ classes = (
VIEW3D_PT_object_type_visibility,
VIEW3D_PT_grease_pencil,
VIEW3D_PT_gpencil_multi_frame,
+ VIEW3D_MT_gpencil_autoweights,
VIEW3D_MT_gpencil_edit_specials,
VIEW3D_MT_gpencil_sculpt_specials,
VIEW3D_PT_quad_view,