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:
authorCampbell Barton <ideasman42@gmail.com>2019-03-12 02:35:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-12 02:46:31 +0300
commitbf1a3fee7c273f53c54269aa0507680acd79b511 (patch)
treea85eb6df764c812dbc9f5d606f3d70be61b7821a /release
parent2ba35ea7c26413407caadff971f821d46e47e70e (diff)
UI: Restore orient/pivot UI for wpaint & pose mode
This was removed since 2.7x (by accident?)
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index ed1cba69acd..c66620fe69d 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -51,6 +51,10 @@ class VIEW3D_HT_header(Header):
row.template_header()
object_mode = 'OBJECT' if obj is None else obj.mode
+ has_pose_mode = (
+ (object_mode == 'POSE') or
+ (object_mode == 'WEIGHT_PAINT' and context.pose_object is not None)
+ )
# Note: This is actually deadly in case enum_items have to be dynamically generated
# (because internal RNA array iterator will free everything immediately...).
@@ -129,7 +133,7 @@ class VIEW3D_HT_header(Header):
scene = context.scene
# Orientation
- if object_mode in {'OBJECT', 'EDIT', 'POSE', 'EDIT_GPENCIL'}:
+ if object_mode in {'OBJECT', 'EDIT', 'EDIT_GPENCIL'} or has_pose_mode:
orient_slot = scene.transform_orientation_slots[0]
custom_orientation = orient_slot.custom_orientation
trans_name, trans_icon = orient_slot.ui_info()
@@ -145,7 +149,7 @@ class VIEW3D_HT_header(Header):
)
# Pivot
- if object_mode in {'OBJECT', 'EDIT', 'POSE', 'EDIT_GPENCIL', 'SCULPT_GPENCIL'}:
+ if object_mode in {'OBJECT', 'EDIT', 'EDIT_GPENCIL', 'SCULPT_GPENCIL'} or has_pose_mode:
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)
@@ -160,8 +164,10 @@ class VIEW3D_HT_header(Header):
if obj is None:
show_snap = True
else:
- if object_mode not in {'SCULPT', 'VERTEX_PAINT', 'WEIGHT_PAINT', 'TEXTURE_PAINT',
- 'PAINT_GPENCIL', 'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'}:
+ if (object_mode not in {
+ 'SCULPT', 'VERTEX_PAINT', 'WEIGHT_PAINT', 'TEXTURE_PAINT',
+ 'PAINT_GPENCIL', 'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'
+ }) or has_pose_mode:
show_snap = True
else:
@@ -248,7 +254,7 @@ class VIEW3D_HT_header(Header):
icon=lk_icon,
)
- if object_mode in {'PAINT_GPENCIL'}:
+ if object_mode == 'PAINT_GPENCIL':
if context.workspace.tools.from_space_view3d_mode(object_mode).name == "Draw":
settings = tool_settings.gpencil_sculpt.guide
row = layout.row(align=True)
@@ -5278,7 +5284,7 @@ class VIEW3D_PT_snapping(Panel):
if obj:
if object_mode == 'EDIT':
col.prop(tool_settings, "use_snap_self")
- if object_mode in {'OBJECT', 'POSE', 'EDIT'}:
+ if object_mode in {'OBJECT', 'POSE', 'EDIT', 'WEIGHT_PAINT'}:
col.prop(tool_settings, "use_snap_align_rotation")
if 'FACE' in snap_elements: