Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface.c
| Show All 38 Lines | |||||
| #include "BLI_listbase.h" | #include "BLI_listbase.h" | ||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLI_rect.h" | #include "BLI_rect.h" | ||||
| #include "BLI_string.h" | #include "BLI_string.h" | ||||
| #include "BLI_string_utf8.h" | #include "BLI_string_utf8.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BKE_animsys.h" | |||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_idprop.h" | #include "BKE_idprop.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "BKE_unit.h" | #include "BKE_unit.h" | ||||
| #include "GPU_glew.h" | #include "GPU_glew.h" | ||||
| ▲ Show 20 Lines • Show All 1,675 Lines • ▼ Show 20 Lines | void UI_block_update_from_old(const bContext *C, uiBlock *block) | ||||
| block->oldblock = NULL; | block->oldblock = NULL; | ||||
| } | } | ||||
| void UI_block_end_ex(const bContext *C, uiBlock *block, const int xy[2], int r_xy[2]) | void UI_block_end_ex(const bContext *C, uiBlock *block, const int xy[2], int r_xy[2]) | ||||
| { | { | ||||
| wmWindow *window = CTX_wm_window(C); | wmWindow *window = CTX_wm_window(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); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); | |||||
| uiBut *but; | uiBut *but; | ||||
| BLI_assert(block->active); | BLI_assert(block->active); | ||||
| UI_block_update_from_old(C, block); | UI_block_update_from_old(C, block); | ||||
| /* inherit flags from 'old' buttons that was drawn here previous, based | /* inherit flags from 'old' buttons that was drawn here previous, based | ||||
| * on matching buttons, we need this to make button event handling non | * on matching buttons, we need this to make button event handling non | ||||
| Show All 12 Lines | if (but->optype) { | ||||
| but->flag |= UI_BUT_DISABLED; | but->flag |= UI_BUT_DISABLED; | ||||
| } | } | ||||
| if (but->context) { | if (but->context) { | ||||
| CTX_store_set((bContext *)C, NULL); | CTX_store_set((bContext *)C, NULL); | ||||
| } | } | ||||
| } | } | ||||
| ui_but_anim_flag(but, (scene) ? scene->r.cfra : 0.0f); | const AnimationEvalContext anim_eval_context = BKE_animsys_eval_context( | ||||
| depsgraph, (scene) ? scene->r.cfra : 0.0f); | |||||
| ui_but_anim_flag(but, &anim_eval_context); | |||||
| ui_but_override_flag(but); | ui_but_override_flag(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); | ||||
| } | } | ||||
| ui_but_predefined_extra_operator_icons_add(but); | ui_but_predefined_extra_operator_icons_add(but); | ||||
| } | } | ||||
| /* handle pending stuff */ | /* handle pending stuff */ | ||||
| ▲ Show 20 Lines • Show All 5,061 Lines • Show Last 20 Lines | |||||