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:
authorgaiaclary <gaia.clary@machinimatrix.org>2014-06-14 17:18:46 +0400
committergaiaclary <gaia.clary@machinimatrix.org>2014-06-14 17:18:46 +0400
commita2936d1ffef14a5be697f40c84f39bfd8947be3b (patch)
tree08786c2c81cce8295d5f4ad65171abbba0d103f0 /release
parentb12151eceb76cab4a49f9df661ce6156bbeaaa21 (diff)
Expose Weigth tools for edit mode
Most weight tools also work in edit mode. This change exposes all applicable tools within a separate weight tool panel in the tools tab of the tool shelf Reviewers: campbellbarton Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D592
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py37
1 files changed, 26 insertions, 11 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 904c7e38649..0f2c04d1cdc 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -363,6 +363,30 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
draw_repeat_tools(context, layout)
+class VIEW3D_PT_tools_meshweight(View3DPanel, Panel):
+ bl_category = "Tools"
+ bl_context = "mesh_edit"
+ bl_label = "Weight Tools"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ # Used for Weight-Paint mode and Edit-Mode
+ @staticmethod
+ def draw_generic(layout):
+ col = layout.column()
+ col.operator("object.vertex_group_normalize_all", text="Normalize All")
+ col.operator("object.vertex_group_normalize", text="Normalize")
+ col.operator("object.vertex_group_mirror", text="Mirror")
+ col.operator("object.vertex_group_invert", text="Invert")
+ col.operator("object.vertex_group_clean", text="Clean")
+ col.operator("object.vertex_group_quantize", text="Quantize")
+ col.operator("object.vertex_group_levels", text="Levels")
+ col.operator("object.vertex_group_blend", text="Blend")
+ col.operator("object.vertex_group_limit_total", text="Limit Total")
+ col.operator("object.vertex_group_fix", text="Fix Deforms")
+
+ def draw(self, context):
+ layout = self.layout
+ self.draw_generic(layout)
class VIEW3D_PT_tools_add_mesh_edit(View3DPanel, Panel):
bl_category = "Create"
@@ -1411,20 +1435,11 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel, Panel):
def draw(self, context):
layout = self.layout
+ VIEW3D_PT_tools_meshweight.draw_generic(layout)
col = layout.column()
- col.operator("object.vertex_group_normalize_all", text="Normalize All")
- col.operator("object.vertex_group_normalize", text="Normalize")
- col.operator("object.vertex_group_mirror", text="Mirror")
- col.operator("object.vertex_group_invert", text="Invert")
- col.operator("object.vertex_group_clean", text="Clean")
- col.operator("object.vertex_group_quantize", text="Quantize")
- col.operator("object.vertex_group_levels", text="Levels")
- col.operator("object.vertex_group_blend", text="Blend")
- col.operator("object.vertex_group_transfer_weight", text="Transfer Weights")
- col.operator("object.vertex_group_limit_total", text="Limit Total")
- col.operator("object.vertex_group_fix", text="Fix Deforms")
col.operator("paint.weight_gradient")
+ col.operator("object.vertex_group_transfer_weight", text="Transfer Weights")
class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel):