Blender V5.0
paint_stroke.cc File Reference
#include <algorithm>
#include <cfloat>
#include <cmath>
#include "fmt/format.h"
#include "MEM_guardedalloc.h"
#include "BLI_math_matrix.h"
#include "BLI_math_matrix.hh"
#include "BLI_math_vector.h"
#include "BLI_rand.hh"
#include "BLI_utildefines.h"
#include "DNA_brush_types.h"
#include "DNA_curve_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "RNA_access.hh"
#include "BKE_brush.hh"
#include "BKE_colortools.hh"
#include "BKE_context.hh"
#include "BKE_curve.hh"
#include "BKE_global.hh"
#include "BKE_image.hh"
#include "BKE_paint.hh"
#include "BKE_paint_types.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "GPU_immediate.hh"
#include "GPU_state.hh"
#include "ED_screen.hh"
#include "ED_view3d.hh"
#include "IMB_imbuf_types.hh"
#include "paint_intern.hh"
#include "sculpt_cloth.hh"
#include "sculpt_intern.hh"

Go to the source code of this file.

Classes

struct  blender::ed::sculpt_paint::PaintSample
struct  blender::ed::sculpt_paint::PaintStroke

Namespaces

namespace  blender
namespace  blender::ed
namespace  blender::ed::sculpt_paint

Macros

#define PAINT_STROKE_MODAL_CANCEL   1

Functions

