145 snap->old_zoom = zoom;
178 const float rotation =
data->rotation;
179 const float radius =
data->radius;
181 bool convert_to_linear =
false;
190 convert_to_linear =
true;
196 for (
int i = 0;
i <
size;
i++) {
199 int index = j *
size +
i;
210 x = (
x - 0.5f) * 2.0f;
211 y = (
y - 0.5f) * 2.0f;
219 if (mtex->
tex && (rotation > 0.001f || rotation < -0.001f)) {
231 if (convert_to_linear) {
239 buffer[index * 4] = rgba[0] * 255;
240 buffer[index * 4 + 1] = rgba[1] * 255;
241 buffer[index * 4 + 2] = rgba[2] * 255;
242 buffer[index * 4 + 3] = rgba[3] * 255;
248 CLAMP(avg, 0.0f, 1.0f);
249 buffer[index] = 255 -
uchar(255 * avg);
254 buffer[index * 4] = 0;
255 buffer[index * 4 + 1] = 0;
256 buffer[index * 4 + 2] = 0;
257 buffer[index * 4 + 3] = 0;
273 uchar *buffer =
nullptr;
300 for (s >>= 1; s > 0; s >>= 1) {
341 data.buffer = buffer;
345 data.rotation = rotation;
346 data.radius = radius;
362 blender::gpu::TextureFormat::UNORM_8;
401 for (
int i = 0;
i <
size;
i++) {
404 const int index = j *
size +
i;
406 const float y = ((
float(j) /
size) - 0.5f) * 2.0f;
414 buffer[index] =
uchar(255 * avg);
427 uchar *buffer =
nullptr;
430 const bool refresh = !
cursor_snap.overlay_texture ||
445 for (s >>= 1; s > 0; s >>= 1) {
470 data.buffer = buffer;
483 blender::gpu::TextureFormat::UNORM_8,
511 float view[3], nonortho[3], ortho[3], offset[3], p1[2], p2[2];
518 nonortho[0] =
view[0] + 1.0f;
519 nonortho[1] =
view[1];
520 nonortho[2] =
view[2];
523 nonortho[0] =
view[0];
524 nonortho[1] =
view[1] + 1.0f;
525 nonortho[2] =
view[2];
528 nonortho[0] =
view[0];
529 nonortho[1] =
view[1];
530 nonortho[2] =
view[2] + 1.0f;
557 const float3 world_location,
649 quad.xmin = center[0] - radius;
650 quad.ymin = center[1] - radius;
651 quad.xmax = center[0] + radius;
652 quad.ymax = center[1] + radius;
689 format,
"texCoord", blender::gpu::VertAttrType::SFLOAT_32_32);
696 float final_color[4] = {1.0f, 1.0f, 1.0f, 1.0f};
698 copy_v3_v3(final_color,
U.sculpt_paint_overlay_col);
700 mul_v4_fl(final_color, overlay_alpha * 0.01f);
767 quad.xmin =
x - radius;
768 quad.ymin =
y - radius;
769 quad.xmax =
x + radius;
770 quad.ymax =
y + radius;
785 format,
"texCoord", blender::gpu::VertAttrType::SFLOAT_32_32);
791 float final_color[4] = {
UNPACK3(
U.sculpt_paint_overlay_col), 1.0f};
798 {GPU_SAMPLER_FILTERING_LINEAR,
799 GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER,
800 GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER});
831 bool alpha_overlay_active =
false;
847 paint, brush, vc,
x,
y, zoom, mode,
true,
true);
851 paint, brush, vc,
x,
y, zoom, mode,
false,
false);
860 paint, brush, vc,
x,
y, zoom, mode,
false,
true);
871 return alpha_overlay_active;
875 const float sel_col[4],
876 const float pivot_col[4],
885 float w = width / 2.0f;
886 const float tri[3][2] = {
888 {co[0] -
w, co[1] -
w},
889 {co[0] +
w, co[1] -
w},
909 const float sel_col[4],
910 const float handle_col[4],
919 float w = width / 2.0f;
920 float minx = co[0] -
w;
921 float miny = co[1] -
w;
922 float maxx = co[0] +
w;
923 float maxy = co[1] +
w;
946 if (bez->
f1 || bez->
f2) {
957 if (bez->
f3 || bez->
f2) {
987 float selec_col[4], handle_col[4], pivot_col[4];
1004 for (j = 0; j < 2; j++) {
1054 const float location[3])
1059 float projected_radius;
1066 projected_radius = 8;
1088 const float true_location[3],
1089 const float obmat[4][4],
1092 float translation_vertex_cursor[3], location[3];
1097 if (translation_vertex_cursor[2] <= 1.0f) {
1099 gpuattr, translation_vertex_cursor[0], translation_vertex_cursor[1],
size, 10);
1105 const float true_location[3],
1116 float orgLoc[3], location[3];
1124 for (
int dim = 0; dim < 3; dim++) {
1126 start[dim] = (
bounds.min[dim] - orgLoc[dim] - radius) /
step[dim];
1127 end[dim] = (
bounds.max[dim] - orgLoc[dim] + radius) /
step[dim];
1130 start[dim] = end[dim] = 0;
1134 for (cur[0] = start[0]; cur[0] <= end[0]; cur[0]++) {
1135 for (cur[1] = start[1]; cur[1] <= end[1]; cur[1]++) {
1136 for (cur[2] = start[2]; cur[2] <= end[2]; cur[2]++) {
1137 if (!cur[0] && !cur[1] && !cur[2]) {
1142 for (
int dim = 0; dim < 3; dim++) {
1143 location[dim] = cur[dim] *
step[dim] + orgLoc[dim];
1154 const float true_location[3],
1162 float symm_rot_mat[4][4];
1164 for (
int i = 0;
i <= symm;
i++) {
1175 for (
char raxis = 0; raxis < 3; raxis++) {
1176 for (
int r = 1; r <
mesh->radial_symmetry[raxis]; r++) {
1177 float angle = 2 *
M_PI * r /
mesh->radial_symmetry[int(raxis)];
1236 const float line_width,
1237 const float3 &outline_col,
1347 pcontext.
region = region;
1354 if (pcontext.
paint ==
nullptr) {
1359 if (pcontext.
brush ==
nullptr) {
1378 pcontext.
tilt = tilt;
1399 pcontext.
ss = active_object ? active_object->
sculpt :
nullptr;
1407 if (!is_brush_tool) {
1548 float viewport_size[4];
1550 immUniform2f(
"viewport_size", viewport_size[2], viewport_size[3]);
1559 const int nsegments =
max_ii(8, radius / 2);
1588 if (grease_pencil->
runtime->is_drawing_stroke) {
1594 grease_pencil->
runtime->temp_use_eraser)
1599 pcontext.
pixel_radius = std::max(
int(grease_pencil->
runtime->temp_eraser_size / 2.0f), 1);
1626 bool clipped =
false;
1660 const bool use_vertex_color_stroke = use_vertex_color &&
1664 if (use_vertex_color_stroke) {
1696 switch (pcontext.
mode) {
1742 const float3 z_axis = {0.0f, 0.0f, 1.0f};
1802 pcontext.
vc.
obact->object_to_world().ptr(),
1818 pcontext.
vc.
obact->object_to_world().ptr(),
1873 active_vertex_co = positions[std::get<int>(ss.
active_vert())];
1928 position = positions[vert];
1943 pcontext.
pos, pcontext.
region, position, active_object.object_to_world().ptr(), 2);
1999 const float3 white = {1.0f, 1.0f, 1.0f};
2005 pcontext.
pos, brush, zero_v, zero_v, pcontext.
radius, 1.0f, white, 0.25f);
2082 const float3 red = {1.0f, 0.2f, 0.2f};
2190 immVertexFormat(),
"pos", blender::gpu::VertAttrType::SFLOAT_32_32_32);
float BKE_brush_alpha_get(const Paint *paint, const Brush *brush)
const float * BKE_brush_color_get(const Paint *paint, const Brush *brush)
bool BKE_brush_use_locked_size(const Paint *paint, const Brush *brush)
bool BKE_brush_use_size_pressure(const Brush *brush)
float BKE_brush_radius_get(const Paint *paint, const Brush *brush)
float BKE_brush_unprojected_radius_get(const Paint *paint, const Brush *brush)
void BKE_brush_size_set(Paint *paint, Brush *brush, int size)
void BKE_brush_unprojected_size_set(Paint *paint, Brush *brush, float unprojected_size)
float BKE_brush_curve_strength_clamped(const Brush *br, float p, float len)
bScreen * CTX_wm_screen(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
ToolSettings * CTX_data_tool_settings(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
Low-level operations for grease pencil.
Material * BKE_grease_pencil_object_material_from_brush_get(Object *ob, Brush *brush)
void BKE_image_pool_free(ImagePool *pool)
ImBuf * BKE_image_pool_acquire_ibuf(Image *ima, ImageUser *iuser, ImagePool *pool)
ImagePool * BKE_image_pool_new()
void BKE_image_pool_release_ibuf(Image *ima, ImBuf *ibuf, ImagePool *pool)
General operations, lookup, etc. for blender objects.
Mesh * BKE_object_get_evaluated_mesh_no_subsurf(const Object *object_eval)
bool paint_calculate_rake_rotation(Paint &paint, const Brush &brush, const float mouse_pos[2], PaintMode paint_mode, bool stroke_has_started)
ePaintOverlayControlFlags BKE_paint_get_overlay_flags()
ePaintOverlayControlFlags
@ PAINT_OVERLAY_INVALID_CURVE
@ PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY
@ PAINT_OVERLAY_OVERRIDE_CURSOR
@ PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY
@ PAINT_OVERLAY_OVERRIDE_SECONDARY
@ PAINT_OVERLAY_OVERRIDE_PRIMARY
void BKE_paint_reset_overlay_invalid(ePaintOverlayControlFlags flag)
void BKE_sculpt_update_object_for_edit(Depsgraph *depsgraph, Object *ob_orig, bool is_paint_tool)
Paint * BKE_paint_get_active_from_context(const bContext *C)
Brush * BKE_paint_brush(Paint *paint)
PaintMode BKE_paintmode_get_active_from_context(const bContext *C)
void BKE_paint_invalidate_overlay_all()
ARegion * BKE_screen_find_region_type(const bScreen *screen, int region_type) ATTR_NONNULL(1)
blender::ocio::ColorSpace ColorSpace
#define BLI_assert_unreachable()
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
MINLINE float max_ff(float a, float b)
MINLINE float clamp_f(float value, float min, float max)
MINLINE int max_ii(int a, int b)
void linearrgb_to_srgb_v3_v3(float srgb[3], const float linear[3])
void mul_m4_v3(const float M[4][4], float r[3])
void rotate_m4(float mat[4][4], char axis, float angle)
void unit_m4(float m[4][4])
MINLINE void mul_v4_fl(float r[4], float f)
MINLINE void clamp_v4(float vec[4], float min, float max)
MINLINE float len_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void copy_v3_v3_int(int r[3], const int a[3])
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE float normalize_v3(float n[3])
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
bool BLI_rcti_isect_pt(const struct rcti *rect, int x, int y)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
void BLI_task_parallel_range(int start, int stop, void *userdata, TaskParallelRangeFunc func, const TaskParallelSettings *settings)
int BLI_task_parallel_thread_id(const TaskParallelTLS *tls)
BLI_INLINE void BLI_parallel_range_settings_defaults(TaskParallelSettings *settings)
@ GPAINT_BRUSH_TYPE_ERASE
@ SCULPT_BRUSH_TYPE_BOUNDARY
@ SCULPT_BRUSH_TYPE_CLOTH
@ SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE
@ SCULPT_BRUSH_TYPE_LAYER
@ BRUSH_GRAB_ACTIVE_VERTEX
@ IMAGE_PAINT_BRUSH_TYPE_FILL
@ IMAGE_PAINT_BRUSH_TYPE_DRAW
@ PAINT_FALLOFF_SHAPE_SPHERE
@ PAINT_FALLOFF_SHAPE_TUBE
@ BRUSH_OVERLAY_SECONDARY
@ BRUSH_CLOTH_FORCE_FALLOFF_RADIAL
@ BRUSH_CLOTH_FORCE_FALLOFF_PLANE
@ BRUSH_CLOTH_SIMULATION_AREA_LOCAL
@ BRUSH_CLOTH_SIMULATION_AREA_GLOBAL
Object is a sort of wrapper for general info.
void ED_view3d_global_to_vector(const RegionView3D *rv3d, const float coord[3], float r_out[3])
void ED_view3d_win_to_delta(const ARegion *region, const float xy_delta[2], float zfac, float r_out[3], bool precise=false)
ViewContext ED_view3d_viewcontext_init(bContext *C, Depsgraph *depsgraph)
void ED_view3d_draw_setup_view(const wmWindowManager *wm, wmWindow *win, Depsgraph *depsgraph, Scene *scene, ARegion *region, View3D *v3d, const float viewmat[4][4], const float winmat[4][4], const rcti *rect)
float ED_view3d_calc_zfac_ex(const RegionView3D *rv3d, const float co[3], bool *r_flip)
void ED_view3d_project_v3(const ARegion *region, const float world[3], float r_region_co[3])
eV3DProjStatus ED_view3d_project_float_global(const ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
void GPU_matrix_translate_2fv(const float vec[2])
void GPU_matrix_scale_2f(float x, float y)
void GPU_matrix_push_projection()
#define GPU_matrix_mul(x)
void GPU_matrix_scale_1f(float factor)
void GPU_matrix_rotate_2d(float deg)
void GPU_matrix_pop_projection()
void GPU_matrix_translate_2f(float x, float y)
@ GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR
@ GPU_SHADER_3D_UNIFORM_COLOR
@ GPU_SHADER_3D_IMAGE_COLOR
void GPU_line_width(float width)
void GPU_line_smooth(bool enable)
@ GPU_BLEND_ALPHA_PREMULT
void GPU_blend(GPUBlend blend)
void GPU_depth_test(GPUDepthTest test)
void GPU_color_mask(bool r, bool g, bool b, bool a)
GPUDepthTest GPU_depth_test_get()
void GPU_viewport_size_get_f(float coords[4])
void GPU_texture_swizzle_set(blender::gpu::Texture *texture, const char swizzle[4])
void GPU_texture_unbind(blender::gpu::Texture *texture)
@ GPU_TEXTURE_USAGE_SHADER_READ
@ GPU_TEXTURE_USAGE_ATTACHMENT
@ GPU_SAMPLER_EXTEND_MODE_REPEAT
@ GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER
blender::gpu::Texture * GPU_texture_create_2d(const char *name, int width, int height, int mip_len, blender::gpu::TextureFormat format, eGPUTextureUsage usage, const float *data)
@ GPU_SAMPLER_FILTERING_LINEAR
void GPU_texture_free(blender::gpu::Texture *texture)
void GPU_texture_update(blender::gpu::Texture *texture, eGPUDataFormat data_format, const void *data)
static double angle(const Eigen::Vector3d &v1, const Eigen::Vector3d &v2)
void IMB_colormanagement_colorspace_to_scene_linear_v3(float pixel[3], const ColorSpace *colorspace)
BLI_INLINE void IMB_colormanagement_scene_linear_to_srgb_v3(float srgb[3], const float scene_linear[3])
Read Guarded memory(de)allocation.
void ntreeTexEndExecTree(struct bNodeTreeExec *exec)
struct bNodeTreeExec * ntreeTexBeginExecTree(struct bNodeTree *ntree)
void UI_GetThemeColorType4fv(int colorid, int spacetype, float col[4])
BMesh const char void * data
BLI_INLINE BMVert * BM_vert_at_index(BMesh *bm, const int index)
ATTR_WARN_UNUSED_RESULT const BMVert * v
BPy_StructRNA * depsgraph
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
float4x4 to_world_space() const
float3 project(float2 co, bool &clipped) const
blender::gpu::Batch * quad
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
TEX_TEMPLATE DataVec texture(T, FltCoord, float=0.0f) RET
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
bool supports_secondary_cursor_color(const Brush &brush)
bool supports_tilt(const Brush &brush)
pbvh::Tree & pbvh_ensure(Depsgraph &depsgraph, Object &object)
pbvh::Tree * pbvh_get(Object &object)
Span< float3 > vert_positions_eval(const Depsgraph &depsgraph, const Object &object_orig)
void pivot_line_preview_draw(const uint gpuattr, SculptSession &ss)
std::unique_ptr< SculptBoundaryPreview > preview_data_init(const Depsgraph &depsgraph, Object &object, const Brush *brush, const float radius)
void edges_preview_draw(const uint gpuattr, SculptSession &ss, const float outline_col[3], const float outline_alpha)
void multiplane_scrape_preview_draw(uint gpuattr, const Brush &brush, const SculptSession &ss, const float outline_col[3], float outline_alpha)
void plane_falloff_preview_draw(const uint gpuattr, SculptSession &ss, const float outline_col[3], float outline_alpha)
void simulation_limits_draw(const uint gpuattr, const Brush &brush, const float location[3], const float normal[3], const float rds, const float line_width, const float outline_col[3], const float alpha)
bool brush_using_vertex_color(const GpPaint *gp_paint, const Brush *brush)
std::unique_ptr< SculptPoseIKChainPreview > preview_ik_chain_init(const Depsgraph &depsgraph, Object &ob, SculptSession &ss, const Brush &brush, const float3 &initial_location, const float radius)
static bool paint_cursor_context_init(bContext *C, const blender::int2 &xy, const blender::float2 &tilt, PaintCursorContext &pcontext)
static void grease_pencil_brush_cursor_draw(PaintCursorContext &pcontext)
static void paint_draw_2D_view_brush_cursor(PaintCursorContext &pcontext)
static void SCULPT_layer_brush_height_preview_draw(const uint gpuattr, const Brush &brush, const float rds, const float line_width, const float3 &outline_col, const float alpha)
static void load_tex_cursor_task_cb(void *__restrict userdata, const int j, const TaskParallelTLS *__restrict)
static bool paint_use_2d_cursor(PaintMode mode)
static void paint_cursor_pose_brush_segments_draw(const PaintCursorContext &pcontext)
static void load_tex_task_cb_ex(void *__restrict userdata, const int j, const TaskParallelTLS *__restrict tls)
static void paint_update_mouse_cursor(PaintCursorContext &pcontext)
static void paint_cursor_draw_3d_view_brush_cursor_inactive(PaintCursorContext &pcontext)
void vert_random_access_ensure(Object &object)
static int same_tex_snap(TexSnapshot *snap, MTex *mtex, ViewContext *vc, bool col, float zoom)
static void grease_pencil_eraser_draw(PaintCursorContext &pcontext)
static void paint_cursor_update_object_space_radius(PaintCursorContext &pcontext)
static void sculpt_geometry_preview_lines_draw(const Depsgraph &depsgraph, const uint gpuattr, const Brush &brush, const Object &object)
static void make_tex_snap(TexSnapshot *snap, ViewContext *vc, float zoom)
static void paint_cursor_draw_3D_view_brush_cursor(PaintCursorContext &pcontext)
static void cursor_draw_point_screen_space(const uint gpuattr, const ARegion *region, const float true_location[3], const float obmat[4][4], const int size)
float3 symmetry_flip(const float3 &src, const ePaintSymmetryFlags symm)
static void paint_cursor_pose_brush_origins_draw(const PaintCursorContext &pcontext)
static void paint_cursor_restore_drawing_state()
static void paint_cursor_draw_main_inactive_cursor(PaintCursorContext &pcontext)
static void cursor_draw_tiling_preview(const uint gpuattr, const ARegion *region, const float true_location[3], const Sculpt &sd, const Object &ob, const float radius)
static void paint_cursor_drawing_setup_cursor_space(const PaintCursorContext &pcontext)
BLI_INLINE void draw_bezier_handle_lines(uint pos, const float sel_col[4], BezTriple *bez)
static void paint_cursor_update_anchored_location(PaintCursorContext &pcontext)
static void paint_cursor_update_rake_rotation(PaintCursorContext &pcontext)
static bool paint_cursor_is_3d_view_navigating(const PaintCursorContext &pcontext)
BLI_INLINE void draw_tri_point(uint pos, const float sel_col[4], const float pivot_col[4], float *co, float width, bool selected)
BLI_INLINE void draw_rect_point(uint pos, const float sel_col[4], const float handle_col[4], const float *co, float width, bool selected)
static void paint_cursor_setup_3D_drawing(PaintCursorContext &pcontext)
static void paint_cursor_check_and_draw_alpha_overlays(PaintCursorContext &pcontext)
bool cursor_geometry_info_update(bContext *C, CursorGeometryInfo *out, const float2 &mval, const bool use_sampled_normal)
static void paint_cursor_preview_boundary_data_pivot_draw(const PaintCursorContext &pcontext)
static bool paint_cursor_is_brush_cursor_enabled(const PaintCursorContext &pcontext)
static void paint_cursor_preview_boundary_data_update(const PaintCursorContext &pcontext)
static void paint_draw_cursor(bContext *C, const blender::int2 &xy, const blender::float2 &tilt, void *)
static void paint_cursor_update_unprojected_size(Paint &paint, Brush &brush, const ViewContext &vc, const float location[3])
float object_space_radius_get(const ViewContext &vc, const Paint &paint, const Brush &brush, const float3 &location, const float scale_factor)
static int project_brush_radius_grease_pencil(ViewContext *vc, const float radius, const float3 world_location, const float4x4 &to_world)
static void paint_cursor_setup_2D_drawing(PaintCursorContext &pcontext)
static void paint_draw_3D_view_inactive_brush_cursor(PaintCursorContext &pcontext)
static void paint_cursor_cursor_draw_3d_view_brush_cursor_active(PaintCursorContext &pcontext)
static void paint_cursor_sculpt_session_update_and_init(PaintCursorContext &pcontext)
static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool primary)
static void cursor_draw_point_with_symmetry(const uint gpuattr, const ARegion *region, const float true_location[3], const Sculpt &sd, const Object &ob, const float radius)
static bool paint_draw_alpha_overlay(Paint *paint, Brush *brush, ViewContext *vc, int x, int y, float zoom, PaintMode mode)
static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
static void paint_draw_curve_cursor(Brush *brush, ViewContext *vc)
static void paint_draw_legacy_3D_view_brush_cursor(PaintCursorContext &pcontext)
static void paint_cursor_update_pixel_radius(PaintCursorContext &pcontext)
static bool paint_draw_cursor_overlay(Paint *paint, Brush *brush, ViewContext *vc, int x, int y, float zoom)
static int project_brush_radius(ViewContext *vc, float radius, const float location[3])
static void paint_draw_2D_view_brush_cursor_default(PaintCursorContext &pcontext)
bool paint_brush_tool_poll(bContext *C)
void geometry_preview_lines_update(Depsgraph &depsgraph, Object &object, SculptSession &ss, float radius)
Span< float3 > vert_positions_for_grab_active_get(const Depsgraph &depsgraph, const Object &object)
float3 tilt_apply_to_normal(const Object &object, const float4x4 &view_inverse, const float3 &normal, const float2 &tilt, const float tilt_strength)
static bool paint_draw_tex_overlay(Paint *paint, Brush *brush, ViewContext *vc, int x, int y, float zoom, const PaintMode mode, bool col, bool primary)
bool is_symmetry_iteration_valid(const char i, const char symm)
constexpr double inv_sqrt3
T safe_divide(const T &a, const T &b)
T distance(const T &a, const T &b)
T length(const VecBase< T, Size > &a)
AxisAngleBase< float, AngleRadianBase< float > > AxisAngle
MatBase< T, NumCol, NumRow > translate(const MatBase< T, NumCol, NumRow > &mat, const VectorT &translation)
VecBase< T, 3 > transform_direction(const MatBase< T, 3, 3 > &mat, const VecBase< T, 3 > &direction)
MatT from_rotation(const RotationT &rotation)
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
MatBase< float, 4, 4 > float4x4
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
VecBase< float, 3 > float3
vector snap(vector a, vector b)
static void init(bNodeTree *, bNode *node)
static ePaintOverlayControlFlags overlay_flags
void paint_cursor_delete_textures()
static CursorSnapshot cursor_snap
static TexSnapshot primary_snap
static TexSnapshot secondary_snap
void ED_paint_cursor_start(Paint *paint, bool(*poll)(bContext *C))
bool get_imapaint_zoom(bContext *C, float *zoomx, float *zoomy)
float paint_calc_object_space_radius(const ViewContext &vc, const blender::float3 ¢er, float pixel_radius)
#define PAINT_CURVE_NUM_SEGMENTS
bool paint_get_tex_pixel(const MTex *mtex, float u, float v, ImagePool *pool, int thread, float *r_intensity, float r_rgba[4])
bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass(const blender::ed::sculpt_paint::StrokeCache &cache)
ePaintSymmetryFlags SCULPT_mesh_symmetry_xyz_get(const Object &object)
int texture_overlay_alpha
float stencil_dimension[2]
float texture_sample_bias
float tilt_strength_factor
struct CurveMapping * curve_distance_falloff
float mask_stencil_pos[2]
struct BrushGpencilSettings * gpencil_settings
float mask_stencil_dimension[2]
int cloth_simulation_area_type
int curve_distance_falloff_preset
struct PaintCurve * paint_curve
int cloth_force_falloff_type
blender::gpu::Texture * overlay_texture
GreasePencilRuntimeHandle * runtime
const ColorSpace * colorspace
ImBufFloatBuffer float_buffer
ImBufByteBuffer byte_buffer
struct SculptSession * sculpt
struct UnifiedPaintSettings unified_paint_settings
PaintRuntimeHandle * runtime
struct ToolSettings * toolsettings
blender::ed::sculpt_paint::StrokeCache * cache
std::unique_ptr< SculptBoundaryPreview > boundary_preview
blender::Array< int > preview_verts
ActiveVert active_vert() const
blender::float3 active_vert_position(const Depsgraph &depsgraph, const Object &object) const
std::unique_ptr< SculptPoseIKChainPreview > pose_ik_chain_preview
blender::ed::sculpt_paint::expand::Cache * expand_cache
int active_vert_index() const
bool deform_modifiers_active
blender::Array< blender::float3 > positions
blender::gpu::Texture * overlay_texture
struct bNodeTree * nodetree
bNodeTreeRuntimeHandle * runtime
const c_style_mat & ptr() const
static MatBase identity()
VecBase< T, 3 > xyz() const
blender::float2 anchored_initial_mouse
float size_pressure_value
blender::float3 last_location
float3 scene_space_location
UnifiedPaintSettings * ups
PaintCursorDrawingType cursor_type
int prev_active_vert_index
void WM_cursor_set(wmWindow *win, int curs)
wmPaintCursor * WM_paint_cursor_activate(short space_type, short region_type, bool(*poll)(bContext *C), wmPaintCursorDraw draw, void *customdata)
void wmViewport(const rcti *winrct)
void wmWindowViewport(const wmWindow *win)