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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-06-02 03:09:12 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-06-02 13:47:52 +0300
commit114973584d49daa2020345970b696878ebc49cf7 (patch)
tree0889a7cafb8f409b28b5b79bee2b4107527ed7d6 /source/blender
parentf332a711800879dac9ff8ef816793e6a55dc64ea (diff)
Cleanup: better comments and naming for redraw flags
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/interface/interface_region_popup.c6
-rw-r--r--source/blender/makesdna/DNA_screen_types.h19
2 files changed, 17 insertions, 8 deletions
diff --git a/source/blender/editors/interface/interface_region_popup.c b/source/blender/editors/interface/interface_region_popup.c
index bd87439ca9e..f3e18cc2f24 100644
--- a/source/blender/editors/interface/interface_region_popup.c
+++ b/source/blender/editors/interface/interface_region_popup.c
@@ -375,12 +375,12 @@ static void ui_block_region_refresh(const bContext *C, ARegion *ar)
ARegion *ctx_region = CTX_wm_region(C);
uiBlock *block;
- if (ar->do_draw & RGN_DRAW_REFRESH_UI) {
+ if (ar->do_draw & RGN_REFRESH_UI) {
ScrArea *handle_ctx_area;
ARegion *handle_ctx_region;
uiBlock *block_next;
- ar->do_draw &= ~RGN_DRAW_REFRESH_UI;
+ ar->do_draw &= ~RGN_REFRESH_UI;
for (block = ar->uiblocks.first; block; block = block_next) {
block_next = block->next;
uiPopupBlockHandle *handle = block->handle;
@@ -772,7 +772,7 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C,
handle->ctx_area = CTX_wm_area(C);
handle->ctx_region = CTX_wm_region(C);
- /* store vars to refresh popup (RGN_DRAW_REFRESH_UI) */
+ /* store vars to refresh popup (RGN_REFRESH_UI) */
handle->popup_create_vars.create_func = create_func;
handle->popup_create_vars.handle_create_func = handle_create_func;
handle->popup_create_vars.arg = arg;
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index f5c2a518ef6..8ac73d3ae7a 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -640,10 +640,19 @@ enum {
};
/** #ARegion.do_draw */
-#define RGN_DRAW 1
-#define RGN_DRAW_PARTIAL 2
-#define RGN_DRAWING 4
-#define RGN_DRAW_REFRESH_UI 8 /* re-create uiBlock's where possible */
-#define RGN_DRAW_NO_REBUILD 16
+enum {
+ /* Region must be fully redrawn. */
+ RGN_DRAW = 1,
+ /* Redraw only part of region, for sculpting and painting to get smoother
+ * stroke painting on heavy meshes. */
+ RGN_DRAW_PARTIAL = 2,
+ /* For outliner, to do faster redraw without rebuilding outliner tree. */
+ RGN_DRAW_NO_REBUILD = 4,
+
+ /* Set while region is being drawn. */
+ RGN_DRAWING = 8,
+ /* For popups, to refresh UI layout along with drawing. */
+ RGN_REFRESH_UI = 16,
+};
#endif /* __DNA_SCREEN_TYPES_H__ */