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:
authorColin Marmont <Kdaf>2022-02-28 14:23:56 +0300
committerSybren A. Stüvel <sybren@blender.org>2022-02-28 14:28:19 +0300
commit1558b270e9fcbc2e23fa248b0e7e770dddae155c (patch)
tree1377db616df34efcb147664788808d85338ba19d /source/blender/editors/include
parent6f23401e984ee5bad621109ff78eeb6850044fee (diff)
Animation: Sensible frame range for motion paths
Motion paths can now be initialised to more sensible frame ranges, rather than simply 1-250: - Scene Frame Range - Selected Keyframes - All Keyframes The Motion Paths operators are now also added to the Object context menu and the Dopesheet context menu. The scene range operator was removed, because the operators now automatically find the range when baking the motion paths. The clear operator now appears separated in "Selected Only" and "All", because it was not clear for the user what the button was doing. Reviewed By: sybren, looch Maniphest Tasks: T93047 Differential Revision: https://developer.blender.org/D13687
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_anim_api.h9
-rw-r--r--source/blender/editors/include/ED_keyframes_keylist.h6
2 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index e6a68f7fab7..3e045c9c43a 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -1090,6 +1090,15 @@ void animviz_calc_motionpaths(struct Depsgraph *depsgraph,
bool restore);
/**
+ * Update motion path computation range (in ob.avs or armature.avs) from user choice in
+ * ob.avs.path_range or arm.avs.path_range, depending on active user mode.
+ *
+ * @param ob: Object to compute range for (must be provided)
+ * @param scene: Used when scene range is choosen
+ */
+void animviz_motionpath_compute_range(struct Object *ob, struct Scene *scene);
+
+/**
* Get list of motion paths to be baked for the given object.
* - assumes the given list is ready to be used.
*/
diff --git a/source/blender/editors/include/ED_keyframes_keylist.h b/source/blender/editors/include/ED_keyframes_keylist.h
index 6a8820d0083..39f050c9739 100644
--- a/source/blender/editors/include/ED_keyframes_keylist.h
+++ b/source/blender/editors/include/ED_keyframes_keylist.h
@@ -131,7 +131,11 @@ const struct ActKeyColumn *ED_keylist_find_any_between(const struct AnimKeylist
const Range2f frame_range);
bool ED_keylist_is_empty(const struct AnimKeylist *keylist);
const struct ListBase /* ActKeyColumn */ *ED_keylist_listbase(const struct AnimKeylist *keylist);
-bool ED_keylist_frame_range(const struct AnimKeylist *keylist, Range2f *r_frame_range);
+bool ED_keylist_all_keys_frame_range(const struct AnimKeylist *keylist, Range2f *r_frame_range);
+/* Return the selected keyframe's range. If none are selected, return False and does not affect
+ * the frame range. */
+bool ED_keylist_selected_keys_frame_range(const struct AnimKeylist *keylist,
+ Range2f *r_frame_range);
const ActKeyColumn *ED_keylist_array(const struct AnimKeylist *keylist);
int64_t ED_keylist_array_len(const struct AnimKeylist *keylist);