Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_brush_types.h
| Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | typedef struct BrushClone { | ||||
| /** Transparency for drawing of clone image. */ | /** Transparency for drawing of clone image. */ | ||||
| float alpha; | float alpha; | ||||
| char _pad[4]; | char _pad[4]; | ||||
| } BrushClone; | } BrushClone; | ||||
| typedef struct BrushGpencilSettings { | typedef struct BrushGpencilSettings { | ||||
| /** Amount of smoothing to apply to newly created strokes. */ | /** Amount of smoothing to apply to newly created strokes. */ | ||||
| float draw_smoothfac; | float draw_smoothfac; | ||||
| /** Amount of sensitivity to apply to newly created strokes. */ | char _pad2[4]; | ||||
| float draw_sensitivity; | |||||
| /** Amount of alpha strength to apply to newly created strokes. */ | /** Amount of alpha strength to apply to newly created strokes. */ | ||||
| float draw_strength; | float draw_strength; | ||||
| /** Amount of jitter to apply to newly created strokes. */ | /** Amount of jitter to apply to newly created strokes. */ | ||||
| float draw_jitter; | float draw_jitter; | ||||
| /** Angle when the brush has full thickness. */ | /** Angle when the brush has full thickness. */ | ||||
| float draw_angle; | float draw_angle; | ||||
| /** Factor to apply when angle change (only 90 degrees). */ | /** Factor to apply when angle change (only 90 degrees). */ | ||||
| float draw_angle_factor; | float draw_angle_factor; | ||||
| /** Factor of randomness for pressure. */ | /** Factor of randomness for pressure. */ | ||||
| float draw_random_press; | float draw_random_press; | ||||
| /** Factor of strength for strength. */ | /** Factor of strength for strength. */ | ||||
| float draw_random_strength; | float draw_random_strength; | ||||
| /** Factor of randomness for subdivision. */ | |||||
| float draw_random_sub; | |||||
| /** Number of times to apply smooth factor to new strokes. */ | /** Number of times to apply smooth factor to new strokes. */ | ||||
| short draw_smoothlvl; | short draw_smoothlvl; | ||||
| /** Number of times to subdivide new strokes. */ | /** Number of times to subdivide new strokes. */ | ||||
| short draw_subdivide; | short draw_subdivide; | ||||
| short _pad; | char _pad[4]; | ||||
| /** Number of times to apply thickness smooth factor to new strokes. */ | |||||
| short thick_smoothlvl; | |||||
| /** Amount of thickness smoothing to apply to newly created strokes. */ | |||||
| float thick_smoothfac; | |||||
| /** Factor for transparency. */ | /** Factor for transparency. */ | ||||
| float fill_threshold; | float fill_threshold; | ||||
| /** Number of pixel to consider the leak is too small (x 2). */ | /** Number of pixel to consider the leak is too small (x 2). */ | ||||
| short fill_leak; | short fill_leak; | ||||
| /** Fill zoom factor */ | /** Fill zoom factor */ | ||||
| short fill_factor; | short fill_factor; | ||||
| char _pad_1[4]; | char _pad1[4]; | ||||
| /** Number of simplify steps. */ | /** Number of simplify steps. */ | ||||
| int fill_simplylvl; | int fill_simplylvl; | ||||
| /** Type of control lines drawing mode. */ | /** Type of control lines drawing mode. */ | ||||
| int fill_draw_mode; | int fill_draw_mode; | ||||
| /** Icon identifier. */ | /** Icon identifier. */ | ||||
| int icon_id; | int icon_id; | ||||
| Show All 10 Lines | typedef struct BrushGpencilSettings { | ||||
| /** Factor to apply to strength for soft eraser. */ | /** Factor to apply to strength for soft eraser. */ | ||||
| float era_strength_f; | float era_strength_f; | ||||
| /** Factor to apply to thickness for soft eraser. */ | /** Factor to apply to thickness for soft eraser. */ | ||||
| float era_thickness_f; | float era_thickness_f; | ||||
| /** Internal grease pencil drawing flags. */ | /** Internal grease pencil drawing flags. */ | ||||
| int flag; | int flag; | ||||
| /** gradient control along y for color */ | /** gradient control along y for color */ | ||||
| float gradient_f; | float hardeness; | ||||
| /** factor xy of shape for dots gradients */ | /** factor xy of shape for dots gradients */ | ||||
| float gradient_s[2]; | float aspect_ratio[2]; | ||||
| /** Simplify adaptive factor */ | /** Simplify adaptive factor */ | ||||
| float simplify_f; | float simplify_f; | ||||
| /** Mix colorfactor */ | |||||
| float vertex_factor; | |||||
| int vertex_mode; | |||||
| /** eGP_Sculpt_Flag. */ | |||||
| int sculpt_flag; | |||||
| /** eGP_Sculpt_Mode_Flag. */ | |||||
| int sculpt_mode_flag; | |||||
| /** Preset type (used to reset brushes - internal). */ | |||||
| short preset_type; | |||||
| char _pad3[6]; | |||||
| struct CurveMapping *curve_sensitivity; | struct CurveMapping *curve_sensitivity; | ||||
| struct CurveMapping *curve_strength; | struct CurveMapping *curve_strength; | ||||
| struct CurveMapping *curve_jitter; | struct CurveMapping *curve_jitter; | ||||
| /* optional link of material to replace default in context */ | /* optional link of material to replace default in context */ | ||||
| /** Material. */ | /** Material. */ | ||||
| struct Material *material; | struct Material *material; | ||||
| } BrushGpencilSettings; | } BrushGpencilSettings; | ||||
| /* BrushGpencilSettings->preset_type. | |||||
| * Use a range for each group and not continuous values.*/ | |||||
| typedef enum eGPBrush_Presets { | |||||
| GP_BRUSH_PRESET_UNKNOWN = 0, | |||||
| /* Draw 1-99. */ | |||||
| GP_BRUSH_PRESET_AIRBRUSH = 1, | |||||
| GP_BRUSH_PRESET_INK_PEN = 2, | |||||
| GP_BRUSH_PRESET_INK_PEN_ROUGH = 3, | |||||
| GP_BRUSH_PRESET_MARKER_BOLD = 4, | |||||
| GP_BRUSH_PRESET_MARKER_CHISEL = 5, | |||||
| GP_BRUSH_PRESET_PEN = 6, | |||||
| GP_BRUSH_PRESET_PENCIL_SOFT = 7, | |||||
| GP_BRUSH_PRESET_PENCIL = 8, | |||||
| GP_BRUSH_PRESET_FILL_AREA = 9, | |||||
| GP_BRUSH_PRESET_ERASER_SOFT = 10, | |||||
| GP_BRUSH_PRESET_ERASER_HARD = 11, | |||||
| GP_BRUSH_PRESET_ERASER_POINT = 12, | |||||
| GP_BRUSH_PRESET_ERASER_STROKE = 13, | |||||
| GP_BRUSH_PRESET_TINT = 14, | |||||
| /* Vertex Paint 100-199. */ | |||||
| GP_BRUSH_PRESET_VERTEX_DRAW = 100, | |||||
| GP_BRUSH_PRESET_VERTEX_BLUR = 101, | |||||
| GP_BRUSH_PRESET_VERTEX_AVERAGE = 102, | |||||
| GP_BRUSH_PRESET_VERTEX_SMEAR = 103, | |||||
| GP_BRUSH_PRESET_VERTEX_REPLACE = 104, | |||||
| /* Sculpt 200-299. */ | |||||
| GP_BRUSH_PRESET_SMOOTH_STROKE = 200, | |||||
| GP_BRUSH_PRESET_STRENGTH_STROKE = 201, | |||||
| GP_BRUSH_PRESET_THICKNESS_STROKE = 202, | |||||
| GP_BRUSH_PRESET_GRAB_STROKE = 203, | |||||
| GP_BRUSH_PRESET_PUSH_STROKE = 204, | |||||
| GP_BRUSH_PRESET_TWIST_STROKE = 205, | |||||
| GP_BRUSH_PRESET_PINCH_STROKE = 206, | |||||
| GP_BRUSH_PRESET_RANDOMIZE_STROKE = 207, | |||||
| GP_BRUSH_PRESET_CLONE_STROKE = 208, | |||||
| /* Weight Paint 300-399. */ | |||||
| GP_BRUSH_PRESET_DRAW_WEIGHT = 300, | |||||
| } eGPBrush_Presets; | |||||
| /* BrushGpencilSettings->gp_flag */ | /* BrushGpencilSettings->gp_flag */ | ||||
| typedef enum eGPDbrush_Flag { | typedef enum eGPDbrush_Flag { | ||||
| /* brush use pressure */ | /* brush use pressure */ | ||||
| GP_BRUSH_USE_PRESSURE = (1 << 0), | GP_BRUSH_USE_PRESSURE = (1 << 0), | ||||
| /* brush use pressure for alpha factor */ | /* brush use pressure for alpha factor */ | ||||
| GP_BRUSH_USE_STENGTH_PRESSURE = (1 << 1), | GP_BRUSH_USE_STENGTH_PRESSURE = (1 << 1), | ||||
| /* brush use pressure for alpha factor */ | /* brush use pressure for alpha factor */ | ||||
| GP_BRUSH_USE_JITTER_PRESSURE = (1 << 2), | GP_BRUSH_USE_JITTER_PRESSURE = (1 << 2), | ||||
| /* enable screen cursor */ | |||||
| GP_BRUSH_ENABLE_CURSOR = (1 << 5), | |||||
| /* fill hide transparent */ | /* fill hide transparent */ | ||||
| GP_BRUSH_FILL_HIDE = (1 << 6), | GP_BRUSH_FILL_HIDE = (1 << 6), | ||||
| /* show fill help lines */ | /* show fill help lines */ | ||||
| GP_BRUSH_FILL_SHOW_HELPLINES = (1 << 7), | GP_BRUSH_FILL_SHOW_HELPLINES = (1 << 7), | ||||
| /* lazy mouse */ | /* lazy mouse */ | ||||
| GP_BRUSH_STABILIZE_MOUSE = (1 << 8), | GP_BRUSH_STABILIZE_MOUSE = (1 << 8), | ||||
| /* lazy mouse override (internal only) */ | /* lazy mouse override (internal only) */ | ||||
| GP_BRUSH_STABILIZE_MOUSE_TEMP = (1 << 9), | GP_BRUSH_STABILIZE_MOUSE_TEMP = (1 << 9), | ||||
| Show All 36 Lines | typedef enum eGP_BrushIcons { | ||||
| GP_BRUSH_ICON_BLOCK = 5, | GP_BRUSH_ICON_BLOCK = 5, | ||||
| GP_BRUSH_ICON_MARKER = 6, | GP_BRUSH_ICON_MARKER = 6, | ||||
| GP_BRUSH_ICON_FILL = 7, | GP_BRUSH_ICON_FILL = 7, | ||||
| GP_BRUSH_ICON_ERASE_SOFT = 8, | GP_BRUSH_ICON_ERASE_SOFT = 8, | ||||
| GP_BRUSH_ICON_ERASE_HARD = 9, | GP_BRUSH_ICON_ERASE_HARD = 9, | ||||
| GP_BRUSH_ICON_ERASE_STROKE = 10, | GP_BRUSH_ICON_ERASE_STROKE = 10, | ||||
| GP_BRUSH_ICON_AIRBRUSH = 11, | GP_BRUSH_ICON_AIRBRUSH = 11, | ||||
| GP_BRUSH_ICON_CHISEL = 12, | GP_BRUSH_ICON_CHISEL = 12, | ||||
| GP_BRUSH_ICON_TINT = 13, | |||||
| GP_BRUSH_ICON_VERTEX_DRAW = 14, | |||||
| GP_BRUSH_ICON_VERTEX_BLUR = 15, | |||||
| GP_BRUSH_ICON_VERTEX_AVERAGE = 16, | |||||
| GP_BRUSH_ICON_VERTEX_SMEAR = 17, | |||||
| GP_BRUSH_ICON_VERTEX_REPLACE = 18, | |||||
| GP_BRUSH_ICON_GPBRUSH_SMOOTH = 19, | |||||
| GP_BRUSH_ICON_GPBRUSH_THICKNESS = 20, | |||||
| GP_BRUSH_ICON_GPBRUSH_STRENGTH = 21, | |||||
| GP_BRUSH_ICON_GPBRUSH_RANDOMIZE = 22, | |||||
| GP_BRUSH_ICON_GPBRUSH_GRAB = 23, | |||||
| GP_BRUSH_ICON_GPBRUSH_PUSH = 24, | |||||
| GP_BRUSH_ICON_GPBRUSH_TWIST = 25, | |||||
| GP_BRUSH_ICON_GPBRUSH_PINCH = 26, | |||||
| GP_BRUSH_ICON_GPBRUSH_CLONE = 27, | |||||
| GP_BRUSH_ICON_GPBRUSH_WEIGHT = 28, | |||||
| } eGP_BrushIcons; | } eGP_BrushIcons; | ||||
| typedef enum eBrushCurvePreset { | typedef enum eBrushCurvePreset { | ||||
| BRUSH_CURVE_CUSTOM = 0, | BRUSH_CURVE_CUSTOM = 0, | ||||
| 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, | 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, | ||||
| } eBrushElasticDeformType; | } eBrushElasticDeformType; | ||||
| /* Gpencilsettings.Vertex_mode */ | |||||
| typedef enum eGp_Vertex_Mode { | |||||
| /* Affect to Stroke only. */ | |||||
| GPPAINT_MODE_STROKE = 0, | |||||
| /* Affect to Fill only. */ | |||||
| GPPAINT_MODE_FILL = 1, | |||||
| /* Affect to both. */ | |||||
| GPPAINT_MODE_BOTH = 2, | |||||
| } eGp_Vertex_Mode; | |||||
| /* sculpt_flag */ | |||||
| typedef enum eGP_Sculpt_Flag { | |||||
| /* invert the effect of the brush */ | |||||
| GP_SCULPT_FLAG_INVERT = (1 << 0), | |||||
| /* smooth brush affects pressure values as well */ | |||||
| GP_SCULPT_FLAG_SMOOTH_PRESSURE = (1 << 2), | |||||
| /* temporary invert action */ | |||||
| GP_SCULPT_FLAG_TMP_INVERT = (1 << 3), | |||||
| } eGP_Sculpt_Flag; | |||||
| /* sculpt_mode_flag */ | |||||
| typedef enum eGP_Sculpt_Mode_Flag { | |||||
| /* apply brush to position */ | |||||
| GP_SCULPT_FLAGMODE_APPLY_POSITION = (1 << 0), | |||||
| /* apply brush to strength */ | |||||
| GP_SCULPT_FLAGMODE_APPLY_STRENGTH = (1 << 1), | |||||
| /* apply brush to thickness */ | |||||
| GP_SCULPT_FLAGMODE_APPLY_THICKNESS = (1 << 2), | |||||
| /* apply brush to uv data */ | |||||
| GP_SCULPT_FLAGMODE_APPLY_UV = (1 << 3), | |||||
| } eGP_Sculpt_Mode_Flag; | |||||
| typedef enum eAutomasking_flag { | typedef enum eAutomasking_flag { | ||||
| BRUSH_AUTOMASKING_TOPOLOGY = (1 << 0), | BRUSH_AUTOMASKING_TOPOLOGY = (1 << 0), | ||||
| } eAutomasking_flag; | } eAutomasking_flag; | ||||
| typedef struct Brush { | typedef struct Brush { | ||||
| ID id; | ID id; | ||||
| struct BrushClone clone; | struct BrushClone clone; | ||||
| ▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | typedef struct Brush { | ||||
| /** 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 _pad1[5]; | /** Active grease pencil vertex tool. */ | ||||
| char gpencil_vertex_tool; | |||||
| /** Active grease pencil sculpt tool. */ | |||||
| char gpencil_sculpt_tool; | |||||
| /** Active grease pencil weight tool. */ | |||||
| char gpencil_weight_tool; | |||||
| char _pad1_[6]; | |||||
| 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; | ||||
| ▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | typedef struct Brush { | ||||
| float sub_col[4]; | float sub_col[4]; | ||||
| float stencil_pos[2]; | float stencil_pos[2]; | ||||
| float stencil_dimension[2]; | float stencil_dimension[2]; | ||||
| float mask_stencil_pos[2]; | float mask_stencil_pos[2]; | ||||
| float mask_stencil_dimension[2]; | float mask_stencil_dimension[2]; | ||||
| char _pad3[4]; | |||||
| struct BrushGpencilSettings *gpencil_settings; | struct BrushGpencilSettings *gpencil_settings; | ||||
| } Brush; | } Brush; | ||||
| /* Struct to hold palette colors for sorting. */ | |||||
| typedef struct tPaletteColorHSV { | |||||
| float rgb[3]; | |||||
| float value; | |||||
| float h; | |||||
| float s; | |||||
| float v; | |||||
| } tPaletteColorHSV; | |||||
| typedef struct PaletteColor { | typedef struct PaletteColor { | ||||
| struct PaletteColor *next, *prev; | struct PaletteColor *next, *prev; | ||||
| /* two values, one to store rgb, other to store values for sculpt/weight */ | /* two values, one to store rgb, other to store values for sculpt/weight */ | ||||
| float rgb[3]; | float rgb[3]; | ||||
| float value; | float value; | ||||
| } PaletteColor; | } PaletteColor; | ||||
| typedef struct Palette { | typedef struct Palette { | ||||
| ▲ Show 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | typedef enum eBrushWeightPaintTool { | ||||
| WPAINT_TOOL_SMEAR = 3, | WPAINT_TOOL_SMEAR = 3, | ||||
| } eBrushWeightPaintTool; | } eBrushWeightPaintTool; | ||||
| /* BrushGpencilSettings->brush type */ | /* BrushGpencilSettings->brush type */ | ||||
| typedef enum eBrushGPaintTool { | typedef enum eBrushGPaintTool { | ||||
| GPAINT_TOOL_DRAW = 0, | GPAINT_TOOL_DRAW = 0, | ||||
| GPAINT_TOOL_FILL = 1, | GPAINT_TOOL_FILL = 1, | ||||
| GPAINT_TOOL_ERASE = 2, | GPAINT_TOOL_ERASE = 2, | ||||
| GPAINT_TOOL_TINT = 3, | |||||
| } eBrushGPaintTool; | } eBrushGPaintTool; | ||||
| /* BrushGpencilSettings->brush type */ | |||||
| typedef enum eBrushGPVertexTool { | |||||
| GPVERTEX_TOOL_DRAW = 0, | |||||
| GPVERTEX_TOOL_BLUR = 1, | |||||
| GPVERTEX_TOOL_AVERAGE = 2, | |||||
| GPVERTEX_TOOL_TINT = 3, | |||||
| GPVERTEX_TOOL_SMEAR = 4, | |||||
| GPVERTEX_TOOL_REPLACE = 5, | |||||
| } eBrushGPVertexTool; | |||||
| /* BrushGpencilSettings->brush type */ | |||||
| typedef enum eBrushGPSculptTool { | |||||
| GPSCULPT_TOOL_SMOOTH = 0, | |||||
| GPSCULPT_TOOL_THICKNESS = 1, | |||||
| GPSCULPT_TOOL_STRENGTH = 2, | |||||
| GPSCULPT_TOOL_GRAB = 3, | |||||
| GPSCULPT_TOOL_PUSH = 4, | |||||
| GPSCULPT_TOOL_TWIST = 5, | |||||
| GPSCULPT_TOOL_PINCH = 6, | |||||
| GPSCULPT_TOOL_RANDOMIZE = 7, | |||||
| GPSCULPT_TOOL_CLONE = 8, | |||||
| } eBrushGPSculptTool; | |||||
| /* BrushGpencilSettings->brush type */ | |||||
| typedef enum eBrushGPWeightTool { | |||||
| GPWEIGHT_TOOL_DRAW = 0, | |||||
| } eBrushGPWeightTool; | |||||
| /* direction that the brush displaces along */ | /* direction that the brush displaces along */ | ||||
| enum { | enum { | ||||
| SCULPT_DISP_DIR_AREA = 0, | SCULPT_DISP_DIR_AREA = 0, | ||||
| SCULPT_DISP_DIR_VIEW = 1, | SCULPT_DISP_DIR_VIEW = 1, | ||||
| SCULPT_DISP_DIR_X = 2, | SCULPT_DISP_DIR_X = 2, | ||||
| SCULPT_DISP_DIR_Y = 3, | SCULPT_DISP_DIR_Y = 3, | ||||
| SCULPT_DISP_DIR_Z = 4, | SCULPT_DISP_DIR_Z = 4, | ||||
| }; | }; | ||||
| Show All 22 Lines | |||||