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:
authorSybren A. Stüvel <sybren@blender.org>2022-03-14 13:15:09 +0300
committerSybren A. Stüvel <sybren@blender.org>2022-03-14 13:17:45 +0300
commit7306417ae46a2cf2733849cd52e1bfb74af40f08 (patch)
tree0fb5e4289045b708b074a408c4fd7ca3c36e035e /release/scripts/startup/bl_ui
parent4045b3d7b685aeeb6003d3f90b4a41f6337b6159 (diff)
Revert "Animation: Sensible frame range for motion paths"
This reverts commit 1558b270e9fcbc2e23fa248b0e7e770dddae155c. An earlier commit (rB101fadcf6b93c) introduced some new functionality, which was overlooked in reviewing this commit & got broken. Will re-commit after the issue has been fixed. Ref: D13687
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r--release/scripts/startup/bl_ui/properties_animviz.py68
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py4
-rw-r--r--release/scripts/startup/bl_ui/space_graph.py3
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py29
4 files changed, 38 insertions, 66 deletions
diff --git a/release/scripts/startup/bl_ui/properties_animviz.py b/release/scripts/startup/bl_ui/properties_animviz.py
index 629399084ba..548ce72c429 100644
--- a/release/scripts/startup/bl_ui/properties_animviz.py
+++ b/release/scripts/startup/bl_ui/properties_animviz.py
@@ -24,55 +24,55 @@ class MotionPathButtonsPanel:
layout.use_property_split = True
layout.use_property_decorate = False
- # Display Range
- col = layout.column(align=True)
- col.prop(mps, "type")
- col = layout.column(align=True)
+ row = layout.row(align=True)
+ row.prop(mps, "type")
+ if mps.type == 'RANGE':
+ if bones:
+ row.operator("pose.paths_range_update", text="", icon='TIME')
+ else:
+ row.operator("object.paths_range_update", text="", icon='TIME')
+
if mps.type == 'CURRENT_FRAME':
+ col = layout.column(align=True)
col.prop(mps, "frame_before", text="Frame Range Before")
col.prop(mps, "frame_after", text="After")
- col.prop(mps, "frame_step", text="Step")
-
- # Calculation Range
- col = layout.column(align=True)
- row = col.row(align=True)
- row.prop(mps, "range", text="Calculation Range")
+ col.prop(mps, "frame_step", text="Step")
+ elif mps.type == 'RANGE':
+ col = layout.column(align=True)
+ col.prop(mps, "frame_start", text="Frame Range Start")
+ col.prop(mps, "frame_end", text="End")
+ col.prop(mps, "frame_step", text="Step")
if mpath:
col = layout.column(align=True)
- row = col.row(align=True)
- row.enabled = False
- row.prop(mpath, "frame_start", text="Cached Range")
- row.prop(mpath, "frame_end", text="")
+ col.enabled = False
+ if bones:
+ col.prop(mpath, "frame_start", text="Bone Cache From")
+ else:
+ col.prop(mpath, "frame_start", text="Cache From")
+ col.prop(mpath, "frame_end", text="To")
col = layout.column(align=True)
- row = col.row(align=True)
+
if bones:
- row.operator("pose.paths_update", text="Update Paths", icon='BONE_DATA')
- row.operator("pose.paths_clear", text="", icon='X').only_selected = True
- row = col.row(align=True)
- row.operator("object.paths_update_visible", text="Update All Paths", icon='WORLD')
- row.operator("pose.paths_clear", text="", icon='X').only_selected = False
+ col.operator("pose.paths_update", text="Update Paths", icon='BONE_DATA')
else:
- row.operator("object.paths_update", text="Update Paths", icon='OBJECT_DATA')
- row.operator("object.paths_clear", text="", icon='X').only_selected = True
- row = col.row(align=True)
- row.operator("object.paths_update_visible", text="Update All Paths", icon='WORLD')
- row.operator("object.paths_clear", text="", icon='X').only_selected = False
+ col.operator("object.paths_update", text="Update Paths", icon='OBJECT_DATA')
else:
col = layout.column(align=True)
- col.label(text="No Motion Path generated yet", icon='ERROR')
+ col.label(text="Nothing to show yet...", icon='ERROR')
- # Don't invoke settings popup because settings are right above
- col.operator_context = 'EXEC_REGION_WIN'
if bones:
- col.operator(
- "pose.paths_calculate", text="Generate for selected bones", icon='BONE_DATA')
+ col.operator("pose.paths_calculate", text="Calculate...", icon='BONE_DATA')
else:
- col.operator("object.paths_calculate", text="Generate", icon='OBJECT_DATA')
- row = col.row(align=True)
- row.operator("object.paths_update_visible", text="Update All Paths", icon='WORLD')
- row.operator("object.paths_clear", text="", icon='X').only_selected = False
+ col.operator("object.paths_calculate", text="Calculate...", icon='OBJECT_DATA')
+
+ row = col.row(align=True)
+ row.operator("object.paths_update_visible", text="Update All Paths", icon='WORLD')
+ if bones:
+ row.operator("pose.paths_clear", text="", icon='X')
+ else:
+ row.operator("object.paths_clear", text="", icon='X')
class MotionPathButtonsPanel_display:
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 7b7fc9dcf77..8e328e7cf2b 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -663,10 +663,6 @@ class DOPESHEET_MT_context_menu(Menu):
layout.operator_menu_enum("action.mirror", "type", text="Mirror")
layout.operator_menu_enum("action.snap", "type", text="Snap")
- if st.mode == 'DOPESHEET':
- layout.separator()
- layout.menu("VIEW3D_MT_motion_path")
-
class DOPESHEET_MT_channel_context_menu(Menu):
bl_label = "Dope Sheet Channel Context Menu"
diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py
index 6bc11d51ca0..6f9ef12c3b7 100644
--- a/release/scripts/startup/bl_ui/space_graph.py
+++ b/release/scripts/startup/bl_ui/space_graph.py
@@ -390,9 +390,6 @@ class GRAPH_MT_context_menu(Menu):
layout.operator_menu_enum("graph.mirror", "type", text="Mirror")
layout.operator_menu_enum("graph.snap", "type", text="Snap")
- layout.separator()
- layout.menu("VIEW3D_MT_motion_path")
-
class GRAPH_MT_pivot_pie(Menu):
bl_label = "Pivot Point"
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 61fbabc5c4e..2208f7f33e7 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2390,25 +2390,6 @@ class VIEW3D_MT_object_clear(Menu):
layout.operator("object.origin_clear", text="Origin")
-class VIEW3D_MT_motion_path(Menu):
- bl_label = "Motion Paths"
-
- def draw(self, _context):
- layout = self.layout
- ob = _context.object
- if ob.mode == 'OBJECT':
- layout.operator("object.paths_calculate")
- layout.operator("object.paths_update")
- layout.operator("object.paths_update_visible")
- layout.operator("object.paths_clear", text="Clear all").only_selected = False
- layout.operator("object.paths_clear", text="Clear selected").only_selected = True
- elif ob.mode == 'POSE':
- layout.operator("pose.paths_calculate")
- layout.operator("pose.paths_update")
- layout.operator("pose.paths_clear", text="Clear all").only_selected = False
- layout.operator("pose.paths_clear", text="Clear selected").only_selected = True
-
-
class VIEW3D_MT_object_context_menu(Menu):
bl_label = "Object Context Menu"
@@ -2610,7 +2591,6 @@ class VIEW3D_MT_object_context_menu(Menu):
layout.menu("VIEW3D_MT_mirror")
layout.menu("VIEW3D_MT_snap")
layout.menu("VIEW3D_MT_object_parent")
- layout.menu("VIEW3D_MT_motion_path")
layout.operator_context = 'INVOKE_REGION_WIN'
if view and view.local_view:
@@ -3658,10 +3638,10 @@ class VIEW3D_MT_pose_context_menu(Menu):
layout.separator()
- layout.operator("pose.paths_calculate")
- layout.operator("pose.paths_update")
- layout.operator("pose.paths_clear", text="Clear all").only_selected = False
- layout.operator("pose.paths_clear", text="Clear selected").only_selected = True
+ layout.operator("pose.paths_calculate", text="Calculate Motion Paths")
+ layout.operator("pose.paths_clear", text="Clear Motion Paths")
+ layout.operator("pose.paths_update", text="Update Armature Motion Paths")
+ layout.operator("object.paths_update_visible", text="Update All Motion Paths")
layout.separator()
@@ -7657,7 +7637,6 @@ classes = (
VIEW3D_MT_object_quick_effects,
VIEW3D_MT_object_showhide,
VIEW3D_MT_object_cleanup,
- VIEW3D_MT_motion_path,
VIEW3D_MT_make_single_user,
VIEW3D_MT_make_links,
VIEW3D_MT_brush_paint_modes,