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:
authorCampbell Barton <ideasman42@gmail.com>2019-02-02 05:39:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-02 05:49:13 +0300
commitafcbf7cf1357723f59eca8e118a0ca9ef6cf6555 (patch)
tree95c520cd1e556f3cf1fa0a799bc23efe649cf22c /source/blender/editors
parenta53011d52012067ad1334d654a68c97327005626 (diff)
Cleanup: use G_FLAG_*/G_FILE_* for G.f/fileflags
Was confusing eg: G_AUTOPACK belonged to G.fileflags, G_PICKSEL to G.f.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/gpencil/annotate_draw.c6
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c8
-rw-r--r--source/blender/editors/render/render_opengl.c4
-rw-r--r--source/blender/editors/sound/sound_ops.c4
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c2
-rw-r--r--source/blender/editors/space_image/image_ops.c4
-rw-r--r--source/blender/editors/space_info/info_ops.c12
-rw-r--r--source/blender/editors/space_view3d/drawobject.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_draw_legacy.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c4
11 files changed, 27 insertions, 27 deletions
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c
index ea8f2731bb8..d4f328a0071 100644
--- a/source/blender/editors/gpencil/annotate_draw.c
+++ b/source/blender/editors/gpencil/annotate_draw.c
@@ -848,7 +848,7 @@ static void gp_draw_data_layers(
* (NOTE: doing it this way means that the toggling editmode shows visible change immediately)
*/
/* XXX: perhaps we don't want to show these when users are drawing... */
- if ((G.f & G_RENDER_OGL) == 0 &&
+ if ((G.f & G_FLAG_RENDER_VIEWPORT) == 0 &&
(gpl->flag & GP_LAYER_LOCKED) == 0 &&
(gpd->flag & GP_DATA_STROKE_EDITMODE))
{
@@ -881,7 +881,7 @@ static void gp_draw_status_text(const bGPdata *gpd, ARegion *ar)
rcti rect;
/* Cannot draw any status text when drawing OpenGL Renders */
- if (G.f & G_RENDER_OGL)
+ if (G.f & G_FLAG_RENDER_VIEWPORT)
return;
/* Get bounds of region - Necessary to avoid problems with region overlap */
@@ -1099,7 +1099,7 @@ void ED_gpencil_draw_view3d_annotations(
/* when rendering to the offscreen buffer we don't want to
* deal with the camera border, otherwise map the coords to the camera border. */
- if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_RENDER_OGL)) {
+ if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_FLAG_RENDER_VIEWPORT)) {
rctf rectf;
ED_view3d_calc_camera_border(scene, depsgraph, ar, v3d, rv3d, &rectf, true); /* no shift */
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index d94a505ad1b..2de17623ad9 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -1476,7 +1476,7 @@ static void gp_draw_data_layers(RegionView3D *rv3d,
* (NOTE: doing it this way means that the toggling editmode shows visible change immediately)
*/
/* XXX: perhaps we don't want to show these when users are drawing... */
- if ((G.f & G_RENDER_OGL) == 0 &&
+ if ((G.f & G_FLAG_RENDER_VIEWPORT) == 0 &&
(gpl->flag & GP_LAYER_LOCKED) == 0 &&
(gpd->flag & GP_DATA_STROKE_EDITMODE))
{
@@ -1518,7 +1518,7 @@ static void UNUSED_FUNCTION(gp_draw_status_text)(const bGPdata *gpd, ARegion *ar
rcti rect;
/* Cannot draw any status text when drawing OpenGL Renders */
- if (G.f & G_RENDER_OGL)
+ if (G.f & G_FLAG_RENDER_VIEWPORT)
return;
/* Get bounds of region - Necessary to avoid problems with region overlap */
@@ -1643,7 +1643,7 @@ void ED_gpencil_draw_view3d(
/* when rendering to the offscreen buffer we don't want to
* deal with the camera border, otherwise map the coords to the camera border. */
- if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_RENDER_OGL)) {
+ if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_FLAG_RENDER_VIEWPORT)) {
rctf rectf;
ED_view3d_calc_camera_border(scene, depsgraph, ar, v3d, rv3d, &rectf, true); /* no shift */
@@ -1699,7 +1699,7 @@ void ED_gpencil_draw_view3d_object(wmWindowManager *wm, Scene *scene, Depsgraph
/* when rendering to the offscreen buffer we don't want to
* deal with the camera border, otherwise map the coords to the camera border. */
- if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_RENDER_OGL)) {
+ if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_FLAG_RENDER_VIEWPORT)) {
rctf rectf;
ED_view3d_calc_camera_border(scene, depsgraph, ar, v3d, rv3d, &rectf, true); /* no shift */
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 9d9edc77b93..accd0fcdc5d 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -324,10 +324,10 @@ static void screen_opengl_render_doit(const bContext *C, OGLRender *oglrender, R
wmOrtho2(0, sizex, 0, sizey);
GPU_matrix_translate_2f(sizex / 2, sizey / 2);
- G.f |= G_RENDER_OGL;
+ G.f |= G_FLAG_RENDER_VIEWPORT;
ED_gpencil_draw_ex(
view_layer, rv3d, scene, gpd, sizex, sizey, scene->r.cfra, SPACE_SEQ);
- G.f &= ~G_RENDER_OGL;
+ G.f &= ~G_FLAG_RENDER_VIEWPORT;
gp_rect = MEM_mallocN(sizex * sizey * sizeof(unsigned char) * 4, "offscreen rect");
GPU_offscreen_read_pixels(oglrender->ofs, GL_UNSIGNED_BYTE, gp_rect);
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index fe136ddc712..805d10583ba 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -759,7 +759,7 @@ static int sound_unpack_exec(bContext *C, wmOperator *op)
if (!sound || !sound->packedfile)
return OPERATOR_CANCELLED;
- if (G.fileflags & G_AUTOPACK)
+ if (G.fileflags & G_FILE_AUTOPACK)
BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save");
unpackSound(bmain, op->reports, sound, method);
@@ -783,7 +783,7 @@ static int sound_unpack_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
if (!sound || !sound->packedfile)
return OPERATOR_CANCELLED;
- if (G.fileflags & G_AUTOPACK)
+ if (G.fileflags & G_FILE_AUTOPACK)
BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save");
unpack_menu(C, "SOUND_OT_unpack", sound->id.name + 2, sound->name, "sounds", sound->packedfile);
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 7b7920bcbb0..93f4d9a36bd 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -818,7 +818,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, ID *id, FCurve *f
uiItemL(col, IFACE_("ERROR: Invalid Python expression"), ICON_CANCEL);
}
else if (!BKE_driver_has_simple_expression(driver)) {
- if ((G.f & G_SCRIPT_AUTOEXEC) == 0) {
+ if ((G.f & G_FLAG_SCRIPT_AUTOEXEC) == 0) {
/* TODO: Add button to enable? */
uiItemL(col, IFACE_("WARNING: Python expressions limited for security"), ICON_ERROR);
}
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 8221227bdd1..60c7b4e2b66 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -2810,7 +2810,7 @@ static int image_unpack_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- if (G.fileflags & G_AUTOPACK)
+ if (G.fileflags & G_FILE_AUTOPACK)
BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save");
/* XXX unpackImage frees image buffers */
@@ -2838,7 +2838,7 @@ static int image_unpack_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
return OPERATOR_CANCELLED;
}
- if (G.fileflags & G_AUTOPACK)
+ if (G.fileflags & G_FILE_AUTOPACK)
BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save");
unpack_menu(C, "IMAGE_OT_unpack", ima->id.name + 2, ima->name, "textures", BKE_image_has_packedfile(ima) ? ((ImagePackedFile *)ima->packedfiles.first)->packedfile : NULL);
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
index 82927bd21b1..d9932436413 100644
--- a/source/blender/editors/space_info/info_ops.c
+++ b/source/blender/editors/space_info/info_ops.c
@@ -123,12 +123,12 @@ static int autopack_toggle_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
- if (G.fileflags & G_AUTOPACK) {
- G.fileflags &= ~G_AUTOPACK;
+ if (G.fileflags & G_FILE_AUTOPACK) {
+ G.fileflags &= ~G_FILE_AUTOPACK;
}
else {
packAll(bmain, op->reports, true);
- G.fileflags |= G_AUTOPACK;
+ G.fileflags |= G_FILE_AUTOPACK;
}
return OPERATOR_FINISHED;
@@ -219,7 +219,7 @@ static int unpack_all_exec(bContext *C, wmOperator *op)
int method = RNA_enum_get(op->ptr, "method");
if (method != PF_KEEP) unpackAll(bmain, op->reports, method); /* XXX PF_ASK can't work here */
- G.fileflags &= ~G_AUTOPACK;
+ G.fileflags &= ~G_FILE_AUTOPACK;
return OPERATOR_FINISHED;
}
@@ -236,7 +236,7 @@ static int unpack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(
if (!count) {
BKE_report(op->reports, RPT_WARNING, "No packed files to unpack");
- G.fileflags &= ~G_AUTOPACK;
+ G.fileflags &= ~G_FILE_AUTOPACK;
return OPERATOR_CANCELLED;
}
@@ -304,7 +304,7 @@ static int unpack_item_exec(bContext *C, wmOperator *op)
if (method != PF_KEEP)
BKE_unpack_id(bmain, id, op->reports, method); /* XXX PF_ASK can't work here */
- G.fileflags &= ~G_AUTOPACK;
+ G.fileflags &= ~G_FILE_AUTOPACK;
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 25524ec62dc..79c4705c915 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -64,7 +64,7 @@ static bool check_ob_drawface_dot(Scene *sce, View3D *vd, char dt)
if ((sce->toolsettings->selectmode & SCE_SELECT_FACE) == 0)
return false;
- if (G.f & G_BACKBUFSEL)
+ if (G.f & G_FLAG_BACKBUFSEL)
return false;
/* if its drawing textures with zbuf sel, then don't draw dots */
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 33611db0c4e..1bcac0d1068 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1420,7 +1420,7 @@ void ED_view3d_draw_offscreen(
UI_SetTheme(SPACE_VIEW3D, RGN_TYPE_WINDOW);
/* set flags */
- G.f |= G_RENDER_OGL;
+ G.f |= G_FLAG_RENDER_VIEWPORT;
{
/* free images which can have changed on frame-change
@@ -1453,7 +1453,7 @@ void ED_view3d_draw_offscreen(
UI_Theme_Restore(&theme_state);
- G.f &= ~G_RENDER_OGL;
+ G.f &= ~G_FLAG_RENDER_VIEWPORT;
}
/**
diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c
index 5213307db3a..7a358c46f75 100644
--- a/source/blender/editors/space_view3d/view3d_draw_legacy.c
+++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c
@@ -229,7 +229,7 @@ static void backdrawview3d(
if (rv3d->rflag & RV3D_CLIPPING)
ED_view3d_clipping_set(rv3d);
- G.f |= G_BACKBUFSEL;
+ G.f |= G_FLAG_BACKBUFSEL;
if (obact_eval && ((obact_eval->base_flag & BASE_VISIBLE) != 0)) {
draw_object_backbufsel(depsgraph, scene_eval, v3d, rv3d, obact_eval, select_mode);
@@ -240,7 +240,7 @@ static void backdrawview3d(
v3d->flag &= ~V3D_INVALID_BACKBUF;
- G.f &= ~G_BACKBUFSEL;
+ G.f &= ~G_FLAG_BACKBUFSEL;
GPU_depth_test(false);
glEnable(GL_DITHER);
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index bc8377896a9..0dead55ca46 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -1024,7 +1024,7 @@ int view3d_opengl_select(
/* All of the queries need to be perform on the drawing context. */
DRW_opengl_context_enable();
- G.f |= G_PICKSEL;
+ G.f |= G_FLAG_PICKSEL;
/* Important we use the 'viewmat' and don't re-calculate since
* the object & bone view locking takes 'rect' into account, see: T51629. */
@@ -1082,7 +1082,7 @@ int view3d_opengl_select(
hits = drw_select_loop_user_data.hits;
}
- G.f &= ~G_PICKSEL;
+ G.f &= ~G_FLAG_PICKSEL;
ED_view3d_draw_setup_view(vc->win, depsgraph, scene, ar, v3d, vc->rv3d->viewmat, NULL, NULL);
if (v3d->shading.type > OB_WIRE) {