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:
authorLukas Stockner <lukas.stockner@freenet.de>2018-12-07 05:26:20 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2018-12-08 20:06:23 +0300
commite79bb957fc3d59a659d176cdd7f8b7faf5f0963f (patch)
tree4cf28ec1109363cc538fcc6c66ae1ecb5dce475d /source/blender/editors/include/ED_keyframing.h
parentaff9ccbade9ae74fb63becc842621eefef5abfa0 (diff)
User Interface: Add button color for indicating that the value differs from the interpolated one
One issue that especially newer users often run into is that they accidentally reset changes to the scene by switching frame without creating a keyframe first. Therefore, this commit adds a new color that is used to draw properties if their current value differs from the one that would be set when switching to this frame. This works both for existing keyframes as well as for currently interpolated frames. Unfortunately the flags in but->flag are full, so I had to move the new flag to but->drawflag and pass that to all relevant functions. I went with orange for the color since afaics it fits with the green and yellow that are currently used for keyframe states and since it's somewhat reddish to signify that there might be something to look out for here. Reviewers: campbellbarton, #user_interface, brecht Reviewed By: campbellbarton Subscribers: brecht, predoe Differential Revision: https://developer.blender.org/D3949
Diffstat (limited to 'source/blender/editors/include/ED_keyframing.h')
-rw-r--r--source/blender/editors/include/ED_keyframing.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index ed38e9cae58..b42fdf456e0 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -360,6 +360,12 @@ bool autokeyframe_cfra_can_key(struct Scene *scene, struct ID *id);
*/
bool fcurve_frame_has_keyframe(struct FCurve *fcu, float frame, short filter);
+/* Lesser Keyframe Checking API call:
+ * - Returns whether the current value of a given property differs from the interpolated value.
+ * - Used for button drawing.
+ */
+bool fcurve_is_changed(struct PointerRNA ptr, struct PropertyRNA *prop, struct FCurve *fcu, float frame);
+
/* Main Keyframe Checking API call:
* Checks whether a keyframe exists for the given ID-block one the given frame.
* - It is recommended to call this method over the other keyframe-checkers directly,