Changeset View
Standalone View
source/blender/makesdna/DNA_brush_types.h
| Context not available. | |||||
| struct CurveMapping; | struct CurveMapping; | ||||
| struct MTex; | struct MTex; | ||||
| struct Image; | struct Image; | ||||
| struct Material; | |||||
| typedef struct BrushClone { | typedef struct BrushClone { | ||||
| struct Image *image; /* image for clone tool */ | struct Image *image; /* image for clone tool */ | ||||
| Context not available. | |||||
| float mask_stencil_pos[2]; | float mask_stencil_pos[2]; | ||||
| float mask_stencil_dimension[2]; | float mask_stencil_dimension[2]; | ||||
| /* grease pencil drawing brush data */ | |||||
| short thickness; /* thickness to apply to strokes */ | |||||
campbellbarton: Why not use brush size? | |||||
| short gp_flag; /* internal grease pencil drawing flags */ | |||||
| float draw_smoothfac; /* amount of smoothing to apply to newly created strokes */ | |||||
| short draw_smoothlvl; /* number of times to apply smooth factor to new strokes */ | |||||
| short draw_subdivide; /* number of times to subdivide new strokes */ | |||||
| float draw_sensitivity; /* amount of sensivity to apply to newly created strokes */ | |||||
| float draw_strength; /* amount of alpha strength to apply to newly created strokes */ | |||||
| float draw_jitter; /* amount of jitter to apply to newly created strokes */ | |||||
| float draw_angle; /* angle when the brush has full thickness */ | |||||
| float draw_angle_factor; /* factor to apply when angle change (only 90 degrees) */ | |||||
| float draw_random_press; /* factor of randomness for pressure */ | |||||
| float draw_random_strength; /* factor of strength for strength */ | |||||
| float draw_random_sub; /* factor of randomness for subdivision */ | |||||
| char pad2[4]; | |||||
campbellbartonUnsubmitted Not Done Inline ActionsThese duplicate existing struct members - jitter, strength. This should be resolved before merge. campbellbarton: These duplicate existing struct members - jitter, strength. This should be resolved before… | |||||
antoniovAuthorUnsubmitted Not Done Inline ActionsI have been looking at the existing fields and the definition of the ranges is different of the valid values for grease pencil. Maybe the fields have similar names, but they are used in a different way. For brush size I have reused existing field, but not for these fields. antoniov: I have been looking at the existing fields and the definition of the ranges is different of the… | |||||
| struct CurveMapping *cur_sensitivity; | |||||
| struct CurveMapping *cur_strength; | |||||
| struct CurveMapping *cur_jitter; | |||||
campbellbartonUnsubmitted Not Done Inline ActionsShould use curve_ prefix. campbellbarton: Should use `curve_` prefix. | |||||
| float gp_thick_smoothfac; /* amount of thickness smoothing to apply to newly created strokes */ | |||||
| short gp_thick_smoothlvl; /* number of times to apply thickness smooth factor to new strokes */ | |||||
| short gp_fill_leak; /* number of pixel to consider the leak is too small (x 2) */ | |||||
| float gp_fill_threshold; /* factor for transparency */ | |||||
| int gp_fill_simplylvl; /* number of simplify steps */ | |||||
| int gp_fill_draw_mode; /* type of control lines drawing mode */ | |||||
| int gp_icon_id; /* icon identifier */ | |||||
campbellbartonUnsubmitted Not Done Inline ActionsBrushes already have an icon id... why have another? campbellbarton: Brushes already have an icon id... why have another? | |||||
| int gp_lazy_radius; /* distance to last point to create new point */ | |||||
| float gp_lazy_factor; /* factor of smooth */ | |||||
campbellbartonUnsubmitted Not Done Inline ActionsName 'lazy' should be 'smooth' ? - Why not use existing "smooth stroke" option? campbellbarton: Name 'lazy' should be 'smooth' ? - Why not use existing "smooth stroke" option? | |||||
| float gp_uv_random; /* random factor for UV rotation */ | |||||
| int gp_input_samples; /* maximum distance before generate new point for very fast mouse movements */ | |||||
| int gp_brush_type; /* type of brush (draw, fill, erase, etc..) */ | |||||
| int gp_eraser_mode; /* soft, hard or stroke */ | |||||
| float gp_active_smooth; /* smooth while drawing factor */ | |||||
| char pad_[4]; | |||||
| /* optional link of material to replace default in context */ | |||||
| struct Material *material; /* material */ | |||||
campbellbartonUnsubmitted Not Done Inline ActionsWould prefer these go into their own sub-struct, besides anything which is generic - eg CurveMapping. campbellbarton: Would prefer these go into their own sub-struct, besides anything which is generic - eg… | |||||
| } Brush; | } Brush; | ||||
| /* Brush->gp_flag */ | |||||
| typedef enum eGPDbrush_Flag { | |||||
| /* brush use pressure */ | |||||
| GP_BRUSH_USE_PRESSURE = (1 << 0), | |||||
| /* brush use pressure for alpha factor */ | |||||
| GP_BRUSH_USE_STENGTH_PRESSURE = (1 << 1), | |||||
| /* brush use pressure for alpha factor */ | |||||
Not Done Inline ActionsPalette is like a tool setting. I don't see why you want to those. It is like animating sculpt brush size -- not that useful at all, only gives issues. sergey: Palette is like a tool setting. I don't see why you want to those. It is like animating sculpt… | |||||
Not Done Inline ActionsNot really. Palettes group colors and color properties can be animated. It's not a tool is a property of the strokes. antoniov: Not really. Palettes group colors and color properties can be animated. It's not a tool is a… | |||||
Not Done Inline ActionsIt is used for strokes in GP, but it was not before (was bGPPalette or so before). And as far as i remember it was only used by tools. sergey: It is used for strokes in GP, but it was not before (was bGPPalette or so before). And as far… | |||||
Not Done Inline ActionsYes, before the Blender palettes were used only as tools, but after change GP to use Blender palettes instead of bGPDpalette, it was necessary to add animation options for colors and setttings. antoniov: Yes, before the Blender palettes were used only as tools, but after change GP to use Blender… | |||||
| GP_BRUSH_USE_JITTER_PRESSURE = (1 << 2), | |||||
| /* enable screen cursor */ | |||||
| GP_BRUSH_ENABLE_CURSOR = (1 << 5), | |||||
| /* fill hide transparent */ | |||||
| GP_BRUSH_FILL_HIDE = (1 << 6), | |||||
| /* show fill help lines */ | |||||
| GP_BRUSH_FILL_SHOW_HELPLINES = (1 << 7), | |||||
| /* lazy mouse */ | |||||
| GP_BRUSH_STABILIZE_MOUSE = (1 << 8), | |||||
| /* lazy mouse override (internal only) */ | |||||
| GP_BRUSH_STABILIZE_MOUSE_TEMP = (1 << 9), | |||||
| /* default eraser brush for quick switch */ | |||||
| GP_BRUSH_DEFAULT_ERASER = (1 << 10), | |||||
| /* settings group */ | |||||
| GP_BRUSH_GROUP_SETTINGS = (1 << 11), | |||||
| /* Random settings group */ | |||||
| GP_BRUSH_GROUP_RANDOM = (1 << 12) | |||||
| } eGPDbrush_Flag; | |||||
| /* Brush->gp_fill_draw_mode */ | |||||
| typedef enum eGP_FillDrawModes { | |||||
| GP_FILL_DMODE_BOTH = 0, | |||||
campbellbartonUnsubmitted Not Done Inline Actionsuse GP_BRUSH_ prefix. campbellbarton: use `GP_BRUSH_` prefix. | |||||
| GP_FILL_DMODE_STROKE = 1, | |||||
| GP_FILL_DMODE_CONTROL = 2, | |||||
| } eGP_FillDrawModes; | |||||
| /* Brush->brush type */ | |||||
| typedef enum eGP_BrushType { | |||||
| GP_BRUSH_TYPE_DRAW = 0, | |||||
| GP_BRUSH_TYPE_FILL = 1, | |||||
| GP_BRUSH_TYPE_ERASE = 2, | |||||
| } eGP_BrushType; | |||||
| /* Brush->gp_eraser_mode */ | |||||
| typedef enum eGP_BrushEraserMode { | |||||
| GP_BRUSH_ERASER_SOFT = 0, | |||||
| GP_BRUSH_ERASER_HARD = 1, | |||||
| GP_BRUSH_ERASER_STROKE = 2, | |||||
| } eGP_BrushEraserMode; | |||||
| /* default brush icons */ | |||||
| typedef enum eGP_BrushIcons { | |||||
| GPBRUSH_PENCIL = 1, | |||||
campbellbartonUnsubmitted Not Done Inline Actionsuse GP_BRUSH_ICON_ prefix campbellbarton: use `GP_BRUSH_ICON_` prefix | |||||
| GPBRUSH_PEN = 2, | |||||
| GPBRUSH_INK = 3, | |||||
| GPBRUSH_INKNOISE = 4, | |||||
| GPBRUSH_BLOCK = 5, | |||||
| GPBRUSH_MARKER = 6, | |||||
| GPBRUSH_FILL = 7, | |||||
| GPBRUSH_ERASE_SOFT = 8, | |||||
| GPBRUSH_ERASE_HARD = 9, | |||||
| GPBRUSH_ERASE_STROKE = 10 | |||||
| } eGP_BrushIcons; | |||||
| 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 */ | ||||
| Context not available. | |||||
| }; | }; | ||||
| #define MAX_BRUSH_PIXEL_RADIUS 500 | #define MAX_BRUSH_PIXEL_RADIUS 500 | ||||
| #define GP_MAX_BRUSH_PIXEL_RADIUS 1000 | |||||
| #endif /* __DNA_BRUSH_TYPES_H__ */ | #endif /* __DNA_BRUSH_TYPES_H__ */ | ||||
| Context not available. | |||||
Why not use brush size?