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:
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d.py')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index b3792686fc4..a31fd81efb5 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -55,7 +55,7 @@ class VIEW3D_HT_header(Header):
# Occlude geometry
if ((view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'} and (mode == 'PARTICLE_EDIT' or (mode == 'EDIT' and obj.type == 'MESH'))) or
- (mode == 'WEIGHT_PAINT')):
+ (mode in {'WEIGHT_PAINT', 'VERTEX_PAINT'})):
row.prop(view, "use_occlude_geometry", text="")
# Proportional editing
@@ -170,7 +170,7 @@ class VIEW3D_MT_editor_menus(Menu):
mesh = obj.data
if mesh.use_paint_mask:
layout.menu("VIEW3D_MT_select_paint_mask")
- elif mesh.use_paint_mask_vertex and mode_string == 'PAINT_WEIGHT':
+ elif mesh.use_paint_mask_vertex and mode_string in {'PAINT_WEIGHT', 'PAINT_VERTEX'}:
layout.menu("VIEW3D_MT_select_paint_mask_vertex")
elif mode_string != 'SCULPT':
layout.menu("VIEW3D_MT_select_%s" % mode_string.lower())
@@ -294,12 +294,19 @@ class VIEW3D_MT_transform_object(VIEW3D_MT_transform_base):
layout.operator("object.origin_set", text="Geometry to Origin").type = 'GEOMETRY_ORIGIN'
layout.operator("object.origin_set", text="Origin to Geometry").type = 'ORIGIN_GEOMETRY'
layout.operator("object.origin_set", text="Origin to 3D Cursor").type = 'ORIGIN_CURSOR'
- layout.operator("object.origin_set", text="Origin to Center of Mass").type = 'ORIGIN_CENTER_OF_MASS'
+ layout.operator("object.origin_set", text="Origin to Center of Mass (Surface)").type = 'ORIGIN_CENTER_OF_MASS'
+ layout.operator("object.origin_set", text="Origin to Center of Mass (Volume)").type = 'ORIGIN_CENTER_OF_VOLUME'
layout.separator()
layout.operator("object.randomize_transform")
layout.operator("object.align")
+ # TODO: there is a strange context bug here.
+ """
+ layout.operator_context = 'INVOKE_REGION_WIN'
+ layout.operator("object.transform_axis_target")
+ """
+
# Armature EditMode extensions to Transform menu
class VIEW3D_MT_transform_armature(VIEW3D_MT_transform_base):
@@ -1702,7 +1709,7 @@ class VIEW3D_MT_brush(Menu):
# skip if no active brush
if not brush:
- layout.label(text="No Brushes currently available", icon="INFO")
+ layout.label(text="No Brushes currently available", icon='INFO')
return
# brush paint modes
@@ -1771,6 +1778,7 @@ class VIEW3D_MT_paint_vertex(Menu):
layout.operator("paint.vertex_color_set")
layout.operator("paint.vertex_color_smooth")
layout.operator("paint.vertex_color_dirt")
+ layout.operator("paint.vertex_color_from_weight")
layout.separator()
@@ -2105,7 +2113,7 @@ class VIEW3D_MT_pose_transform(Menu):
layout.separator()
- layout.operator("pose.user_transforms_clear", text="Reset unkeyed")
+ layout.operator("pose.user_transforms_clear", text="Reset Unkeyed")
class VIEW3D_MT_pose_slide(Menu):
@@ -3266,6 +3274,9 @@ class VIEW3D_PT_view3d_display(Panel):
col.prop(view, "show_only_render")
col.prop(view, "show_world")
+ if context.mode in {'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'}:
+ col.prop(view, "show_mode_shade_override")
+
col = layout.column()
display_all = not view.show_only_render
col.active = display_all