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>2018-10-12 02:42:12 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-12 02:42:12 +0300
commitfcc88a6bf04c7f88c71ead1e2e26d2f421cdbf83 (patch)
treec2f6484f3019dfcfbc94701a6f885638e7115584 /source/blender/editors/gpencil/drawgpencil.c
parentbbc557109309876c3b07018755757e3e3c2a583e (diff)
Cleanup: use generic macro
Diffstat (limited to 'source/blender/editors/gpencil/drawgpencil.c')
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index bb25a9189eb..d64c3faae1b 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -1536,18 +1536,12 @@ static void gp_draw_data_layers(RegionView3D *rv3d,
* NOTE: If the setting doesn't apply, it *must* be cleared,
* as dflag's carry over from the previous layer
*/
-#define GP_DRAWFLAG_APPLY(condition, draw_flag_value) { \
- if (condition) dflag |= (draw_flag_value); \
- else dflag &= ~(draw_flag_value); \
- } (void)0
/* xray... */
- GP_DRAWFLAG_APPLY((gpl->flag & GP_LAYER_NO_XRAY), GP_DRAWDATA_NO_XRAY);
+ SET_FLAG_FROM_TEST(dflag, gpl->flag & GP_LAYER_NO_XRAY, GP_DRAWDATA_NO_XRAY);
/* volumetric strokes... */
- GP_DRAWFLAG_APPLY((gpl->flag & GP_LAYER_VOLUMETRIC), GP_DRAWDATA_VOLUMETRIC);
-
-#undef GP_DRAWFLAG_APPLY
+ SET_FLAG_FROM_TEST(dflag, gpl->flag & GP_LAYER_VOLUMETRIC, GP_DRAWDATA_VOLUMETRIC);
tgpw.gpl = gpl;
tgpw.gpf = gpf;