Blender V4.3
paint_stroke.cc File Reference
#include <algorithm>
#include <cfloat>
#include <cmath>
#include "MEM_guardedalloc.h"
#include "BLI_math_matrix.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_image.hh"
#include "BKE_paint.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, int x, int y, void *customdata)
 
static void blender::ed::sculpt_paint::paint_draw_line_cursor (bContext *C, int x, int y, 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 (PaintMode mode, const Brush &brush, bool invert)
 
void blender::ed::sculpt_paint::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])
 
static void blender::ed::sculpt_paint::paint_brush_stroke_add_step (bContext *C, wmOperator *op, PaintStroke *stroke, const float mval[2], float pressure)
 
static bool blender::ed::sculpt_paint::paint_smooth_stroke (PaintStroke *stroke, const PaintSample *sample, PaintMode mode, float r_mouse[2], float *r_pressure)
 
static float blender::ed::sculpt_paint::paint_space_stroke_spacing (bContext *C, const Scene *scene, PaintStroke *stroke, float size_pressure, float spacing_pressure)
 
static float blender::ed::sculpt_paint::paint_stroke_overlapped_curve (const Brush &br, float x, float spacing)
 
static float blender::ed::sculpt_paint::paint_stroke_integrate_overlap (const Brush &br, float factor)
 
static float blender::ed::sculpt_paint::paint_space_stroke_spacing_variable (bContext *C, const Scene *scene, PaintStroke *stroke, float pressure, float dpressure, float length)
 
static int blender::ed::sculpt_paint::paint_space_stroke (bContext *C, wmOperator *op, PaintStroke *stroke, const float final_mouse[2], float final_pressure)
 
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, int input_samples, float x, float y, 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, float spacing, float *length_residue, const float old_pos[2], const float new_pos[2])
 
static void blender::ed::sculpt_paint::paint_stroke_line_end (bContext *C, wmOperator *op, PaintStroke *stroke, const float mouse[2])
 
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, float mouse[2])
 
int blender::ed::sculpt_paint::paint_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event, PaintStroke **stroke_p)
 
int 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