Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/screen_ops.c
| Show First 20 Lines • Show All 4,268 Lines • ▼ Show 20 Lines | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Animation Step Operator | /** \name Animation Step Operator | ||||
| * | * | ||||
| * Animation Step. | * Animation Step. | ||||
| * \{ */ | * \{ */ | ||||
| static bool match_region_with_redraws(eSpace_Type spacetype, | static bool match_region_with_redraws(const ScrArea *area, | ||||
| eRegionType regiontype, | eRegionType regiontype, | ||||
| eScreen_Redraws_Flag redraws, | eScreen_Redraws_Flag redraws, | ||||
| bool from_anim_edit) | bool from_anim_edit) | ||||
| { | { | ||||
| const eSpace_Type spacetype = area->spacetype; | |||||
| if (regiontype == RGN_TYPE_WINDOW) { | if (regiontype == RGN_TYPE_WINDOW) { | ||||
| switch (spacetype) { | switch (spacetype) { | ||||
| case SPACE_VIEW3D: | case SPACE_VIEW3D: | ||||
| if ((redraws & TIME_ALL_3D_WIN) || from_anim_edit) { | if ((redraws & TIME_ALL_3D_WIN) || from_anim_edit) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| break; | break; | ||||
| ▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | else if (regiontype == RGN_TYPE_UI) { | ||||
| } | } | ||||
| if (redraws & TIME_ALL_BUTS_WIN) { | if (redraws & TIME_ALL_BUTS_WIN) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| } | } | ||||
| else if (regiontype == RGN_TYPE_HEADER) { | else if (regiontype == RGN_TYPE_HEADER) { | ||||
| if (spacetype == SPACE_ACTION) { | if (spacetype == SPACE_ACTION) { | ||||
| return true; | /* The timeline shows the current frame in the header. Other headers | ||||
| * don't need to be updated. */ | |||||
| SpaceAction *saction = (SpaceAction *)area->spacedata.first; | |||||
| return saction->mode == SACTCONT_TIMELINE; | |||||
| } | } | ||||
| } | } | ||||
| else if (regiontype == RGN_TYPE_PREVIEW) { | else if (regiontype == RGN_TYPE_PREVIEW) { | ||||
| switch (spacetype) { | switch (spacetype) { | ||||
| case SPACE_SEQ: | case SPACE_SEQ: | ||||
| if (redraws & (TIME_SEQ | TIME_ALL_ANIM_WIN)) { | if (redraws & (TIME_SEQ | TIME_ALL_ANIM_WIN)) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 180 Lines • ▼ Show 20 Lines | for (window = wm->windows.first; window; window = window->next) { | ||||
| for (area = win_screen->areabase.first; area; area = area->next) { | for (area = win_screen->areabase.first; area; area = area->next) { | ||||
| ARegion *region; | ARegion *region; | ||||
| for (region = area->regionbase.first; region; region = region->next) { | for (region = area->regionbase.first; region; region = region->next) { | ||||
| bool redraw = false; | bool redraw = false; | ||||
| if (region == sad->region) { | if (region == sad->region) { | ||||
| redraw = true; | redraw = true; | ||||
| } | } | ||||
| else if (match_region_with_redraws( | else if (match_region_with_redraws( | ||||
| area->spacetype, region->regiontype, sad->redraws, sad->from_anim_edit)) { | area, region->regiontype, sad->redraws, sad->from_anim_edit)) { | ||||
| redraw = true; | redraw = true; | ||||
| } | } | ||||
| if (redraw) { | if (redraw) { | ||||
| ED_region_tag_redraw(region); | ED_region_tag_redraw(region); | ||||
| /* do follow here if editor type supports it */ | /* do follow here if editor type supports it */ | ||||
| if ((sad->redraws & TIME_FOLLOW)) { | if ((sad->redraws & TIME_FOLLOW)) { | ||||
| if ((region->regiontype == RGN_TYPE_WINDOW && | if ((region->regiontype == RGN_TYPE_WINDOW && | ||||
| ▲ Show 20 Lines • Show All 1,046 Lines • Show Last 20 Lines | |||||