Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_handlers.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
| #include "BLI_rect.h" | #include "BLI_rect.h" | ||||
| #include "BLI_string.h" | #include "BLI_string.h" | ||||
| #include "BLI_string_cursor_utf8.h" | #include "BLI_string_cursor_utf8.h" | ||||
| #include "BLI_string_utf8.h" | #include "BLI_string_utf8.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "PIL_time.h" | #include "PIL_time.h" | ||||
| #include "BKE_animsys.h" | |||||
| #include "BKE_blender_undo.h" | #include "BKE_blender_undo.h" | ||||
| #include "BKE_brush.h" | #include "BKE_brush.h" | ||||
| #include "BKE_colorband.h" | #include "BKE_colorband.h" | ||||
| #include "BKE_colortools.h" | #include "BKE_colortools.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_curveprofile.h" | #include "BKE_curveprofile.h" | ||||
| #include "BKE_movieclip.h" | #include "BKE_movieclip.h" | ||||
| #include "BKE_paint.h" | #include "BKE_paint.h" | ||||
| ▲ Show 20 Lines • Show All 8,345 Lines • ▼ Show 20 Lines | wmOperator *UI_context_active_operator_get(const struct bContext *C) | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| /* helper function for insert keyframe, reset to default, etc operators */ | /* helper function for insert keyframe, reset to default, etc operators */ | ||||
| void UI_context_update_anim_flag(const bContext *C) | void UI_context_update_anim_flag(const bContext *C) | ||||
| { | { | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| ARegion *region = CTX_wm_region(C); | ARegion *region = CTX_wm_region(C); | ||||
| struct Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); | |||||
| const AnimationEvalContext anim_eval_context = BKE_animsys_eval_context_construct( | |||||
| depsgraph, (scene) ? scene->r.cfra : 0.0f); | |||||
| uiBlock *block; | uiBlock *block; | ||||
| uiBut *but, *activebut; | uiBut *but, *activebut; | ||||
| while (region) { | while (region) { | ||||
| /* find active button */ | /* find active button */ | ||||
| activebut = NULL; | activebut = NULL; | ||||
| for (block = region->uiblocks.first; block; block = block->next) { | for (block = region->uiblocks.first; block; block = block->next) { | ||||
| for (but = block->buttons.first; but; but = but->next) { | for (but = block->buttons.first; but; but = but->next) { | ||||
| ui_but_anim_flag(but, (scene) ? scene->r.cfra : 0.0f); | ui_but_anim_flag(but, &anim_eval_context); | ||||
| ui_but_override_flag(CTX_data_main(C), but); | ui_but_override_flag(CTX_data_main(C), but); | ||||
| if (UI_but_is_decorator(but)) { | if (UI_but_is_decorator(but)) { | ||||
| ui_but_anim_decorate_update_from_flag(but); | ui_but_anim_decorate_update_from_flag(but); | ||||
| } | } | ||||
| ED_region_tag_redraw(region); | ED_region_tag_redraw(region); | ||||
| if (but->active) { | if (but->active) { | ||||
| ▲ Show 20 Lines • Show All 2,641 Lines • Show Last 20 Lines | |||||