12#include <fmt/format.h>
116 immUniform2f(
"viewport_size", viewport_size[2], viewport_size[3]);
237 const float mouse_init[2],
239 const float pressure,
241 bool *r_location_is_set)
247 bool location_sampled =
false;
248 bool location_success =
false;
251 bool is_dry_run =
false;
252 bool do_random =
false;
253 bool do_random_mask =
false;
254 *r_location_is_set =
false;
265 cached_size_pressure_ = pressure;
280 cached_size_pressure_;
315 do_random_mask =
true;
331 const float dx = mouse[0] - initial_mouse_[0];
332 const float dy = mouse[1] - initial_mouse_[1];
340 halfway[0] = dx * 0.5f + initial_mouse_[0];
341 halfway[1] = dy * 0.5f + initial_mouse_[1];
344 if (std::optional<float3> location = this->
get_location(halfway, original_)) {
347 location_sampled =
true;
348 location_success =
true;
349 *r_location_is_set =
true;
380 *
paint,
brush, mouse_init, mode,
true, !rake_started_))
383 if (!rake_started_) {
388 rake_started_ =
true;
393 if ((do_random || do_random_mask) && !rng_) {
405 if (do_random_mask) {
412 if (!location_sampled) {
414 if (std::optional<float3> location = this->
get_location(mouse, original_)) {
416 location_success =
true;
417 *r_location_is_set =
true;
420 location_success =
true;
425 location_success =
true;
430 return location_success && !is_dry_run;
462 float factor = zoom_2d;
473 if (factor != 1.0f) {
474 const float2 delta = (jittered_position - mval) * factor;
477 return jittered_position;
497 if (tablet && (pressure >= 0.99f) &&
510 if (tablet && (pressure < 0.0002f) &&
521 last_pressure_ = pressure;
531 last_world_space_position_ += last_scene_spacing_delta_;
537 this->
paint, mode,
brush, pressure, stroke_mode_, zoom_2d_, mval);
540 bool is_location_is_set;
542 C,
brush, mode, mval, mouse_out, pressure, location, &is_location_is_set);
543 if (is_location_is_set) {
551 bool add_step =
true;
564 step.location = location;
566 step.mouse = mouse_out;
568 step.mouse_event = mval;
569 step.pressure = pressure;
584 float2 last_mouse_position,
590 const float radius =
brush.smooth_stroke_radius * zoom_2d;
591 const float u =
brush.smooth_stroke_factor;
604 r_pressure =
sample->pressure;
614 float3 last_world_space_position,
616 const float size_factor,
617 const float pressure)
619 float size_clamp = 0.0f;
622 last_world_space_position);
624 vc, *
paint, *
brush, last_object_space_position, size_factor);
632 float spacing =
brush->spacing;
637 spacing = spacing * (1.5f - spacing_factor);
660 return max_ff(min_spacing, size_clamp * spacing / 50.0f);
662 return max_ff(zoom_2d, size_clamp * spacing / 50.0f);
669 float3 last_world_space_position,
675 vc,
paint, paint_mode,
brush, last_world_space_position, zoom_2d, 1.0f, 0.5f);
684 const float clamped_spacing =
max_ff(spacing, 0.1f);
686 const int n = 100 / clamped_spacing;
687 const float h = clamped_spacing / 50.0f;
688 const float x0 =
x - 1;
691 for (
int i = 0; i < n; i++) {
692 float xx =
fabsf(x0 + i * h);
704 const float spacing = br.
spacing * factor;
710 constexpr int m = 10;
713 for (
int i = 0; i < m; i++) {
716 max = std::max(overlap,
max);
729 float3 last_world_space_position,
731 const float last_pressure,
732 const float pressure,
733 const float pressure_delta,
745 last_world_space_position,
749 const float q = s * pressure_delta / (2.0f *
length);
750 const float pressure_fac = (1.0f + q) / (1.0f - q);
754 brush->curve_size, 0, last_pressure * pressure_fac);
761 last_world_space_position,
769 last_world_space_position,
774 return 0.5f * (last_spacing + new_spacing);
779 vc,
paint, paint_mode,
brush, last_world_space_position, zoom_2d, 1.0f, pressure);
784int PaintStroke::space_stroke(
bContext *
C,
787 const float final_pressure)
799 float3 world_space_position_delta;
801 if (use_scene_spacing) {
803 const std::optional<float3> hit = this->
get_location(final_mouse, original_);
805 hit.value_or(
float3(0.0f)));
806 if (hit && stroke_over_mesh_) {
807 world_space_position_delta = world_space_position - last_world_space_position_;
809 stroke_over_mesh_ =
true;
813 world_space_position_delta = {0.0f, 0.0f, 0.0f};
814 stroke_over_mesh_ = hit.has_value();
815 if (stroke_over_mesh_) {
816 last_world_space_position_ = world_space_position;
821 float pressure = last_pressure_;
822 float pressure_delta = final_pressure - last_pressure_;
831 last_world_space_position_,
841 if (use_scene_spacing) {
842 float3 final_world_space_position;
843 world_space_position_delta =
math::normalize(world_space_position_delta);
844 final_world_space_position = world_space_position_delta * spacing +
845 last_world_space_position_;
848 last_scene_spacing_delta_ = world_space_position_delta * spacing;
853 pressure = last_pressure_ + (spacing /
length) * pressure_delta;
856 brush, spacing / no_pressure_spacing);
858 stroke_distance_ += spacing / zoom_2d_;
859 this->add_step(
C, op, mouse, pressure);
862 pressure = last_pressure_;
863 pressure_delta = final_pressure - last_pressure_;
903 event_type_ =
event->type;
919 zoom_2d_ = std::max(zoomx, zoomy);
927 this->brush->mtex.tex->ima)
930 this->brush->
mtex.
tex->
ima, &this->brush->mtex.tex->iuser,
nullptr);
931 if (tex_ibuf && tex_ibuf->
float_data() ==
nullptr) {
991 if (stroke_started_) {
995 this->
done(is_cancel, stroke_started_);
998 rv3d->rflag &= ~RV3D_PAINTING;
1010 if (stroke_cursor_) {
1144void PaintStroke::add_sample(
const int input_samples,
1147 const float pressure)
1155 sample->pressure = pressure;
1158 if (cur_sample_ >= max_samples) {
1161 if (num_samples_ < max_samples) {
1170 for (
int i = 0; i < num_samples_; i++) {
1171 average->mouse += samples_[i].mouse;
1172 average->pressure += samples_[i].pressure;
1175 average->mouse /= num_samples_;
1176 average->pressure /= num_samples_;
1185void PaintStroke::lines_spacing(bContext *
C,
1187 const float spacing,
1188 float *length_residue,
1194 bke::PaintRuntime *paint_runtime =
paint->runtime;
1203 float3 world_space_position_delta;
1204 float3 world_space_position_old;
1208 if (use_scene_spacing) {
1210 const std::optional<float3> hit_old = this->
get_location(old_pos, original_);
1212 const std::optional<float3> hit_new = this->
get_location(new_pos, original_);
1215 hit_old.value_or(
float3(0.0f)));
1217 hit_new.value_or(
float3(0.0f)));
1218 if (hit_old && hit_new && stroke_over_mesh_) {
1219 world_space_position_delta = world_space_position_new - world_space_position_old;
1221 stroke_over_mesh_ =
true;
1225 world_space_position_delta = {0.0f, 0.0f, 0.0f};
1226 stroke_over_mesh_ = hit_new.has_value();
1227 if (stroke_over_mesh_) {
1228 last_world_space_position_ = world_space_position_old;
1233 mouse_delta = new_pos - old_pos;
1245 float spacing_final = spacing - *length_residue;
1246 length += *length_residue;
1247 *length_residue = 0.0;
1250 if (use_scene_spacing) {
1251 world_space_position_delta =
math::normalize(world_space_position_delta);
1252 const float3 final_world_space_position = world_space_position_delta * spacing_final +
1253 world_space_position_old;
1262 stroke_distance_ += spacing / zoom_2d_;
1263 this->add_step(
C, op, mouse, 1.0);
1266 spacing_final = spacing;
1273 *length_residue =
length;
1276void PaintStroke::line_end(bContext *
C, wmOperator *op,
const float2 mouse)
1280 bke::PaintRuntime *paint_runtime = this->
paint->runtime;
1285 this->space_stroke(
C, op, mouse, 1.0);
1289bool PaintStroke::curve_end(bContext *
C, wmOperator *op)
1298 bke::PaintRuntime *paint_runtime =
paint->runtime;
1301 const PaintCurve *pc = br.paint_curve;
1307 const PaintCurvePoint *pcp = pc->points;
1310 float length_residue = 0.0f;
1311 for (
int i = 0; i < pc->tot_points - 1; i++, pcp++) {
1314 const PaintCurvePoint *pcp_next = pcp + 1;
1315 bool do_rake =
false;
1317 for (
int j = 0; j < 2; j++) {
1320 pcp_next->bez.vec[0][j],
1321 pcp_next->bez.vec[1][j],
1331 for (
int j = 0; j < 2; j++) {
1334 pcp_next->bez.vec[0][j],
1335 pcp_next->bez.vec[1][j],
1348 if (!stroke_started_) {
1349 last_pressure_ = 1.0;
1354 std::optional<float3> hit_position = this->
get_location(
data + 2 * j, original_);
1355 stroke_over_mesh_ = hit_position.has_value();
1361 if (stroke_started_) {
1362 this->add_step(
C, op,
data + 2 * j, 1.0);
1363 this->lines_spacing(
1364 C, op, no_pressure_spacing, &length_residue,
data + 2 * j,
data + 2 * (j + 1));
1368 this->lines_spacing(
1369 C, op, no_pressure_spacing, &length_residue,
data + 2 * j,
data + 2 * (j + 1));
1374 this->
done(
C,
false);
1383 float2 line = mouse - last_mouse_position;
1401 mouse[0] = constrained_pos[0] =
len *
cosf(
angle) + last_mouse_position[0];
1402 mouse[1] = constrained_pos[1] =
len *
sinf(
angle) + last_mouse_position[1];
1413 if (
paint ==
nullptr || br ==
nullptr) {
1416 this->
done(
C,
true);
1421 bool first_dab =
false;
1422 bool first_modal =
false;
1423 bool needs_redraw =
false;
1439 std::string msg = fmt::format(
"Tablet Pressure: {:.4f}", pressure);
1446 pressure = last_tablet_event_pressure_;
1449 last_tablet_event_pressure_ = pressure;
1453 this->add_sample(input_samples, event->
mval[0], event->
mval[1], pressure);
1456 this->calc_average_sample(&sample_average);
1460 tilt_ =
event->tablet.tilt;
1463#ifdef WITH_INPUT_NDOF
1474 if (!stroke_init_) {
1475 if (this->curve_end(
C, op)) {
1479 stroke_init_ =
true;
1484 if (!stroke_started_) {
1487 last_pressure_ = sample_average.
pressure;
1488 this->last_mouse_position = sample_average.
mouse;
1491 std::optional<float3> hit_position = this->
get_location(sample_average.
mouse, original_);
1492 stroke_over_mesh_ = hit_position.has_value();
1494 hit_position.value_or(
float3(0.0f)));
1498 if (stroke_started_) {
1537 if (!stroke_cursor_) {
1544 if (stroke_cursor_ !=
nullptr) {
1546 stroke_cursor_ =
nullptr;
1552 if (event->
type == event_type_ && !first_modal) {
1558 this->line_end(
C, op, mouse);
1559 this->
done(
C,
false);
1564 this->line_end(
C, op, sample_average.
mouse);
1565 this->
done(
C,
false);
1589 else if (first_modal ||
1601 this->last_mouse_position,
1606 if (stroke_started_) {
1608 if (this->space_stroke(
C, op, mouse, pressure)) {
1609 needs_redraw =
true;
1613 const float2 mouse_delta = mouse - this->last_mouse_position;
1615 this->add_step(
C, op, mouse, pressure);
1616 needs_redraw =
true;
1626 this->add_step(
C, op, sample_average.
mouse, sample_average.
pressure);
1627 needs_redraw =
true;
1665 if (!stroke_started_) {
1666 stroke_started_ = this->
test_start(op, mval);
1669 if (!stroke_started_) {
1679 this->paint, mode, *this->brush,
step.pressure, stroke_mode_, zoom_2d_, mval);
1689 C, *this->brush, mode, mval,
step.mouse,
step.pressure, dummy_location, &dummy_is_set);
1691 if (override_location) {
1692 if (std::optional<float3> location = this->
get_location(
step.mouse,
false)) {
1693 step.location = *location;
1703 const bool ok = stroke_started_;
1713 this->
done(
C,
false);
1719 this->
done(
C,
true);
Object is a sort of wrapper for general info.
#define PAINT_MAX_INPUT_SAMPLES
#define USER_EXPERIMENTAL_TEST(userdef, member)
Read Blender memory allocation and freeing.
#define PRF_scope(category)
#define RNA_BEGIN(sptr, itemptr, propname)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
SIMD_FORCE_INLINE btScalar length() const
Return the length of the vector.
static RandomNumberGenerator from_random_seed()
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
float length(VecOp< float, D >) RET
float2x2 invert(float2x2 mat)
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
ccl_device_inline dual3 fabs(const ccl_private dual3 &a)
bool supports_size_pressure(const Brush &brush)
void common_pressure_curves_init(Brush &brush)
bool implements_3d_texture_paint(const Brush &brush)
void set_overlay_brush_override(Paint &paint, eOverlayFlags flag)
bool is_cloth_deform_brush(const Brush &brush)
static void paint_draw_line_cursor(bContext *, const int2 &xy, const float2 &, void *customdata)
bool paint_supports_texture(PaintMode mode)
static float paint_space_stroke_spacing_no_pressure(const ViewContext &vc, const Paint *paint, const PaintMode paint_mode, const Brush *brush, float3 last_world_space_position, float zoom_2d)
static bool paint_brush_type_require_inbetween_mouse_events(const Brush &brush, const PaintMode mode)
static bool sculpt_is_grab_tool(const Brush &br)
static float paint_stroke_overlapped_curve(const Brush &br, const float x, const float spacing)
static bool paint_stroke_use_jitter(const PaintMode mode, const Brush &brush, const bool invert)
bool paint_supports_dynamic_tex_coords(const Brush &br, PaintMode mode)
bool paint_supports_dynamic_size(const Brush &br, PaintMode mode)
float2 paint_stroke_jitter_pos(Paint *paint, PaintMode mode, const Brush &brush, float pressure, BrushStrokeMode stroke_mode, float zoom_2d, const float2 &mval)
static float paint_space_stroke_spacing_variable(ViewContext &vc, const Paint *paint, const PaintMode paint_mode, const Brush *brush, float3 last_world_space_position, float zoom_2d, const float last_pressure, const float pressure, const float pressure_delta, const float length)
static bool print_pressure_status_enabled()
static bool paint_brush_type_require_location(const Brush &brush, const PaintMode mode)
static float paint_stroke_integrate_overlap(const Brush &br, const float factor)
static bool paint_stroke_use_dash(const Brush &brush)
static void paint_draw_smooth_cursor(bContext *C, const int2 &xy, const float2 &, void *customdata)
static bool paint_brush_type_raycast_original(const Brush &brush, PaintMode)
bool paint_brush_cursor_poll(bContext *C)
float object_space_radius_get(const ViewContext &vc, const Paint &paint, const Brush &brush, const float3 &location, const float scale_factor)
static bool curves_sculpt_brush_uses_spacing(const eBrushCurvesSculptType tool)
bool paint_space_stroke_enabled(const Brush &br, PaintMode mode)
bool paint_supports_smooth_stroke(const Brush &brush, PaintMode mode, BrushSwitchMode brush_switch_mode)
static const bToolRef * brush_tool_get(const ScrArea *area, const ARegion *region)
static void paint_stroke_line_constrain(float2 last_mouse_position, float2 &constrained_pos, float2 &mouse)
static bool paint_stroke_use_scene_spacing(const Brush &brush, const PaintMode mode)
static bool paint_smooth_stroke(const Brush &brush, const PaintSample *sample, const PaintMode mode, const BrushSwitchMode brush_switch_mode, float zoom_2d, float2 last_mouse_position, float last_pressure, float2 &r_mouse, float &r_pressure)
bool paint_brush_tool_poll(bContext *C)
static float paint_space_stroke_spacing(const ViewContext &vc, const Paint *paint, const PaintMode paint_mode, const Brush *brush, float3 last_world_space_position, float zoom_2d, const float size_factor, const float pressure)
T length(const VecBase< T, Size > &a)
QuaternionBase< T > normalize_and_get_length(const QuaternionBase< T > &q, T &out_length)
T interpolate(const T &a, const T &b, const FactorT &t)
MatBase< T, NumCol, NumRow > normalize(const MatBase< T, NumCol, NumRow > &a)
T distance_squared(const VecBase< T, Size > &a, const VecBase< T, Size > &b)
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
constexpr StringRefNull rotation
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
float WM_event_tablet_data(const wmEvent *event, bool *r_pen_flip, float r_tilt[2])
VecBase< uint8_t, 4 > uchar4
ScrArea * CTX_wm_area(const bContext *C)
int RNA_enum_get(PointerRNA *ptr, const char *name)
bool get_imapaint_zoom(bContext *C, float *zoomx, float *zoomy)
void BKE_curve_forward_diff_tangent_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
ViewContext ED_view3d_viewcontext_init(bContext *C, Depsgraph *depsgraph)
MINLINE void copy_v3_v3(float r[3], const float a[3])
bool BKE_paint_calculate_rake_rotation(Paint &paint, const Brush &brush, const float mouse_pos[2], PaintMode paint_mode, bool in_stroke, bool is_first_dab)
void immUniform2f(const char *name, float x, float y)
MINLINE void copy_v2_v2(float r[2], const float a[2])
GPUVertFormat * immVertexFormat()
float BKE_brush_radius_get(const Paint *paint, const Brush *brush)
void immBegin(GPUPrimType, uint vertex_len)
void GPU_line_smooth(bool enable)
wmWindow * CTX_wm_window(const bContext *C)
MINLINE float normalize_v2(float n[2])
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
void ED_view3d_project_v2(const ARegion *region, const float world[3], float r_region_co[2])
@ TOOLREF_FLAG_USE_BRUSHES
@ BRUSH_CLOTH_DEFORM_GRAB
bool BKE_brush_use_alpha_pressure(const Brush *brush)
MINLINE void mul_v3_fl(float r[3], float f)
@ SCULPT_BRUSH_TYPE_CLOTH
@ SCULPT_BRUSH_TYPE_ROTATE
@ SCULPT_BRUSH_TYPE_BOUNDARY
@ SCULPT_BRUSH_TYPE_SNAKE_HOOK
@ SCULPT_BRUSH_TYPE_THUMB
@ SCULPT_BRUSH_TYPE_ELASTIC_DEFORM
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
VecBase< float, 4 > float4
void immBindBuiltinProgram(GPUBuiltinShader shader_id)
void mul_m4_v3(const float M[4][4], float r[3])
bool WM_event_is_tablet(const wmEvent *event)
void BKE_curvemapping_init(CurveMapping *cumap)
float2 BKE_brush_jitter_pos(const Paint &paint, const Brush &brush, const float2 &pos)
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
void immUniform1f(const char *name, float x)
void immVertex2f(uint attr_id, float x, float y)
void GPU_viewport_size_get_f(float coords[4])
void BKE_report(ReportList *reports, eReportType type, const char *message)
BMesh const char void * data
@ GPU_SHADER_3D_UNIFORM_COLOR
@ GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR
wmWindowManager * CTX_wm_manager(const bContext *C)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C, bool rna_write_check=false)
PaintMode BKE_paintmode_get_from_tool(const bToolRef *tref)
@ IMAGE_PAINT_BRUSH_TYPE_FILL
@ IMAGE_PAINT_BRUSH_TYPE_CLONE
float BKE_brush_curve_strength(eBrushCurvePreset preset, const CurveMapping *cumap, float distance, float brush_radius)
@ CURVES_SCULPT_BRUSH_TYPE_ADD
@ CURVES_SCULPT_BRUSH_TYPE_DENSITY
RegionView3D * CTX_wm_region_view3d(const bContext *C)
void BKE_paint_update_brush_rake_rotation(Paint &paint, const Brush &brush, float rotation)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
MINLINE void zero_v3(float r[3])
uint GPU_vertformat_attr_add(GPUVertFormat *format, StringRef name, gpu::VertAttrType type)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void BKE_brush_randomize_texture_coords(Paint *paint, bool mask)
wmPaintCursor * WM_paint_cursor_activate(short space_type, short region_type, wmPaintCursorPoll poll, wmPaintCursorDraw draw, void *customdata)
bool BKE_brush_use_size_pressure(const Brush *brush)
ImBuf * BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **r_lock)
const Brush * BKE_paint_brush_for_read(const Paint *paint)
void immUniform4f(const char *name, float x, float y, float z, float w)
Paint * BKE_paint_get_active_from_context(const bContext *C)
MINLINE float max_ff(float a, float b)
Paint * BKE_paint_get_active_from_paintmode(Scene *sce, PaintMode mode)
float paint_calc_object_space_radius(const ViewContext &vc, const float3 ¢er, float pixel_radius)
MINLINE float square_f(float a)
Brush * BKE_paint_brush(Paint *paint)
@ USER_TABLET_SHOW_DEBUG_VALUES
Scene * CTX_data_scene(const bContext *C)
void WM_event_timer_remove(wmWindowManager *wm, wmWindow *, wmTimer *timer)
void GPU_blend(GPUBlend blend)
wmTimer * WM_event_timer_add(wmWindowManager *wm, wmWindow *win, const wmEventType event_type, const double time_step)
void immUniform1i(const char *name, int x)
VecBase< float, 3 > float3
void immUniformColor4ubv(const unsigned char rgba[4])
void immVertex2fv(uint attr_id, const float data[2])
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
Object * CTX_data_active_object(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
void ED_workspace_status_text(bContext *C, const char *str)
PaintMode BKE_paintmode_get_active_from_context(const bContext *C)
float BKE_curvemapping_evaluateF(const CurveMapping *cumap, int cur, float value)
float RNA_float_get(PointerRNA *ptr, const char *name)
void WM_paint_cursor_tag_redraw(wmWindow *win, ARegion *)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
bool WM_paint_cursor_end(wmPaintCursor *handle)
void BKE_image_release_ibuf(Image *ima, ImBuf *ibuf, void *lock)
int BKE_brush_input_samples_get(const Paint *paint, const Brush *brush)
#define PAINT_STROKE_MODAL_CANCEL
#define PAINT_CURVE_NUM_SEGMENTS
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eBrushImagePaintType image_brush_type
eBrushSculptType sculpt_brush_type
eBrushClothDeformType cloth_deform_type
eBrushCurvesSculptType curves_sculpt_brush_type
struct CurveMapping * curve_size
eOverlayFlags overlay_flags
eBrushStrokeType stroke_method
const ColorSpace * colorspace
ImBufByteBuffer byte_buffer
const float * float_data() const
eMTex_BrushMapMode brush_map_mode
eMTex_BrushAngleMode brush_angle_mode
struct CurveMapping * cavity_curve
struct UnifiedPaintSettings unified_paint_settings
bke::PaintRuntime * runtime
float initial_pixel_radius
float2 anchored_initial_mouse
float size_pressure_value
bool do_linear_conversion
float3 average_stroke_accum
int average_stroke_counter
const ocio::ColorSpace * colorspace
UnifiedPaintSettings * ups
virtual void done(bool is_cancel, bool stroke_started)=0
virtual void redraw(bool final)=0
virtual std::optional< float3 > get_location(float2 mouse, bool force_original)=0
virtual bool test_start(wmOperator *op, float2 mouse)=0
float2 last_mouse_position
virtual bool test_cancel()=0
wmOperatorStatus modal(bContext *C, wmOperator *op, const wmEvent *event)
wmOperatorStatus exec(bContext *C, wmOperator *op)
virtual void update_step(wmOperator *op, const StrokeStep &stroke_step)=0
wmEventModifierFlag modifier
void(*) cancel(bContext *C, wmOperator *op)
struct ReportList * reports
struct wmOperatorType * type
#define ISMOUSE_MOTION(event_type)