static void blender::ed::sculpt_paint::paint_draw_smooth_cursor (bContext *C, const blender::int2 &xy, const blender::float2 &, void *customdata)
static void blender::ed::sculpt_paint::paint_draw_line_cursor (bContext *, const blender::int2 &xy, const blender::float2 &, void *customdata)
static bool blender::ed::sculpt_paint::image_paint_brush_type_require_location (const Brush &brush, const PaintMode mode)
static bool blender::ed::sculpt_paint::paint_stroke_use_scene_spacing (const Brush &brush, const PaintMode mode)
static bool blender::ed::sculpt_paint::image_paint_brush_type_raycast_original (const Brush &brush, PaintMode)
static bool blender::ed::sculpt_paint::image_paint_brush_type_require_inbetween_mouse_events (const Brush &brush, const PaintMode mode)
bool blender::ed::sculpt_paint::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)
static bool blender::ed::sculpt_paint::paint_stroke_use_dash (const Brush &brush)
static bool blender::ed::sculpt_paint::paint_stroke_use_jitter (const PaintMode mode, const Brush &brush, const bool invert)
void blender::ed::sculpt_paint::paint_stroke_jitter_pos (const PaintStroke &stroke, PaintMode mode, const Brush &brush, float pressure, const float mval[2], float r_mouse_out[2])
static void blender::ed::sculpt_paint::paint_brush_stroke_add_step (bContext *C, wmOperator *op, PaintStroke *stroke, const float2 mval, float pressure)
static bool blender::ed::sculpt_paint::paint_smooth_stroke (PaintStroke *stroke, const PaintSample *sample, const PaintMode mode, float2 &r_mouse, float &r_pressure)
static float blender::ed::sculpt_paint::paint_space_stroke_spacing (const bContext *C, PaintStroke *stroke, const float size_factor, const float pressure)
static float blender::ed::sculpt_paint::paint_space_stroke_spacing_no_pressure (const bContext *C, PaintStroke *stroke)
static float blender::ed::sculpt_paint::paint_stroke_overlapped_curve (const Brush &br, const float x, const float spacing)
static float blender::ed::sculpt_paint::paint_stroke_integrate_overlap (const Brush &br, const float factor)
static float blender::ed::sculpt_paint::paint_space_stroke_spacing_variable (bContext *C, PaintStroke *stroke, const float pressure, const float pressure_delta, const float length)
static int blender::ed::sculpt_paint::paint_space_stroke (bContext *C, wmOperator *op, PaintStroke *stroke, const float2 final_mouse, const float final_pressure)
static bool blender::ed::sculpt_paint::print_pressure_status_enabled ()
PaintStrokeblender::ed::sculpt_paint::paint_stroke_new (bContext *C, wmOperator *op, StrokeGetLocation get_location, StrokeTestStart test_start, StrokeUpdateStep update_step, StrokeRedraw redraw, StrokeDone done, int event_type)
void blender::ed::sculpt_paint::paint_stroke_free (bContext *C, wmOperator *op, PaintStroke *stroke)
static void blender::ed::sculpt_paint::stroke_done (bContext *C, wmOperator *op, PaintStroke *stroke)
static bool blender::ed::sculpt_paint::curves_sculpt_brush_uses_spacing (const eBrushCurvesSculptType tool)
bool blender::ed::sculpt_paint::paint_space_stroke_enabled (const Brush &br, PaintMode mode)
static bool blender::ed::sculpt_paint::sculpt_is_grab_tool (const Brush &br)
bool blender::ed::sculpt_paint::paint_supports_dynamic_size (const Brush &br, PaintMode mode)
bool blender::ed::sculpt_paint::paint_supports_smooth_stroke (PaintStroke *stroke, const Brush &br, PaintMode mode)
bool blender::ed::sculpt_paint::paint_supports_texture (PaintMode mode)
bool blender::ed::sculpt_paint::paint_supports_dynamic_tex_coords (const Brush &br, PaintMode mode)
wmKeyMapblender::ed::sculpt_paint::paint_stroke_modal_keymap (wmKeyConfig *keyconf)
static void blender::ed::sculpt_paint::paint_stroke_add_sample (PaintStroke *stroke, const int input_samples, const float x, const float y, const float pressure)
static void blender::ed::sculpt_paint::paint_stroke_sample_average (const PaintStroke *stroke, PaintSample *average)
static void blender::ed::sculpt_paint::paint_line_strokes_spacing (bContext *C, wmOperator *op, PaintStroke *stroke, const float spacing, float *length_residue, const float2 old_pos, const float2 new_pos)
static void blender::ed::sculpt_paint::paint_stroke_line_end (bContext *C, wmOperator *op, PaintStroke *stroke, const float2 mouse)
static bool blender::ed::sculpt_paint::paint_stroke_curve_end (bContext *C, wmOperator *op, PaintStroke *stroke)
static void blender::ed::sculpt_paint::paint_stroke_line_constrain (PaintStroke *stroke, float2 &mouse)
wmOperatorStatus blender::ed::sculpt_paint::paint_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event, PaintStroke **stroke_p)
wmOperatorStatus blender::ed::sculpt_paint::paint_stroke_exec (bContext *C, wmOperator *op, PaintStroke *stroke)
void blender::ed::sculpt_paint::paint_stroke_cancel (bContext *C, wmOperator *op, PaintStroke *stroke)
ViewContextblender::ed::sculpt_paint::paint_stroke_view_context (PaintStroke *stroke)
void * blender::ed::sculpt_paint::paint_stroke_mode_data (PaintStroke *stroke)
bool blender::ed::sculpt_paint::paint_stroke_flipped (PaintStroke *stroke)
bool blender::ed::sculpt_paint::paint_stroke_inverted (PaintStroke *stroke)
float blender::ed::sculpt_paint::paint_stroke_distance_get (PaintStroke *stroke)
void blender::ed::sculpt_paint::paint_stroke_set_mode_data (PaintStroke *stroke, std::unique_ptr< PaintModeData > mode_data)
bool blender::ed::sculpt_paint::paint_stroke_started (PaintStroke *stroke)
static const bToolRefblender::ed::sculpt_paint::brush_tool_get (const bContext *C)
bool blender::ed::sculpt_paint::paint_brush_tool_poll (bContext *C)
bool blender::ed::sculpt_paint::paint_brush_cursor_poll (bContext *C)

Macro Definition Documentation

◆ PAINT_STROKE_MODAL_CANCEL

#define PAINT_STROKE_MODAL_CANCEL   1