Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_brush_types.h
| Show First 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | typedef enum eBrushCurvePreset { | ||||
| BRUSH_CURVE_SMOOTH = 1, | BRUSH_CURVE_SMOOTH = 1, | ||||
| BRUSH_CURVE_SPHERE = 2, | BRUSH_CURVE_SPHERE = 2, | ||||
| BRUSH_CURVE_ROOT = 3, | BRUSH_CURVE_ROOT = 3, | ||||
| BRUSH_CURVE_SHARP = 4, | BRUSH_CURVE_SHARP = 4, | ||||
| BRUSH_CURVE_LIN = 5, | BRUSH_CURVE_LIN = 5, | ||||
| BRUSH_CURVE_POW4 = 6, | BRUSH_CURVE_POW4 = 6, | ||||
| BRUSH_CURVE_INVSQUARE = 7, | BRUSH_CURVE_INVSQUARE = 7, | ||||
| BRUSH_CURVE_CONSTANT = 8, | BRUSH_CURVE_CONSTANT = 8, | ||||
| BRUSH_CURVE_SMOOTHER = 9, | |||||
| } eBrushCurvePreset; | } eBrushCurvePreset; | ||||
| typedef enum eBrushElasticDeformType { | typedef enum eBrushElasticDeformType { | ||||
| BRUSH_ELASTIC_DEFORM_GRAB = 0, | BRUSH_ELASTIC_DEFORM_GRAB = 0, | ||||
| BRUSH_ELASTIC_DEFORM_GRAB_BISCALE = 1, | BRUSH_ELASTIC_DEFORM_GRAB_BISCALE = 1, | ||||
| BRUSH_ELASTIC_DEFORM_GRAB_TRISCALE = 2, | BRUSH_ELASTIC_DEFORM_GRAB_TRISCALE = 2, | ||||
| BRUSH_ELASTIC_DEFORM_SCALE = 3, | BRUSH_ELASTIC_DEFORM_SCALE = 3, | ||||
| BRUSH_ELASTIC_DEFORM_TWIST = 4, | BRUSH_ELASTIC_DEFORM_TWIST = 4, | ||||
| Show All 32 Lines | typedef struct Brush { | ||||
| /** #eObjectMode: to see if the brush is compatible, use for display only. */ | /** #eObjectMode: to see if the brush is compatible, use for display only. */ | ||||
| short ob_mode; | short ob_mode; | ||||
| /** Brush weight. */ | /** Brush weight. */ | ||||
| float weight; | float weight; | ||||
| /** Brush diameter. */ | /** Brush diameter. */ | ||||
| int size; | int size; | ||||
| /** General purpose flags. */ | /** General purpose flags. */ | ||||
| int flag; | int flag; | ||||
| int flag2; | |||||
| int sampling_flag; | int sampling_flag; | ||||
| /** Pressure influence for mask. */ | /** Pressure influence for mask. */ | ||||
| int mask_pressure; | int mask_pressure; | ||||
| /** Jitter the position of the brush. */ | /** Jitter the position of the brush. */ | ||||
| float jitter; | float jitter; | ||||
| /** Absolute jitter in pixels. */ | /** Absolute jitter in pixels. */ | ||||
| int jitter_absolute; | int jitter_absolute; | ||||
| int overlay_flags; | int overlay_flags; | ||||
| /** Spacing of paint operations. */ | /** Spacing of paint operations. */ | ||||
| int spacing; | int spacing; | ||||
| /** Turning radius (in pixels) for smooth stroke. */ | /** Turning radius (in pixels) for smooth stroke. */ | ||||
| int smooth_stroke_radius; | int smooth_stroke_radius; | ||||
| /** Higher values limit fast changes in the stroke direction. */ | /** Higher values limit fast changes in the stroke direction. */ | ||||
| float smooth_stroke_factor; | float smooth_stroke_factor; | ||||
| /** Paint operations / second (airbrush). */ | /** Paint operations / second (airbrush). */ | ||||
| float rate; | float rate; | ||||
| /** Color. */ | /** Color. */ | ||||
| float rgb[3]; | float rgb[3]; | ||||
| /** Opacity. */ | /** Opacity. */ | ||||
| float alpha; | float alpha; | ||||
| /** Background color. */ | /** Background color. */ | ||||
| float secondary_rgb[3]; | float secondary_rgb[3]; | ||||
| /** Rate */ | |||||
| float dash_ratio; | |||||
| int dash_samples; | |||||
| /** The direction of movement for sculpt vertices. */ | /** The direction of movement for sculpt vertices. */ | ||||
| int sculpt_plane; | int sculpt_plane; | ||||
| /** Offset for plane brushes (clay, flatten, fill, scrape). */ | /** Offset for plane brushes (clay, flatten, fill, scrape). */ | ||||
| float plane_offset; | float plane_offset; | ||||
| int gradient_spacing; | int gradient_spacing; | ||||
| /** Source for stroke color gradient application. */ | /** Source for stroke color gradient application. */ | ||||
| char gradient_stroke_mode; | char gradient_stroke_mode; | ||||
| /** Source for fill tool color gradient application. */ | /** Source for fill tool color gradient application. */ | ||||
| char gradient_fill_mode; | char gradient_fill_mode; | ||||
| char _pad[5]; | char _pad0; | ||||
| /** Projection shape (sphere, circle). */ | /** Projection shape (sphere, circle). */ | ||||
| char falloff_shape; | char falloff_shape; | ||||
| float falloff_angle; | float falloff_angle; | ||||
| /** Active sculpt tool. */ | /** Active sculpt tool. */ | ||||
| char sculpt_tool; | char sculpt_tool; | ||||
| /** Active sculpt tool. */ | /** Active sculpt tool. */ | ||||
| char uv_sculpt_tool; | char uv_sculpt_tool; | ||||
| /** Active vertex paint. */ | /** Active vertex paint. */ | ||||
| char vertexpaint_tool; | char vertexpaint_tool; | ||||
| /** Active weight paint. */ | /** Active weight paint. */ | ||||
| char weightpaint_tool; | char weightpaint_tool; | ||||
| /** Active image paint tool. */ | /** Active image paint tool. */ | ||||
| char imagepaint_tool; | char imagepaint_tool; | ||||
| /** Enum eBrushMaskTool, only used if sculpt_tool is SCULPT_TOOL_MASK. */ | /** Enum eBrushMaskTool, only used if sculpt_tool is SCULPT_TOOL_MASK. */ | ||||
| char mask_tool; | char mask_tool; | ||||
| /** Active grease pencil tool. */ | /** Active grease pencil tool. */ | ||||
| char gpencil_tool; | char gpencil_tool; | ||||
| char _pad0[1]; | char _pad1[5]; | ||||
| float autosmooth_factor; | float autosmooth_factor; | ||||
| float topology_rake_factor; | float topology_rake_factor; | ||||
| float crease_pinch_factor; | float crease_pinch_factor; | ||||
| float normal_radius_factor; | float normal_radius_factor; | ||||
| float plane_trim; | float plane_trim; | ||||
| /** Affectable height of brush (layer height for layer tool, i.e.). */ | /** Affectable height of brush (layer height for layer tool, i.e.). */ | ||||
| float height; | float height; | ||||
| float texture_sample_bias; | float texture_sample_bias; | ||||
| int curve_preset; | int curve_preset; | ||||
| int automasking_flags; | int automasking_flags; | ||||
| int elastic_deform_type; | int elastic_deform_type; | ||||
| float elastic_deform_volume_preservation; | float elastic_deform_volume_preservation; | ||||
| /* pose */ | /* pose */ | ||||
| float pose_offset; | float pose_offset; | ||||
| int pose_smooth_iterations; | |||||
| char _pad2[4]; | |||||
| /* multiplane scrape */ | |||||
| float multiplane_scrape_angle; | |||||
| /* overlay */ | /* overlay */ | ||||
| int texture_overlay_alpha; | int texture_overlay_alpha; | ||||
| int mask_overlay_alpha; | int mask_overlay_alpha; | ||||
| int cursor_overlay_alpha; | int cursor_overlay_alpha; | ||||
| float unprojected_radius; | float unprojected_radius; | ||||
| ▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
| typedef enum eBrushGradientSourceFill { | typedef enum eBrushGradientSourceFill { | ||||
| BRUSH_GRADIENT_LINEAR = 0, /* gradient from pressure */ | BRUSH_GRADIENT_LINEAR = 0, /* gradient from pressure */ | ||||
| BRUSH_GRADIENT_RADIAL = 1, /* gradient from spacing */ | BRUSH_GRADIENT_RADIAL = 1, /* gradient from spacing */ | ||||
| } eBrushGradientSourceFill; | } eBrushGradientSourceFill; | ||||
| /* Brush.flag */ | /* Brush.flag */ | ||||
| typedef enum eBrushFlags { | typedef enum eBrushFlags { | ||||
| BRUSH_AIRBRUSH = (1 << 0), | BRUSH_AIRBRUSH = (1 << 0), | ||||
| BRUSH_FLAG_UNUSED_1 = (1 << 1), /* cleared */ | BRUSH_INVERT_TO_SCRAPE_FILL = (1 << 1), | ||||
| BRUSH_ALPHA_PRESSURE = (1 << 2), | BRUSH_ALPHA_PRESSURE = (1 << 2), | ||||
| BRUSH_SIZE_PRESSURE = (1 << 3), | BRUSH_SIZE_PRESSURE = (1 << 3), | ||||
| BRUSH_JITTER_PRESSURE = (1 << 4), | BRUSH_JITTER_PRESSURE = (1 << 4), | ||||
| BRUSH_SPACING_PRESSURE = (1 << 5), | BRUSH_SPACING_PRESSURE = (1 << 5), | ||||
| BRUSH_ORIGINAL_PLANE = (1 << 6), | BRUSH_ORIGINAL_PLANE = (1 << 6), | ||||
| BRUSH_GRAB_ACTIVE_VERTEX = (1 << 7), | BRUSH_GRAB_ACTIVE_VERTEX = (1 << 7), | ||||
| BRUSH_ANCHORED = (1 << 8), | BRUSH_ANCHORED = (1 << 8), | ||||
| BRUSH_DIR_IN = (1 << 9), | BRUSH_DIR_IN = (1 << 9), | ||||
| Show All 21 Lines | typedef enum eBrushFlags { | ||||
| BRUSH_CURVE = (1u << 31), | BRUSH_CURVE = (1u << 31), | ||||
| } eBrushFlags; | } eBrushFlags; | ||||
| /* Brush.sampling_flag */ | /* Brush.sampling_flag */ | ||||
| typedef enum eBrushSamplingFlags { | typedef enum eBrushSamplingFlags { | ||||
| BRUSH_PAINT_ANTIALIASING = (1 << 0), | BRUSH_PAINT_ANTIALIASING = (1 << 0), | ||||
| } eBrushSamplingFlags; | } eBrushSamplingFlags; | ||||
| /* Brush.flag2 */ | |||||
| typedef enum eBrushFlags2 { | |||||
| BRUSH_MULTIPLANE_SCRAPE_DYNAMIC = (1 << 0), | |||||
| BRUSH_MULTIPLANE_SCRAPE_PLANES_PREVIEW = (1 << 1), | |||||
| } eBrushFlags2; | |||||
| typedef enum { | typedef enum { | ||||
| BRUSH_MASK_PRESSURE_RAMP = (1 << 1), | BRUSH_MASK_PRESSURE_RAMP = (1 << 1), | ||||
| BRUSH_MASK_PRESSURE_CUTOFF = (1 << 2), | BRUSH_MASK_PRESSURE_CUTOFF = (1 << 2), | ||||
| } BrushMaskPressureFlags; | } BrushMaskPressureFlags; | ||||
| /* Brush.overlay_flags */ | /* Brush.overlay_flags */ | ||||
| typedef enum eOverlayFlags { | typedef enum eOverlayFlags { | ||||
| BRUSH_OVERLAY_CURSOR = (1), | BRUSH_OVERLAY_CURSOR = (1), | ||||
| Show All 27 Lines | typedef enum eBrushSculptTool { | ||||
| SCULPT_TOOL_SIMPLIFY = 15, | SCULPT_TOOL_SIMPLIFY = 15, | ||||
| SCULPT_TOOL_CREASE = 16, | SCULPT_TOOL_CREASE = 16, | ||||
| SCULPT_TOOL_BLOB = 17, | SCULPT_TOOL_BLOB = 17, | ||||
| SCULPT_TOOL_CLAY_STRIPS = 18, | SCULPT_TOOL_CLAY_STRIPS = 18, | ||||
| SCULPT_TOOL_MASK = 19, | SCULPT_TOOL_MASK = 19, | ||||
| SCULPT_TOOL_DRAW_SHARP = 20, | SCULPT_TOOL_DRAW_SHARP = 20, | ||||
| SCULPT_TOOL_ELASTIC_DEFORM = 21, | SCULPT_TOOL_ELASTIC_DEFORM = 21, | ||||
| SCULPT_TOOL_POSE = 22, | SCULPT_TOOL_POSE = 22, | ||||
| SCULPT_TOOL_MULTIPLANE_SCRAPE = 23, | |||||
| SCULPT_TOOL_TOPOLOGY = 24, | |||||
| } eBrushSculptTool; | } eBrushSculptTool; | ||||
| /* Brush.uv_sculpt_tool */ | /* Brush.uv_sculpt_tool */ | ||||
| typedef enum eBrushUVSculptTool { | typedef enum eBrushUVSculptTool { | ||||
| UV_SCULPT_TOOL_GRAB = 0, | UV_SCULPT_TOOL_GRAB = 0, | ||||
| UV_SCULPT_TOOL_RELAX = 1, | UV_SCULPT_TOOL_RELAX = 1, | ||||
| UV_SCULPT_TOOL_PINCH = 2, | UV_SCULPT_TOOL_PINCH = 2, | ||||
| } eBrushUVSculptTool; | } eBrushUVSculptTool; | ||||
| /** When #BRUSH_ACCUMULATE is used */ | /** When #BRUSH_ACCUMULATE is used */ | ||||
| #define SCULPT_TOOL_HAS_ACCUMULATE(t) \ | #define SCULPT_TOOL_HAS_ACCUMULATE(t) \ | ||||
| ELEM(t, \ | ELEM(t, \ | ||||
| SCULPT_TOOL_DRAW, \ | SCULPT_TOOL_DRAW, \ | ||||
| SCULPT_TOOL_DRAW_SHARP, \ | SCULPT_TOOL_DRAW_SHARP, \ | ||||
| SCULPT_TOOL_TOPOLOGY, \ | |||||
| SCULPT_TOOL_CREASE, \ | SCULPT_TOOL_CREASE, \ | ||||
| SCULPT_TOOL_BLOB, \ | SCULPT_TOOL_BLOB, \ | ||||
| SCULPT_TOOL_LAYER, \ | SCULPT_TOOL_LAYER, \ | ||||
| SCULPT_TOOL_INFLATE, \ | SCULPT_TOOL_INFLATE, \ | ||||
| SCULPT_TOOL_CLAY, \ | SCULPT_TOOL_CLAY, \ | ||||
| SCULPT_TOOL_CLAY_STRIPS, \ | SCULPT_TOOL_CLAY_STRIPS, \ | ||||
| SCULPT_TOOL_ROTATE, \ | SCULPT_TOOL_ROTATE, \ | ||||
| SCULPT_TOOL_SCRAPE, \ | SCULPT_TOOL_SCRAPE, \ | ||||
| SCULPT_TOOL_FLATTEN) | SCULPT_TOOL_FLATTEN) | ||||
| #define SCULPT_TOOL_HAS_NORMAL_WEIGHT(t) \ | #define SCULPT_TOOL_HAS_NORMAL_WEIGHT(t) \ | ||||
| ELEM(t, SCULPT_TOOL_GRAB, SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_ELASTIC_DEFORM) | ELEM(t, SCULPT_TOOL_GRAB, SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_ELASTIC_DEFORM) | ||||
| #define SCULPT_TOOL_HAS_RAKE(t) ELEM(t, SCULPT_TOOL_SNAKE_HOOK) | #define SCULPT_TOOL_HAS_RAKE(t) ELEM(t, SCULPT_TOOL_SNAKE_HOOK) | ||||
| #define SCULPT_TOOL_HAS_DYNTOPO(t) \ | #define SCULPT_TOOL_HAS_DYNTOPO(t) \ | ||||
| (ELEM(t, /* These brushes, as currently coded, cannot support dynamic topology */ \ | (ELEM(t, /* These brushes, as currently coded, cannot support dynamic topology */ \ | ||||
| SCULPT_TOOL_GRAB, \ | SCULPT_TOOL_GRAB, \ | ||||
| SCULPT_TOOL_ROTATE, \ | SCULPT_TOOL_ROTATE, \ | ||||
| SCULPT_TOOL_THUMB, \ | SCULPT_TOOL_THUMB, \ | ||||
| SCULPT_TOOL_LAYER, \ | SCULPT_TOOL_LAYER, \ | ||||
| SCULPT_TOOL_DRAW_SHARP, \ | SCULPT_TOOL_DRAW_SHARP, \ | ||||
| SCULPT_TOOL_TOPOLOGY, \ | |||||
| SCULPT_TOOL_ELASTIC_DEFORM, \ | SCULPT_TOOL_ELASTIC_DEFORM, \ | ||||
| SCULPT_TOOL_POSE, \ | SCULPT_TOOL_POSE, \ | ||||
| \ | \ | ||||
| /* These brushes could handle dynamic topology, \ \ | /* These brushes could handle dynamic topology, \ \ | ||||
| * but user feedback indicates it's better not to */ \ | * but user feedback indicates it's better not to */ \ | ||||
| SCULPT_TOOL_SMOOTH, \ | SCULPT_TOOL_SMOOTH, \ | ||||
| SCULPT_TOOL_MASK) == 0) | SCULPT_TOOL_MASK) == 0) | ||||
| #define SCULPT_TOOL_HAS_TOPOLOGY_RAKE(t) \ | #define SCULPT_TOOL_HAS_TOPOLOGY_RAKE(t) \ | ||||
| (ELEM(t, /* These brushes, as currently coded, cannot support topology rake. */ \ | (ELEM(t, /* These brushes, as currently coded, cannot support topology rake. */ \ | ||||
| SCULPT_TOOL_GRAB, \ | SCULPT_TOOL_GRAB, \ | ||||
| SCULPT_TOOL_ROTATE, \ | SCULPT_TOOL_ROTATE, \ | ||||
| SCULPT_TOOL_THUMB, \ | SCULPT_TOOL_THUMB, \ | ||||
| SCULPT_TOOL_DRAW_SHARP, \ | SCULPT_TOOL_DRAW_SHARP, \ | ||||
| SCULPT_TOOL_TOPOLOGY, \ | |||||
| SCULPT_TOOL_MASK) == 0) | SCULPT_TOOL_MASK) == 0) | ||||
| /* ImagePaintSettings.tool */ | /* ImagePaintSettings.tool */ | ||||
| typedef enum eBrushImagePaintTool { | typedef enum eBrushImagePaintTool { | ||||
| PAINT_TOOL_DRAW = 0, | PAINT_TOOL_DRAW = 0, | ||||
| PAINT_TOOL_SOFTEN = 1, | PAINT_TOOL_SOFTEN = 1, | ||||
| PAINT_TOOL_SMEAR = 2, | PAINT_TOOL_SMEAR = 2, | ||||
| PAINT_TOOL_CLONE = 3, | PAINT_TOOL_CLONE = 3, | ||||
| ▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines | |||||