2.5: Added basic insert/remove keyframes from UI buttons.
- I key over a button inserts a keyframe. - Alt+I removes a keyframe. - With right mouse button a menu with these options pops up. - Buttons are colored green if the property is animated, yellow if it is on a keyframe. I followed the colors from the UI mockups, but the flicker on keyframes seems too distracting in practice? - This only works for properties on the ID itself at the moment, path callbacks need to be filled in for all structs but mesh still. - It doesn't work when you're over a related label, that needs to be made to work. - I made it insert keyframes outside of any keyingset. Not sure how this is supposed to integrate?
This commit is contained in:
@@ -131,6 +131,8 @@ typedef struct uiPopupBlockHandle uiPopupBlockHandle;
|
||||
#define UI_BUT_DISABLED (1<<18)
|
||||
/* dont draw hilite on mouse over */
|
||||
#define UI_NO_HILITE (1<<19)
|
||||
#define UI_BUT_ANIMATED (1<<20)
|
||||
#define UI_BUT_ANIMATED_KEY (1<<21)
|
||||
|
||||
/* Button types, bits stored in 1 value... and a short even!
|
||||
- bits 0-4: bitnr (0-31)
|
||||
@@ -626,5 +628,9 @@ typedef void (*uiPanelCreateFunc)(const struct bContext *C, uiLayout *layout);
|
||||
void uiRegionPanelLayout(const struct bContext *C, struct ARegion *ar, int vertical, char *context);
|
||||
void uiRegionHeaderLayout(const struct bContext *C, struct ARegion *ar);
|
||||
|
||||
/* Animation */
|
||||
|
||||
void uiAnimContextProperty(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index);
|
||||
|
||||
#endif /* UI_INTERFACE_H */
|
||||
|
||||
|
Reference in New Issue
Block a user