Fix macro problem with clang/gcc

This commit is contained in:
Joseph Eagar 2021-09-28 11:35:51 -07:00
parent 8a99bc0829
commit 486627215c
3 changed files with 49 additions and 53 deletions

View File

@ -162,7 +162,7 @@ void BKE_brush_tex_patch_channels(BrushTex *btex);
void BKE_brush_tex_from_mtex(BrushTex *btex, MTex *mtex);
// initializes the internal mtex struct
void BKE_brush_tex_start(BrushTex *btex, BrushChannelSet *chset);
void BKE_brush_tex_start(BrushTex *btex, BrushChannelSet *chset, BrushMappingData *mapdata);
#define MAKE_BRUSHTEX_SLOTS 5

View File

@ -102,19 +102,16 @@ places in rna_engine_codebase are relevent:
# define MAKE_FLOAT3(idname, name, tooltip, x, y, z, min, max) MAKE_BUILTIN_CH_DEF(idname);
# define MAKE_FLOAT3_EX(idname, name, tooltip, x, y, z, min, max, smin, smax, flag) \
MAKE_BUILTIN_CH_DEF(idname);
# define MAKE_ENUM(idname1, name1, tooltip1, value1, enumdef1) MAKE_BUILTIN_CH_DEF(idname1);
# define MAKE_ENUM_EX(idname1, name1, tooltip1, value1, enumdef1, flag) \
# define MAKE_ENUM(idname1, name1, tooltip1, value1, enumdef1, ...) MAKE_BUILTIN_CH_DEF(idname1);
# define MAKE_ENUM_EX(idname1, name1, tooltip1, value1, flag1, enumdef1, ...) \
MAKE_BUILTIN_CH_DEF(idname1);
# define MAKE_FLAGS(idname1, name1, tooltip1, value1, enumdef1) MAKE_BUILTIN_CH_DEF(idname1);
# define MAKE_FLAGS_EX(idname1, name1, tooltip1, value1, enumdef1, flag1) \
# define MAKE_FLAGS(idname1, name1, tooltip1, value1, enumdef1, ...) MAKE_BUILTIN_CH_DEF(idname1);
# define MAKE_FLAGS_EX(idname1, name1, tooltip1, value1, flag1, enumdef1, ...) \
MAKE_BUILTIN_CH_DEF(idname1);
# define MAKE_CURVE(idname1, name1, tooltip1, preset1) MAKE_BUILTIN_CH_DEF(idname1);
#else
#endif
// annoying trick to pass array initializers through macro arguments
#define _(...) __VA_ARGS__
/* clang-format off */
MAKE_FLOAT_EX(radius, "Radius", "Radius of the brush in pixels", 50.0f, 0.5f, MAX_BRUSH_PIXEL_RADIUS*10, 0.5, MAX_BRUSH_PIXEL_RADIUS, false)
MAKE_FLOAT_EX(strength, "Strength", "How powerful the effect of the brush is when applied", 0.5f, 0.0f, 10.0f, 0.0f, 1.0f, false)
@ -138,15 +135,15 @@ places in rna_engine_codebase are relevent:
MAKE_BOOL(autosmooth_use_spacing, "Use Auto-Smooth Spacing", "Use custom spacing for autosmooth", false)
MAKE_FLOAT_EX(topology_rake_spacing, "Rake Spacing", "Topology rake stroke spacing", 13.0f, 0.05f, 1000.0f, 0.1f, 300.0f, false)
MAKE_FLOAT_EX(autosmooth_spacing, "Auto-Smooth Spacing", "Autosmooth stroke spacing", 13.0f, 0.05f, 1000.0f, 0.1f, 300.0f, false)
MAKE_ENUM(topology_rake_mode, "Topology Rake Mode", "", 1, _({
MAKE_ENUM(topology_rake_mode, "Topology Rake Mode", "", 1, {
{0, "BRUSH_DIRECTION", ICON_NONE, "Stroke", "Stroke Direction"},
{1, "CURVATURE", ICON_NONE, "Curvature", "Follow mesh curvature"},
{-1},
}))
{-1}
})
MAKE_FLOAT_EX_EX(smooth_strength_factor, "Smooth Strength", "Factor to control the strength of shift-smooth", 0.1f, 0.0f, 10.0f, 0.0f, 2.0f, false, false, BRUSH_CHANNEL_INHERIT)
MAKE_FLAGS_EX(automasking, "Automasking", "", 0, _({
MAKE_FLAGS_EX(automasking, "Automasking", "", 0, BRUSH_CHANNEL_INHERIT_IF_UNSET, {\
{BRUSH_AUTOMASKING_BOUNDARY_EDGES, "BOUNDARY_EDGE", ICON_NONE, "Boundary Edges", ""},
{BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, "BOUNDARY_FACE_SETS", ICON_NONE, "Boundary Face Sets", ""},
{BRUSH_AUTOMASKING_CONCAVITY, "CONCAVITY", ICON_NONE, "Cavity", ""},
@ -154,33 +151,33 @@ places in rna_engine_codebase are relevent:
{BRUSH_AUTOMASKING_FACE_SETS, "FACE_SETS", ICON_NONE, "Face Sets", ""},
{BRUSH_AUTOMASKING_TOPOLOGY, "TOPOLOGY", ICON_NONE, "Topology", ""},
{-1},
}), BRUSH_CHANNEL_INHERIT_IF_UNSET)
})
MAKE_BOOL_EX(dyntopo_disabled, "Disable Dyntopo", "", false, BRUSH_CHANNEL_NO_MAPPINGS)
MAKE_FLAGS_EX(dyntopo_mode, "Dyntopo Operators", "", DYNTOPO_COLLAPSE|DYNTOPO_CLEANUP|DYNTOPO_SUBDIVIDE, _({
MAKE_FLAGS_EX(dyntopo_mode, "Dyntopo Operators", "", DYNTOPO_COLLAPSE|DYNTOPO_CLEANUP|DYNTOPO_SUBDIVIDE, BRUSH_CHANNEL_INHERIT, {\
{DYNTOPO_COLLAPSE, "COLLAPSE", ICON_NONE, "Collapse", ""},
{DYNTOPO_SUBDIVIDE, "SUBDIVIDE", ICON_NONE, "Subdivide", ""},
{DYNTOPO_CLEANUP, "CLEANUP", ICON_NONE, "Cleanup", ""},
{DYNTOPO_LOCAL_COLLAPSE, "LOCAL_COLLAPSE", ICON_NONE, "Local Collapse", ""},
{DYNTOPO_LOCAL_SUBDIVIDE, "LOCAL_SUBDIVIDE", ICON_NONE, "Local Subdivide", ""},
{-1}
}), BRUSH_CHANNEL_INHERIT)
MAKE_ENUM(slide_deform_type, "Slide Deform Type", "", BRUSH_SLIDE_DEFORM_DRAG, _({
})
MAKE_ENUM(slide_deform_type, "Slide Deform Type", "", BRUSH_SLIDE_DEFORM_DRAG, {\
{BRUSH_SLIDE_DEFORM_DRAG, "DRAG", ICON_NONE, "Drag", ""},
{BRUSH_SLIDE_DEFORM_PINCH, "PINCH", ICON_NONE, "Pinch", ""},
{BRUSH_SLIDE_DEFORM_EXPAND, "EXPAND", ICON_NONE, "Expand", ""},
{-1}
}))
})
MAKE_FLOAT(normal_radius_factor, "Normal Radius", "Ratio between the brush radius and the radius that is going to be "
"used to sample the normal", 0.5f, 0.0f, 1.0f)
MAKE_FLOAT(hardness, "Hardness", "Brush falloff hardness", 0.0f, 0.0f, 1.0f)
MAKE_FLOAT(tip_roundness, "Tip Roundness", "", 1.0f, 0.0f, 1.0f)
MAKE_BOOL(accumulate, "Accumulate", "", false)
MAKE_ENUM(direction, "Direction", "", 0, _({
MAKE_ENUM(direction, "Direction", "", 0, {\
{0, "ADD", "ADD", "Add", "Add effect of brush"},
{1, "SUBTRACT", "REMOVE", "Subtract", "Subtract effect of brush"},
{-1}
}))
})
MAKE_FLOAT(normal_weight, "Normal Weight", "", 0.0f, 0.0f, 1.0f)
MAKE_FLOAT(weight, "Weight", "", 0.5f, 0.0f, 1.0f)
@ -207,13 +204,13 @@ MAKE_FLOAT_EX_FLAG(dyntopo_detail_range, "Detail Range", "Detail Range", 0.45f,
MAKE_FLOAT_EX_FLAG(dyntopo_detail_size, "Detail Size", "Detail Size", 8.0f, 0.1f, 100.0f, 0.001f, 500.0f, false, BRUSH_CHANNEL_INHERIT)
MAKE_FLOAT_EX_FLAG(dyntopo_constant_detail, "Constaint Detail", "", 3.0f, 0.001f, 1000.0f, 0.0001, FLT_MAX, false, BRUSH_CHANNEL_INHERIT)
MAKE_FLOAT_EX_FLAG(dyntopo_spacing, "Spacing", "Dyntopo Spacing", 35.0f, 0.01f, 300.0f, 0.001f, 50000.0f, false, BRUSH_CHANNEL_INHERIT)
MAKE_ENUM_EX(dyntopo_detail_mode, "Detail Mode", "", DYNTOPO_DETAIL_RELATIVE, _({
MAKE_ENUM_EX(dyntopo_detail_mode, "Detail Mode", "", DYNTOPO_DETAIL_RELATIVE, BRUSH_CHANNEL_INHERIT, {\
{DYNTOPO_DETAIL_RELATIVE, "RELATIVE", "NONE", "Relative", ""},
{DYNTOPO_DETAIL_CONSTANT, "CONSTANT", "NONE", "Constant", ""},
{DYNTOPO_DETAIL_MANUAL, "MANUAL", "NONE", "Manual", ""},
{DYNTOPO_DETAIL_BRUSH, "BRUSH", "NONE", "Brush", ""},
{-1}
}), BRUSH_CHANNEL_INHERIT)
})
MAKE_FLOAT(concave_mask_factor, "Cavity Factor", "", 0.35f, 0.0f, 1.0f)
MAKE_INT_EX(automasking_boundary_edges_propagation_steps, "Propagation Steps",
@ -242,7 +239,7 @@ MAKE_BOOL(show_multiplane_scrape_planes_preview, "Show Cursor Preview", "Preview
MAKE_FLOAT(multiplane_scrape_angle, "Plane Angle", "Angle between the planes of the crease", 60.0f, 0.0f, 160.0f)
MAKE_BOOL(use_persistent, "Persistent", "Sculpt on a persistent layer of the mesh", false)
MAKE_ENUM(cloth_deform_type, "Deformation", "Deformation type that is used in the brush", BRUSH_CLOTH_DEFORM_DRAG, _({
MAKE_ENUM(cloth_deform_type, "Deformation", "Deformation type that is used in the brush", BRUSH_CLOTH_DEFORM_DRAG, {\
{BRUSH_CLOTH_DEFORM_DRAG, "DRAG", "NONE", "Drag", ""},
{BRUSH_CLOTH_DEFORM_PUSH, "PUSH", "NONE", "Push", ""},
{BRUSH_CLOTH_DEFORM_PINCH_POINT, "PINCH_POINT", "NONE", "Pinch Point", ""},
@ -253,9 +250,9 @@ MAKE_ENUM(cloth_deform_type, "Deformation", "Deformation type that is used in th
{BRUSH_CLOTH_DEFORM_SNAKE_HOOK, "SNAKE_HOOK", "NONE", "Snake Hook", ""},
{BRUSH_CLOTH_DEFORM_ELASTIC_DRAG, "ELASTIC", "NONE", "Elastic Drag", ""},
{-1}
}))
})
MAKE_ENUM(cloth_simulation_area_type, "Simulation Area", "Part of the mesh that is going to be simulated when the stroke is active", BRUSH_CLOTH_SIMULATION_AREA_DYNAMIC, _({
MAKE_ENUM(cloth_simulation_area_type, "Simulation Area", "Part of the mesh that is going to be simulated when the stroke is active", BRUSH_CLOTH_SIMULATION_AREA_DYNAMIC, {\
{BRUSH_CLOTH_SIMULATION_AREA_LOCAL,
"LOCAL",
"NONE",
@ -268,14 +265,14 @@ MAKE_ENUM(cloth_simulation_area_type, "Simulation Area", "Part of the mesh that
"Dynamic",
"The active simulation area moves with the brush"},
{-1}
}))
})
MAKE_ENUM(cloth_force_falloff_type, "Force Falloff", "Shape used in the brush to apply force to the cloth",
BRUSH_CLOTH_FORCE_FALLOFF_RADIAL, _({
BRUSH_CLOTH_FORCE_FALLOFF_RADIAL, {\
{BRUSH_CLOTH_FORCE_FALLOFF_RADIAL, "RADIAL", "NONE", "Radial", ""},
{BRUSH_CLOTH_FORCE_FALLOFF_PLANE, "PLANE", "NONE", "Plane", ""},
{-1}
}))
})
MAKE_FLOAT(cloth_mass, "Cloth Mass", "Mass of each simulation particle", 1.0f, 0.0f, 2.0f)
MAKE_FLOAT(cloth_damping, "Cloth Damping", "How much the applied forces are propagated through the cloth", 0.01f, 0.01f, 1.0f)
@ -294,7 +291,7 @@ MAKE_BOOL(cloth_pin_simulation_boundary, "Pin Simulation Boundary",
MAKE_FLOAT(boundary_offset, "Boundary Origin Offset",
"Offset of the boundary origin in relation to the brush radius", 0.05f, 0.0f, 10.0f)
MAKE_ENUM(boundary_deform_type, "Deformation", "Deformation type that is used in the brush", BRUSH_BOUNDARY_DEFORM_BEND, _({
MAKE_ENUM(boundary_deform_type, "Deformation", "Deformation type that is used in the brush", BRUSH_BOUNDARY_DEFORM_BEND, {\
{BRUSH_BOUNDARY_DEFORM_BEND, "BEND", "NONE", "Bend", ""},
{BRUSH_BOUNDARY_DEFORM_EXPAND, "EXPAND", "NONE", "Expand", ""},
{BRUSH_BOUNDARY_DEFORM_INFLATE, "INFLATE", "NONE", "Inflate", ""},
@ -303,9 +300,9 @@ MAKE_ENUM(boundary_deform_type, "Deformation", "Deformation type that is used in
{BRUSH_BOUNDARY_DEFORM_SMOOTH, "SMOOTH", "NONE", "Smooth", ""},
{BRUSH_BOUNDARY_DEFORM_CIRCLE, "CIRCLE", "NONE", "Circle", ""},
{-1}
}))
})
MAKE_ENUM(boundary_falloff_type, "Boundary Falloff", "How the brush falloff is applied across the boundary", BRUSH_BOUNDARY_FALLOFF_CONSTANT, _({
MAKE_ENUM(boundary_falloff_type, "Boundary Falloff", "How the brush falloff is applied across the boundary", BRUSH_BOUNDARY_FALLOFF_CONSTANT, {\
{BRUSH_BOUNDARY_FALLOFF_CONSTANT,
"CONSTANT",
"NONE",
@ -328,9 +325,9 @@ MAKE_ENUM(boundary_falloff_type, "Boundary Falloff", "How the brush falloff is a
"Applies the falloff radius in a loop pattern, inverting the displacement direction in "
"each pattern repetition"},
{-1}
}))
})
MAKE_ENUM(deform_target, "Deformation Target", "How the deformation of the brush will affect the object", BRUSH_DEFORM_TARGET_GEOMETRY, _({
MAKE_ENUM(deform_target, "Deformation Target", "How the deformation of the brush will affect the object", BRUSH_DEFORM_TARGET_GEOMETRY, {\
{BRUSH_DEFORM_TARGET_GEOMETRY,
"GEOMETRY",
"NONE",
@ -342,17 +339,17 @@ MAKE_ENUM(deform_target, "Deformation Target", "How the deformation of the brush
"Cloth Simulation",
"Brush deforms the mesh by deforming the constraints of a cloth simulation"},
{-1}
}))
})
MAKE_CURVE(autosmooth_falloff_curve, "Falloff", "Custom curve for autosmooth", BRUSH_CURVE_SMOOTH)
MAKE_CURVE(topology_rake_falloff_curve, "Falloff", "Custom curve for topolgoy rake", BRUSH_CURVE_SMOOTH)
MAKE_CURVE(falloff_curve, "Falloff", "Falloff curve", BRUSH_CURVE_SMOOTH)
MAKE_FLOAT_EX(unprojected_radius, "Unprojected Radius", "Radius of brush in Blender units", 0.1f, 0.001, FLT_MAX, 0.001, 1.0f, false)
MAKE_ENUM_EX(radius_unit, "Radius Unit", "Measure brush size relative to the view or the scene", 0, _({
MAKE_ENUM_EX(radius_unit, "Radius Unit", "Measure brush size relative to the view or the scene", 0, BRUSH_CHANNEL_SHOW_IN_WORKSPACE, {\
{0, "VIEW", "NONE", "View", "Measure brush size relative to the view"},
{BRUSH_LOCK_SIZE, "SCENE", "NONE", "Scene", "Measure brush size relative to the scene"},
{-1}
}), BRUSH_CHANNEL_SHOW_IN_WORKSPACE)
})
MAKE_FLOAT(tilt_strength_factor, "Tilt Strength", "How much the tilt of the pen will affect the brush", 0.0f, 0.0f, 1.0f)
MAKE_FLOAT_EX(rake_factor, "Rake", "How much grab will follow cursor rotation", 0.5f, 0.0f, 10.0f, 0.0f, 1.0f, false)
@ -371,15 +368,15 @@ MAKE_BOOL(use_connected_only, "Connected Only", "Affect only topologically conn
MAKE_BOOL(use_pose_ik_anchored, "Keep Anchor Point", "Keep the position of the last segment in the IK chain fixed", true)
MAKE_BOOL(use_pose_lock_rotation, "Lock Rotation When Scaling",
"Do not rotate the segment when using the scale deform mode", false)
MAKE_ENUM(pose_deform_type, "Deformation", "Deformation type that is used in the brush", 0, _({
MAKE_ENUM(pose_deform_type, "Deformation", "Deformation type that is used in the brush", 0, {\
{BRUSH_POSE_DEFORM_ROTATE_TWIST, "ROTATE_TWIST", "NONE", "Rotate/Twist", ""},
{BRUSH_POSE_DEFORM_SCALE_TRASLATE, "SCALE_TRANSLATE", "NONE", "Scale/Translate", ""},
{BRUSH_POSE_DEFORM_SQUASH_STRETCH, "SQUASH_STRETCH", "NONE", "Squash & Stretch", ""},
{BRUSH_POSE_DEFORM_BEND, "BEND", "NONE", "Bend", ""},
{-1}
}))
})
MAKE_ENUM(pose_origin_type, "Rotation Origins",
"Method to set the rotation origins for the segments of the brush", 0, _({
"Method to set the rotation origins for the segments of the brush", 0, {\
{BRUSH_POSE_ORIGIN_TOPOLOGY,
"TOPOLOGY",
@ -398,11 +395,11 @@ MAKE_ENUM(pose_origin_type, "Rotation Origins",
"Face Sets FK",
"Simulates an FK deformation using the Face Set under the cursor as control"},
{-1}
}))
})
MAKE_FLOAT(crease_pinch_factor, "Crease Brush Pinch Factor", "How much the crease brush pinches", 0.0f, 0.0f, 1.0f)
MAKE_ENUM(snake_hook_deform_type, "Deformation", "Deformation type that is used in the brush", BRUSH_SNAKE_HOOK_DEFORM_FALLOFF, _({
MAKE_ENUM(snake_hook_deform_type, "Deformation", "Deformation type that is used in the brush", BRUSH_SNAKE_HOOK_DEFORM_FALLOFF, {\
{BRUSH_SNAKE_HOOK_DEFORM_FALLOFF,
"FALLOFF",
"NONE",
@ -414,13 +411,13 @@ MAKE_ENUM(snake_hook_deform_type, "Deformation", "Deformation type that is used
"Elastic",
"Modifies the entire mesh using elastic deform"},
{-1}
}))
})
/* MTex paramters (not stored directly inside of brushes) */
MAKE_FLOAT3(mtex_offset, "Offset", "Fine tune of the texture mapping X, Y and Z locations", 0.0f, 0.0f, 0.0f, -10.0f, 10.0f)
MAKE_FLOAT3(mtex_scale, "Size", "Set scaling for the texture's X, Y and Z sizes", 1.0f, 1.0f, 1.0f, -100.0f, 100.0f)
MAKE_FLOAT3_EX(mtex_color, "Color", "Default color for textures that don't return RGB or when RGB to intensity is enabled", 1, 1, 1, 0, 1, -5, 5, BRUSH_CHANNEL_COLOR)
MAKE_ENUM(mtex_map_mode, "Mode", "", MTEX_MAP_MODE_TILED, _({
MAKE_ENUM(mtex_map_mode, "Mode", "", MTEX_MAP_MODE_TILED, {\
{MTEX_MAP_MODE_VIEW, "VIEW_PLANE", "NONE", "View Plane", ""},
{MTEX_MAP_MODE_AREA, "AREA_PLANE", "NONE", "Area Plane", ""},
{MTEX_MAP_MODE_TILED, "TILED", "NONE", "Tiled", ""},
@ -428,7 +425,7 @@ MAKE_ENUM(mtex_map_mode, "Mode", "", MTEX_MAP_MODE_TILED, _({
{MTEX_MAP_MODE_RANDOM, "RANDOM", "NONE", "Random", ""},
{MTEX_MAP_MODE_STENCIL, "STENCIL", "NONE", "Stencil", ""},
{-1}
}))
})
MAKE_BOOL(mtex_use_rake, "Rake", "", false)
MAKE_BOOL(mtex_use_random, "Random", "", false)
MAKE_FLOAT(mtex_random_angle, "Random Angle", "Brush texture random angle", 0.0f, 0.0f, M_PI*2.0f)
@ -436,14 +433,14 @@ MAKE_FLOAT(mtex_angle, "Angle", "", 0.0f, 0.0f, M_PI*2.0f)
MAKE_FLOAT_EX(height, "Brush Height", "Affectable height of brush (layer height for layer tool, i.e.)", 0.05f, 0.0f, 1.0f, 0.0f, 0.2f, false)
MAKE_BOOL(use_space_attenuation, "Adjust Strength for Spacing",
"Automatically adjust strength to give consistent results for different spacings", true)
MAKE_ENUM(elastic_deform_type, "Deformation", "Deformation type that is used in the brush", BRUSH_ELASTIC_DEFORM_GRAB_TRISCALE, _({
MAKE_ENUM(elastic_deform_type, "Deformation", "Deformation type that is used in the brush", BRUSH_ELASTIC_DEFORM_GRAB_TRISCALE, {\
{BRUSH_ELASTIC_DEFORM_GRAB, "GRAB", "NONE", "Grab", ""},
{BRUSH_ELASTIC_DEFORM_GRAB_BISCALE, "GRAB_BISCALE", "NONE", "Bi-Scale Grab", ""},
{BRUSH_ELASTIC_DEFORM_GRAB_TRISCALE, "GRAB_TRISCALE", "NONE", "Tri-Scale Grab", ""},
{BRUSH_ELASTIC_DEFORM_SCALE, "SCALE", "NONE", "Scale", ""},
{BRUSH_ELASTIC_DEFORM_TWIST, "TWIST", "NONE", "Twist", ""},
{-1}
}))
})
//MAKE_FLOAT3_EX
/* clang-format on */

View File

@ -1,5 +1,3 @@
#pragma once
#define BRUSH_CHANNEL_INTERN
#include "MEM_guardedalloc.h"
@ -147,7 +145,7 @@ MAKE_FLOAT_EX_EX(idname1, name1, tooltip1, value1, min1, max1, smin1, smax1, pre
#define MAKE_BOOL(idname, name, tooltip, value)\
MAKE_BOOL_EX(idname, name, tooltip, value, 0)
#define MAKE_ENUM_EX(idname1, name1, tooltip1, value1, enumdef1, flag1)\
#define MAKE_ENUM_EX(idname1, name1, tooltip1, value1, flag1, enumdef1, ...)\
{.name = name1,\
.idname = #idname1,\
.tooltip = tooltip1,\
@ -156,8 +154,9 @@ MAKE_FLOAT_EX_EX(idname1, name1, tooltip1, value1, min1, max1, smin1, smax1, pre
.type = BRUSH_CHANNEL_ENUM,\
.rna_enumdef = NULL,\
.enumdef = enumdef1\
, __VA_ARGS__\
},
#define MAKE_FLAGS_EX(idname1, name1, tooltip1, value1, enumdef1, flag1)\
#define MAKE_FLAGS_EX(idname1, name1, tooltip1, value1, flag1, enumdef1, ...)\
{.name = name1,\
.idname = #idname1,\
.tooltip = tooltip1,\
@ -165,10 +164,10 @@ MAKE_FLOAT_EX_EX(idname1, name1, tooltip1, value1, min1, max1, smin1, smax1, pre
.flag = flag1,\
.type = BRUSH_CHANNEL_BITMASK,\
.rna_enumdef = NULL,\
.enumdef = enumdef1\
.enumdef = enumdef1 , __VA_ARGS__\
},
#define MAKE_FLAGS(idname1, name1, tooltip1, value1, enumdef1) MAKE_FLAGS_EX(idname1, name1, tooltip1, value1, enumdef1, 0)
#define MAKE_ENUM(idname1, name1, tooltip1, value1, enumdef1) MAKE_ENUM_EX(idname1, name1, tooltip1, value1, enumdef1, 0)
#define MAKE_FLAGS(idname1, name1, tooltip1, value1, enumdef1, ...) MAKE_FLAGS_EX(idname1, name1, tooltip1, value1, 0, enumdef1)
#define MAKE_ENUM(idname1, name1, tooltip1, value1, enumdef1, ...) MAKE_ENUM_EX(idname1, name1, tooltip1, value1, 0, enumdef1, __VA_ARGS__)
#define MAKE_CURVE(idname1, name1, tooltip1, preset1)\
{\
@ -978,7 +977,7 @@ void BKE_brush_channelset_ui_init(Brush *brush, int tool)
BrushChannel *ch;
#define SETFLAG_SAFE(idname, flag1) \
if (ch = BRUSHSET_LOOKUP(chset, idname)) \
if ((ch = BRUSHSET_LOOKUP(chset, idname))) \
ch->flag |= (flag1)
#define SHOWHDR(idname) SETFLAG_SAFE(idname, BRUSH_CHANNEL_SHOW_IN_HEADER)