Fix T47596: Bone motion path - confusing UI in 3DView tools.
Now using same UI as in object/armature properties, also save one line in 3DView panesl. ;) Nothing crucial there, but nice & safe to backport to 2.77 imho.
This commit is contained in:
@@ -242,14 +242,19 @@ class VIEW3D_PT_tools_animation(View3DPanel, Panel):
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
|
ob = context.active_object
|
||||||
|
mpath = ob.motion_path if ob else None
|
||||||
|
|
||||||
draw_keyframing_tools(context, layout)
|
draw_keyframing_tools(context, layout)
|
||||||
|
|
||||||
col = layout.column(align=True)
|
col = layout.column(align=True)
|
||||||
col.label(text="Motion Paths:")
|
col.label(text="Motion Paths:")
|
||||||
row = col.row(align=True)
|
if mpath:
|
||||||
row.operator("object.paths_calculate", text="Calculate")
|
row = col.row(align=True)
|
||||||
row.operator("object.paths_clear", text="Clear")
|
row.operator("object.paths_update", text="Update")
|
||||||
col.operator("object.paths_update", text="Update")
|
row.operator("object.paths_clear", text="", icon='X')
|
||||||
|
else:
|
||||||
|
col.operator("object.paths_calculate", text="Calculate")
|
||||||
|
|
||||||
col.separator()
|
col.separator()
|
||||||
|
|
||||||
@@ -771,12 +776,17 @@ class VIEW3D_PT_tools_posemode(View3DPanel, Panel):
|
|||||||
|
|
||||||
draw_keyframing_tools(context, layout)
|
draw_keyframing_tools(context, layout)
|
||||||
|
|
||||||
|
pchan = context.active_pose_bone
|
||||||
|
mpath = pchan.motion_path if pchan else None
|
||||||
|
|
||||||
col = layout.column(align=True)
|
col = layout.column(align=True)
|
||||||
col.label(text="Motion Paths:")
|
col.label(text="Motion Paths:")
|
||||||
row = col.row(align=True)
|
if mpath:
|
||||||
row.operator("pose.paths_calculate", text="Calculate")
|
row = col.row(align=True)
|
||||||
row.operator("pose.paths_clear", text="Clear")
|
row.operator("pose.paths_update", text="Update")
|
||||||
col.operator("pose.paths_update", text="Update")
|
row.operator("pose.paths_clear", text="", icon='X')
|
||||||
|
else:
|
||||||
|
col.operator("pose.paths_calculate", text="Calculate")
|
||||||
|
|
||||||
|
|
||||||
class VIEW3D_PT_tools_posemode_options(View3DPanel, Panel):
|
class VIEW3D_PT_tools_posemode_options(View3DPanel, Panel):
|
||||||
|
Reference in New Issue
Block a user