Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_intern.h
| Show First 20 Lines • Show All 416 Lines • ▼ Show 20 Lines | typedef struct AutomaskingSettings { | ||||
| struct CurveMapping *cavity_curve; | struct CurveMapping *cavity_curve; | ||||
| float start_normal_limit, start_normal_falloff; | float start_normal_limit, start_normal_falloff; | ||||
| float view_normal_limit, view_normal_falloff; | float view_normal_limit, view_normal_falloff; | ||||
| } AutomaskingSettings; | } AutomaskingSettings; | ||||
| typedef struct AutomaskingCache { | typedef struct AutomaskingCache { | ||||
| AutomaskingSettings settings; | AutomaskingSettings settings; | ||||
| bool has_full_factor_cache; /* Cache was built for entire mesh at once. */ | |||||
| bool can_reuse_mask; | bool can_reuse_mask; | ||||
| uchar current_stroke_id; | uchar current_stroke_id; | ||||
| } AutomaskingCache; | } AutomaskingCache; | ||||
| typedef struct FilterCache { | typedef struct FilterCache { | ||||
| bool enabled_axis[3]; | bool enabled_axis[3]; | ||||
| bool enabled_force_axis[3]; | bool enabled_force_axis[3]; | ||||
| ▲ Show 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | typedef struct StrokeCache { | ||||
| float multiplane_scrape_angle; | float multiplane_scrape_angle; | ||||
| float wet_mix_prev_color[4]; | float wet_mix_prev_color[4]; | ||||
| float density_seed; | float density_seed; | ||||
| rcti previous_r; /* previous redraw rectangle */ | rcti previous_r; /* previous redraw rectangle */ | ||||
| rcti current_r; /* current redraw rectangle */ | rcti current_r; /* current redraw rectangle */ | ||||
| bool use_pixels; | |||||
| int stroke_id; | int stroke_id; | ||||
| } StrokeCache; | } StrokeCache; | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Sculpt Expand | /** \name Sculpt Expand | ||||
| * \{ */ | * \{ */ | ||||
| typedef enum eSculptExpandFalloffType { | typedef enum eSculptExpandFalloffType { | ||||
| ▲ Show 20 Lines • Show All 664 Lines • ▼ Show 20 Lines | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Auto-masking. | /** \name Auto-masking. | ||||
| * \{ */ | * \{ */ | ||||
| typedef struct AutomaskingNodeData { | typedef struct AutomaskingNodeData { | ||||
| PBVHNode *node; | PBVHNode *node; | ||||
| SculptOrigVertData orig_data; | SculptOrigVertData orig_data; | ||||
| bool have_orig_data; | bool have_orig_data; | ||||
| bool initializing; | |||||
| } AutomaskingNodeData; | } AutomaskingNodeData; | ||||
| /** Call before PBVH vertex iteration. | /** Call before PBVH vertex iteration. | ||||
| * \param automask_data: pointer to an uninitialized AutomaskingNodeData struct. | * \param automask_data: pointer to an uninitialized AutomaskingNodeData struct. | ||||
| */ | */ | ||||
| void SCULPT_automasking_node_begin(struct Object *ob, | void SCULPT_automasking_node_begin(struct Object *ob, | ||||
| const SculptSession *ss, | const SculptSession *ss, | ||||
| struct AutomaskingCache *automasking, | struct AutomaskingCache *automasking, | ||||
| ▲ Show 20 Lines • Show All 564 Lines • ▼ Show 20 Lines | |||||
| /* end sculpt_brush_types.c */ | /* end sculpt_brush_types.c */ | ||||
| /* sculpt_ops.c */ | /* sculpt_ops.c */ | ||||
| void SCULPT_OT_brush_stroke(struct wmOperatorType *ot); | void SCULPT_OT_brush_stroke(struct wmOperatorType *ot); | ||||
| /* end sculpt_ops.c */ | /* end sculpt_ops.c */ | ||||
| /* Update automasking factor cache incrementally; currently used only by texture paint. */ | |||||
| void SCULPT_automasking_cache_check(struct Object *ob, | |||||
| struct SculptSession *ss, | |||||
| struct AutomaskingCache *automasking, | |||||
| struct PBVHNode **nodes, | |||||
| int totnode); | |||||
| BLI_INLINE bool SCULPT_tool_is_paint(int tool) | BLI_INLINE bool SCULPT_tool_is_paint(int tool) | ||||
| { | { | ||||
| return ELEM(tool, SCULPT_TOOL_PAINT, SCULPT_TOOL_SMEAR); | return ELEM(tool, SCULPT_TOOL_PAINT, SCULPT_TOOL_SMEAR); | ||||
| } | } | ||||
| BLI_INLINE bool SCULPT_tool_is_mask(int tool) | BLI_INLINE bool SCULPT_tool_is_mask(int tool) | ||||
| { | { | ||||
| return ELEM(tool, SCULPT_TOOL_MASK); | return ELEM(tool, SCULPT_TOOL_MASK); | ||||
| ▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines | |||||