60namespace ed::sculpt_paint {
131 const float pressure,
133 float r_mouse_out[2]);
144 const float mouse_init[2],
148 bool *r_location_is_set);
179 const void *user_data,
256 const float mval_fl[2]);
271 ImBuf *ibuf,
int x,
int y,
int w,
int h,
int *tx,
int *ty,
int *tw,
int *th);
277 const float prev_mval[2],
287 const float color[3],
289 const float mouse_init[2],
290 const float mouse_final[2],
293 const bContext *C,
Brush *br,
const float mouse_init[2],
const float mouse_final[2],
void *ps);
297 const float prev_pos[2],
309 bool color_correction,
368 const float cursor_position[2]);
384 const float bb_min[3],
385 const float bb_max[3],
398 const rcti &screen_rect);
419 bContext *C,
ARegion *region,
int x,
int y,
bool texpaint_proj,
bool palette);
515#define PAINT_CURVE_NUM_SEGMENTS 40
534 const float angle_cos,
544 float *r_brush_size_pressure,
545 float *r_brush_alpha_value,
546 float *r_brush_alpha_pressure);
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
virtual ~PaintModeData()=default
const Depsgraph * depsgraph
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
float view_angle_limits_apply_falloff(const NormalAnglePrecalc *a, float angle_cos, float *mask_p)
bool brush_use_accumulate_ex(const Brush &brush, eObjectMode ob_mode)
void view_angle_limits_init(NormalAnglePrecalc *a, float angle, bool do_mask_normal)
void get_brush_alpha_data(const Scene &scene, const SculptSession &ss, const Brush &brush, float *r_brush_size_pressure, float *r_brush_alpha_value, float *r_brush_alpha_pressure)
bool use_normal(const VPaint &vp)
void smooth_brush_toggle_on(const bContext *C, Paint *paint, StrokeCache *cache)
void mode_exit_generic(Object &ob, eObjectMode mode_flag)
void init_session_data(const ToolSettings &ts, Object &ob)
bool test_brush_angle_falloff(const Brush &brush, const NormalAnglePrecalc &normal_angle_precalc, const float angle_cos, float *brush_strength)
void mode_enter_generic(Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob, eObjectMode mode_flag)
void update_cache_invariants(bContext *C, VPaint &vp, SculptSession &ss, wmOperator *op, const float mval[2])
void smooth_brush_toggle_off(const bContext *C, Paint *paint, StrokeCache *cache)
bool brush_use_accumulate(const VPaint &vp)
void init_stroke(Depsgraph &depsgraph, Object &ob)
void update_cache_variants(bContext *C, VPaint &vp, Object &ob, PointerRNA *ptr)
IndexMask pbvh_gather_generic(const Depsgraph &depsgraph, const Object &ob, const VPaint &wp, const Brush &brush, IndexMaskMemory &memory)
bool mode_toggle_poll_test(bContext *C)
void init_session(Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob, eObjectMode object_mode)
void last_stroke_update(Scene &scene, const float location[3])
int paint_stroke_exec(bContext *C, wmOperator *op, PaintStroke *stroke)
void BRUSH_OT_asset_save(wmOperatorType *ot)
bool paint_supports_texture(PaintMode mode)
void(*)(const bContext *C, PaintStroke *stroke, bool final) StrokeRedraw
bool paint_stroke_started(PaintStroke *stroke)
void BRUSH_OT_asset_delete(wmOperatorType *ot)
void BRUSH_OT_asset_edit_metadata(wmOperatorType *ot)
void paint_stroke_jitter_pos(Scene &scene, const PaintStroke &stroke, const PaintMode mode, const Brush &brush, const float pressure, const float mval[2], float r_mouse_out[2])
float3 symmetry_flip(const float3 &src, const ePaintSymmetryFlags symm)
void paint_stroke_cancel(bContext *C, wmOperator *op, PaintStroke *stroke)
bool paint_supports_dynamic_tex_coords(const Brush &br, PaintMode mode)
bool paint_supports_dynamic_size(const Brush &br, PaintMode mode)
void(*)(bContext *C, wmOperator *op, PaintStroke *stroke, PointerRNA *itemptr) StrokeUpdateStep
void BRUSH_OT_asset_load_preview(wmOperatorType *ot)
bool paint_stroke_flipped(PaintStroke *stroke)
ViewContext * paint_stroke_view_context(PaintStroke *stroke)
bool paint_brush_cursor_poll(bContext *C)
int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event, PaintStroke **stroke_p)
bool(*)(bContext *C, float location[3], const float mouse[2], bool force_original) StrokeGetLocation
void BRUSH_OT_asset_revert(wmOperatorType *ot)
wmKeyMap * paint_stroke_modal_keymap(wmKeyConfig *keyconf)
bool(*)(bContext *C, wmOperator *op, const float mouse[2]) StrokeTestStart
bool paint_brush_update(bContext *C, const Brush &brush, PaintMode mode, PaintStroke *stroke, const float mouse_init[2], float mouse[2], float pressure, float r_location[3], bool *r_location_is_set)
void * paint_stroke_mode_data(PaintStroke *stroke)
float paint_stroke_distance_get(PaintStroke *stroke)
bool paint_space_stroke_enabled(const Brush &br, PaintMode mode)
void BRUSH_OT_asset_save_as(wmOperatorType *ot)
void paint_stroke_free(bContext *C, wmOperator *op, PaintStroke *stroke)
PaintStroke * paint_stroke_new(bContext *C, wmOperator *op, StrokeGetLocation get_location, StrokeTestStart test_start, StrokeUpdateStep update_step, StrokeRedraw redraw, StrokeDone done, int event_type)
void BRUSH_OT_asset_activate(wmOperatorType *ot)
void(*)(const bContext *C, PaintStroke *stroke) StrokeDone
bool paint_stroke_inverted(PaintStroke *stroke)
bool paint_brush_tool_poll(bContext *C)
void paint_stroke_set_mode_data(PaintStroke *stroke, std::unique_ptr< PaintModeData > mode_data)
bool paint_supports_smooth_stroke(PaintStroke *stroke, const Brush &br, PaintMode mode)
float ED_wpaint_blend_tool(int tool, float weight, float paintval, float alpha)
void paint_cursor_delete_textures()
void SCULPT_OT_uv_sculpt_relax(wmOperatorType *ot)
void PAINT_OT_weight_set(wmOperatorType *ot)
void PAINT_OT_vertex_color_set(wmOperatorType *ot)
void PAINT_OT_face_select_more(wmOperatorType *ot)
void PAINT_OT_vert_select_less(wmOperatorType *ot)
bool paint_curve_poll(bContext *C)
void PAINT_OT_vertex_color_smooth(wmOperatorType *ot)
int ED_wpaint_mirror_vgroup_ensure(Object *ob, int vgroup_active)
@ WPAINT_GRADIENT_TYPE_RADIAL
@ WPAINT_GRADIENT_TYPE_LINEAR
bool paint_convert_bb_to_rect(rcti *rect, const float bb_min[3], const float bb_max[3], const ARegion ®ion, const RegionView3D &rv3d, const Object &ob)
void PAINT_OT_weight_paint(wmOperatorType *ot)
void PAINT_OT_face_select_hide(wmOperatorType *ot)
void PAINT_OT_face_select_loop(wmOperatorType *ot)
void PAINT_OT_vertex_color_hsv(wmOperatorType *ot)
void paint_init_pivot(Object *ob, Scene *scene)
void PAINT_OT_vert_select_linked(wmOperatorType *ot)
unsigned int ED_vpaint_blend_tool(int tool, uint col, uint paintcol, int alpha_i)
bool vert_paint_poll(bContext *C)
void PAINT_OT_add_texture_paint_slot(wmOperatorType *ot)
void PAINT_OT_vertex_paint(wmOperatorType *ot)
void PAINT_OT_face_select_linked_pick(wmOperatorType *ot)
void imapaint_image_update(SpaceImage *sima, Image *image, ImBuf *ibuf, ImageUser *iuser, short texpaint)
void paint_brush_init_tex(Brush *brush)
VertProjHandle * ED_vpaint_proj_handle_create(Depsgraph &depsgraph, Scene &scene, Object &ob, blender::Span< blender::float3 > &r_vert_positions, blender::Span< blender::float3 > &r_vert_normals)
bool weight_paint_mode_poll(bContext *C)
void PAINTCURVE_OT_new(wmOperatorType *ot)
void paint_curve_mask_cache_update(CurveMaskCache *curve_mask_cache, const Brush *brush, int diameter, float radius, const float cursor_position[2])
void PAINT_OT_vert_select_linked_pick(wmOperatorType *ot)
bool weight_paint_poll(bContext *C)
void(*)(const float col[3], const void *user_data, float r_col[3]) VPaintTransform_Callback
void PAINT_OT_vert_select_ungrouped(wmOperatorType *ot)
void * paint_proj_new_stroke(bContext *C, Object *ob, const float mouse[2], int mode)
void * paint_2d_new_stroke(bContext *, wmOperator *, int mode)
bool weight_paint_mode_region_view3d_poll(bContext *C)
bool facemask_paint_poll(bContext *C)
bool image_texture_paint_poll(bContext *C)
void BRUSH_OT_sculpt_curves_falloff_preset(wmOperatorType *ot)
void paint_2d_bucket_fill(const bContext *C, const float color[3], Brush *br, const float mouse_init[2], const float mouse_final[2], void *ps)
void PAINTCURVE_OT_add_point(wmOperatorType *ot)
void PAINT_OT_sample_color(wmOperatorType *ot)
void BRUSH_OT_curve_preset(wmOperatorType *ot)
void PAINTCURVE_OT_delete_point(wmOperatorType *ot)
void paint_2d_gradient_fill(const bContext *C, Brush *br, const float mouse_init[2], const float mouse_final[2], void *ps)
void PAINT_OT_texture_paint_toggle(wmOperatorType *ot)
bool mask_paint_poll(bContext *C)
float paint_calc_object_space_radius(const ViewContext &vc, const blender::float3 ¢er, float pixel_radius)
void paint_2d_stroke_done(void *ps)
bool vertex_paint_poll_ignore_tool(bContext *C)
void paint_curve_mask_cache_free_data(CurveMaskCache *curve_mask_cache)
BlurKernel * paint_new_blur_kernel(Brush *br, bool proj)
void paint_proj_stroke(const bContext *C, void *ps_handle_p, const float prev_pos[2], const float pos[2], bool eraser, float pressure, float distance, float size)
void PAINT_OT_add_simple_uvs(wmOperatorType *ot)
void PAINT_OT_face_select_less(wmOperatorType *ot)
void PAINT_OT_weight_sample(wmOperatorType *ot)
void PAINT_OT_vert_select_all(wmOperatorType *ot)
void PAINT_OT_vertex_color_levels(wmOperatorType *ot)
void PAINTCURVE_OT_draw(wmOperatorType *ot)
void paint_delete_blur_kernel(BlurKernel *)
bool paint_use_opacity_masking(Brush *brush)
void paint_proj_redraw(const bContext *C, void *ps_handle_p, bool final)
void PAINT_OT_face_select_all(wmOperatorType *ot)
void PAINT_OT_vertex_color_from_weight(wmOperatorType *ot)
void PAINT_OT_face_select_linked(wmOperatorType *ot)
void PAINT_OT_brush_colors_flip(wmOperatorType *ot)
bool vertex_paint_mode_poll(bContext *C)
void ED_vpaint_proj_handle_update(Depsgraph *depsgraph, VertProjHandle *vp_handle, ARegion *region, const float mval_fl[2])
bool weight_paint_poll_ignore_tool(bContext *C)
void ED_vpaint_proj_handle_free(VertProjHandle *vp_handle)
bool image_paint_poll(bContext *C)
void paint_calc_redraw_planes(float planes[4][4], const ARegion ®ion, const Object &ob, const rcti &screen_rect)
void PAINT_OT_weight_from_bones(wmOperatorType *ot)
void PAINT_OT_vertex_color_brightness_contrast(wmOperatorType *ot)
bool get_imapaint_zoom(bContext *C, float *zoomx, float *zoomy)
void PAINT_OT_weight_paint_toggle(wmOperatorType *ot)
void PAINT_OT_weight_gradient(wmOperatorType *ot)
void PAINT_OT_project_image(wmOperatorType *ot)
void paint_2d_stroke(void *ps, const float prev_mval[2], const float mval[2], bool eraser, float pressure, float distance, float base_size)
void SCULPT_OT_uv_sculpt_pinch(wmOperatorType *ot)
void PAINT_OT_grab_clone(wmOperatorType *ot)
void paint_proj_stroke_done(void *ps_handle_p)
void paint_brush_color_get(Scene *scene, const Paint *paint, Brush *br, bool color_correction, bool invert, float distance, float pressure, ColorManagedDisplay *display, float r_color[3])
void paint_brush_exit_tex(Brush *brush)
void paint_sample_color(bContext *C, ARegion *region, int x, int y, bool texpaint_proj, bool palette)
void PAINT_OT_vertex_paint_toggle(wmOperatorType *ot)
void PAINTCURVE_OT_cursor(wmOperatorType *ot)
bool ED_wpaint_ensure_data(bContext *C, ReportList *reports, enum eWPaintFlag flag, WPaintVGroupIndex *vgroup_index)
void PAINT_OT_vertex_color_invert(wmOperatorType *ot)
void imapaint_region_tiles(ImBuf *ibuf, int x, int y, int w, int h, int *tx, int *ty, int *tw, int *th)
void PAINT_OT_vert_select_hide(wmOperatorType *ot)
void PAINTCURVE_OT_slide(wmOperatorType *ot)
void PAINT_OT_weight_sample_group(wmOperatorType *ot)
void PAINT_OT_vert_select_more(wmOperatorType *ot)
void paint_2d_redraw(const bContext *C, void *ps, bool final)
bool paint_get_tex_pixel(const MTex *mtex, float u, float v, ImagePool *pool, int thread, float *r_intensity, float r_rgba[4])
void SCULPT_OT_uv_sculpt_grab(wmOperatorType *ot)
void PAINT_OT_image_paint(wmOperatorType *ot)
void PAINT_OT_face_vert_reveal(wmOperatorType *ot)
void paint_stroke_operator_properties(wmOperatorType *ot)
void set_imapaintpartial(ImagePaintPartialRedraw *ippr)
void PAINTCURVE_OT_select(wmOperatorType *ot)
bool vertex_paint_poll(bContext *C)
void PAINT_OT_image_from_view(wmOperatorType *ot)
ImagePaintPartialRedraw * get_imapaintpartial()
static float brush_strength(const Sculpt &sd, const blender::ed::sculpt_paint::StrokeCache &cache, const float feather, const UnifiedPaintSettings &ups, const PaintModeSettings &)
Caching structure for curve mask.
ushort * curve_mask
Curve mask that can be passed as curve_mask parameter when.
float * sampled_curve
sampled version of the brush curve-mapping.
int last_curve_timestamp
Last CurveMapping.changed_timestamp being read.
size_t curve_mask_size
Size in bytes of the curve_mask field.