121 snap->old_zoom = zoom;
154 const float rotation =
data->rotation;
155 const float radius =
data->radius;
157 bool convert_to_linear =
false;
166 convert_to_linear =
true;
172 for (
int i = 0; i <
size; i++) {
186 x = (
x - 0.5f) * 2.0f;
187 y = (
y - 0.5f) * 2.0f;
195 if (mtex->
tex && (rotation > 0.001f || rotation < -0.001f)) {
218 CLAMP(avg, 0.0f, 1.0f);
269 for (s >>= 1; s > 0; s >>= 1) {
279 if (size < target->old_size) {
319 .rotation = rotation,
374 for (
int i = 0; i <
size; i++) {
377 const int index = j *
size + i;
378 const float x = (((
float)i /
size) - 0.5f) * 2.0f;
379 const float y = (((
float)j /
size) - 0.5f) * 2.0f;
417 for (s >>= 1; s > 0; s >>= 1) {
483 float view[3], nonortho[3], ortho[3],
offset[3], p1[2], p2[2];
490 nonortho[0] =
view[0] + 1.0f;
491 nonortho[1] =
view[1];
492 nonortho[2] =
view[2];
495 nonortho[0] =
view[0];
496 nonortho[1] =
view[1] + 1.0f;
497 nonortho[2] =
view[2];
500 nonortho[0] =
view[0];
501 nonortho[1] =
view[1];
502 nonortho[2] =
view[2] + 1.0f;
638 float final_color[4] = {1.0f, 1.0f, 1.0f, 1.0f};
640 copy_v3_v3(final_color,
U.sculpt_paint_overlay_col);
642 mul_v4_fl(final_color, overlay_alpha * 0.01f);
707 quad.xmin =
x - radius;
708 quad.ymin =
y - radius;
709 quad.xmax =
x + radius;
710 quad.ymax =
y + radius;
730 float final_color[4] = {
UNPACK3(
U.sculpt_paint_overlay_col), 1.0f};
772 bool alpha_overlay_active =
false;
791 ups, brush, vc,
x,
y, zoom, mode,
false,
false);
810 return alpha_overlay_active;
814 const float sel_col[4],
815 const float pivot_col[4],
825 const float tri[3][2] = {
827 {co[0] -
w, co[1] -
w},
828 {co[0] +
w, co[1] -
w},
848 const float sel_col[4],
849 const float handle_col[4],
859 float minx = co[0] -
w;
860 float miny = co[1] -
w;
861 float maxx = co[0] +
w;
862 float maxy = co[1] +
w;
885 if (bez->
f1 || bez->
f2) {
896 if (bez->
f3 || bez->
f2) {
925 float selec_col[4], handle_col[4], pivot_col[4];
930 for (
int i = 0; i < pc->
tot_points - 1; i++, cp++) {
942 for (j = 0; j < 2; j++) {
992 const float location[3])
994 float unprojected_radius, projected_radius;
1004 projected_radius = 8;
1026 const float true_location[3],
1027 const float obmat[4][4],
1030 float translation_vertex_cursor[3], location[3];
1035 if (translation_vertex_cursor[2] <= 1.0f) {
1037 gpuattr, translation_vertex_cursor[0], translation_vertex_cursor[1],
size, 10);
1043 const float true_location[3],
1049 float orgLoc[3], location[3];
1054 const float *bbMin = bb->
vec[0];
1055 const float *bbMax = bb->
vec[6];
1059 for (
int dim = 0; dim < 3; dim++) {
1061 start[dim] = (bbMin[dim] - orgLoc[dim] - radius) / step[dim];
1062 end[dim] = (bbMax[dim] - orgLoc[dim] + radius) / step[dim];
1065 start[dim] = end[dim] = 0;
1069 for (cur[0] = start[0]; cur[0] <= end[0]; cur[0]++) {
1070 for (cur[1] = start[1]; cur[1] <= end[1]; cur[1]++) {
1071 for (cur[2] = start[2]; cur[2] <= end[2]; cur[2]++) {
1072 if (!cur[0] && !cur[1] && !cur[2]) {
1077 for (
int dim = 0; dim < 3; dim++) {
1078 location[dim] = cur[dim] * step[dim] + orgLoc[dim];
1088 const float true_location[3],
1094 float location[3], symm_rot_mat[4][4];
1096 for (
int i = 0; i <= symm; i++) {
1097 if (i == 0 || (symm & i && (symm != 5 || i != 3) && (symm != 6 || (!
ELEM(i, 3, 5))))) {
1100 flip_v3_v3(location, true_location, (
char)i);
1107 for (
char raxis = 0; raxis < 3; raxis++) {
1110 flip_v3_v3(location, true_location, (
char)i);
1125 const bool is_multires,
1171 const float line_width,
1172 const float outline_col[3],
1175 float cursor_trans[4][4];
1261 pcontext->
region = region;
1311 pcontext->
ss = active_object ? active_object->
sculpt :
NULL;
1319 if (!is_brush_tool) {
1367 const float mval_fl[2] = {
1471 float cursor_trans[4][4], cursor_rot[4][4];
1472 const float z_axis[4] = {0.0f, 0.0f, 1.0f, 0.0f};
1541 const bool update_previews)
1593 const float *active_vertex_co;
1698 const float white[3] = {1.0f, 1.0f, 1.0f};
1699 const float zero_v[3] = {0.0f};
1704 pcontext->
pos, brush, zero_v, zero_v, pcontext->
radius, 1.0f, white, 0.25f);
1782 const float red[3] = {1.0f, 0.2f, 0.2f};
typedef float(TangentPoint)[2]
float BKE_brush_curve_strength_clamped(const struct Brush *br, float p, float len)
void BKE_brush_size_set(struct Scene *scene, struct Brush *brush, int size)
bool BKE_brush_use_size_pressure(const struct Brush *brush)
bool BKE_brush_sculpt_has_secondary_color(const struct Brush *brush)
int BKE_brush_size_get(const struct Scene *scene, const struct Brush *brush)
float BKE_brush_unprojected_radius_get(const struct Scene *scene, const struct Brush *brush)
void BKE_brush_unprojected_radius_set(struct Scene *scene, struct Brush *brush, float unprojected_radius)
bool BKE_brush_use_locked_size(const struct Scene *scene, const struct Brush *brush)
struct Scene * CTX_data_scene(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
struct ToolSettings * CTX_data_tool_settings(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
void BKE_image_pool_release_ibuf(struct Image *ima, struct ImBuf *ibuf, struct ImagePool *pool)
struct ImBuf * BKE_image_pool_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, struct ImagePool *pool)
struct ImagePool * BKE_image_pool_new(void)
void BKE_image_pool_free(struct ImagePool *pool)
General operations, lookup, etc. for blender objects.
const struct BoundBox * BKE_object_boundbox_get(struct Object *ob)
bool paint_calculate_rake_rotation(struct UnifiedPaintSettings *ups, struct Brush *brush, const float mouse_pos[2])
ePaintMode BKE_paintmode_get_active_from_context(const struct bContext *C)
void BKE_sculpt_update_object_for_edit(struct Depsgraph *depsgraph, struct Object *ob_orig, bool need_pmap, bool need_mask, bool is_paint_tool)
struct Brush * BKE_paint_brush(struct Paint *paint)
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)
struct Paint * BKE_paint_get_active_from_context(const struct bContext *C)
void BKE_paint_invalidate_overlay_all(void)
ePaintOverlayControlFlags BKE_paint_get_overlay_flags(void)
PBVHType BKE_pbvh_type(const PBVH *pbvh)
MINLINE float max_ff(float a, float b)
MINLINE float clamp_f(float value, float min, float max)
void unit_m4(float m[4][4])
void translate_m4(float mat[4][4], float tx, float ty, float tz)
void mul_m4_v3(const float M[4][4], float r[3])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void rotate_m4(float mat[4][4], char axis, float angle)
void rotation_between_vecs_to_quat(float q[4], const float v1[3], const float v2[3])
void quat_to_mat4(float mat[4][4], const float q[4])
MINLINE void mul_v4_fl(float r[4], float f)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v2_fl2(float v[2], float x, float y)
MINLINE float normalize_v3(float r[3])
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 void copy_v3_fl(float r[3], float f)
MINLINE float len_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
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)
struct Depsgraph Depsgraph
@ BRUSH_GRAB_ACTIVE_VERTEX
@ SCULPT_TOOL_MULTIPLANE_SCRAPE
@ 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.
#define MTEX_MAP_MODE_VIEW
#define MTEX_MAP_MODE_STENCIL
#define MTEX_MAP_MODE_TILED
void ED_view3d_project_v3(const struct ARegion *region, const float world[3], float r_region_co[3])
eV3DProjStatus ED_view3d_project_float_global(const struct ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
void ED_view3d_viewcontext_init(struct bContext *C, struct ViewContext *vc, struct Depsgraph *depsgraph)
void ED_view3d_draw_setup_view(const struct wmWindowManager *wm, struct wmWindow *win, struct Depsgraph *depsgraph, struct Scene *scene, struct ARegion *region, struct View3D *v3d, const float viewmat[4][4], const float winmat[4][4], const struct rcti *rect)
void ED_view3d_global_to_vector(const struct RegionView3D *rv3d, const float coord[3], float vec[3])
NSNotificationCenter * center
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
void GPU_matrix_pop(void)
void GPU_matrix_translate_2fv(const float vec[2])
void GPU_matrix_scale_2f(float x, float y)
void GPU_matrix_pop_projection(void)
#define GPU_matrix_mul(x)
void GPU_matrix_push(void)
void GPU_matrix_scale_1f(float factor)
void GPU_matrix_rotate_2d(float deg)
void GPU_matrix_translate_2f(float x, float y)
void GPU_matrix_push_projection(void)
@ GPU_SHADER_2D_UNIFORM_COLOR
@ GPU_SHADER_3D_UNIFORM_COLOR
@ GPU_SHADER_2D_IMAGE_COLOR
@ GPU_BLEND_ALPHA_PREMULT
void GPU_blend(eGPUBlend blend)
void GPU_line_width(float width)
void GPU_line_smooth(bool enable)
void GPU_color_mask(bool r, bool g, bool b, bool a)
eGPUBlend GPU_blend_get(void)
eGPUDepthTest GPU_depth_test_get(void)
void GPU_depth_test(eGPUDepthTest test)
@ GPU_SAMPLER_CLAMP_BORDER
void GPU_texture_swizzle_set(GPUTexture *tex, const char swizzle[4])
struct GPUTexture GPUTexture
void GPU_texture_update(GPUTexture *tex, eGPUDataFormat data_format, const void *data)
void GPU_texture_free(GPUTexture *tex)
void GPU_texture_unbind(GPUTexture *tex)
GPUTexture * GPU_texture_create_2d(const char *name, int w, int h, int mip_len, eGPUTextureFormat format, const float *data)
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a producing a negative Combine Generate a color from its red
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block TEX_IMAGE
void ntreeTexEndExecTree(struct bNodeTreeExec *exec)
struct bNodeTreeExec * ntreeTexBeginExecTree(struct bNodeTree *ntree)
void UI_GetThemeColorType4fv(int colorid, int spacetype, float col[4])
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
ccl_global float * buffer
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
thread_local int thread_id
static const pxr::TfToken rgba("rgba", pxr::TfToken::Immortal)
vector snap(vector a, vector b)
static ePaintOverlayControlFlags overlay_flags
static bool paint_draw_tex_overlay(UnifiedPaintSettings *ups, Brush *brush, ViewContext *vc, int x, int y, float zoom, const ePaintMode mode, bool col, bool primary)
static void paint_draw_legacy_3D_view_brush_cursor(PaintCursorContext *pcontext)
static void paint_cursor_drawing_setup_cursor_space(PaintCursorContext *pcontext)
static void cursor_draw_point_with_symmetry(const uint gpuattr, const ARegion *region, const float true_location[3], Sculpt *sd, Object *ob, const float radius)
struct TexSnapshot TexSnapshot
static void paint_cursor_update_object_space_radius(PaintCursorContext *pcontext)
static void paint_cursor_pose_brush_segments_draw(PaintCursorContext *pcontext)
static void paint_cursor_preview_boundary_data_pivot_draw(PaintCursorContext *pcontext)
static void load_tex_cursor_task_cb(void *__restrict userdata, const int j, const TaskParallelTLS *__restrict UNUSED(tls))
static CursorSnapshot cursor_snap
static void paint_draw_3D_view_inactive_brush_cursor(PaintCursorContext *pcontext)
static void paint_cursor_draw_3D_view_brush_cursor(PaintCursorContext *pcontext)
static void paint_cursor_draw_3d_view_brush_cursor_inactive(PaintCursorContext *pcontext)
static TexSnapshot primary_snap
static bool paint_cursor_context_init(bContext *C, const int x, const int y, PaintCursorContext *pcontext)
static bool paint_cursor_is_brush_cursor_enabled(PaintCursorContext *pcontext)
static void paint_cursor_restore_drawing_state(void)
static void make_tex_snap(TexSnapshot *snap, ViewContext *vc, float zoom)
void paint_cursor_delete_textures(void)
static void paint_cursor_check_and_draw_alpha_overlays(PaintCursorContext *pcontext)
static bool paint_draw_alpha_overlay(UnifiedPaintSettings *ups, Brush *brush, ViewContext *vc, int x, int y, float zoom, ePaintMode mode)
static void paint_cursor_preview_boundary_data_update(PaintCursorContext *pcontext, const bool update_previews)
struct LoadTexData LoadTexData
BLI_INLINE void draw_bezier_handle_lines(uint pos, const float sel_col[4], BezTriple *bez)
static void paint_cursor_update_pixel_radius(PaintCursorContext *pcontext)
static int project_brush_radius(ViewContext *vc, float radius, const float location[3])
static int same_tex_snap(TexSnapshot *snap, MTex *mtex, ViewContext *vc, bool col, float zoom)
static void sculpt_geometry_preview_lines_draw(const uint gpuattr, Brush *brush, const bool is_multires, SculptSession *ss)
static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
static void paint_draw_curve_cursor(Brush *brush, ViewContext *vc)
static void paint_cursor_update_anchored_location(PaintCursorContext *pcontext)
static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool primary)
static bool paint_draw_cursor_overlay(UnifiedPaintSettings *ups, Brush *brush, ViewContext *vc, int x, int y, float zoom)
static void paint_update_mouse_cursor(PaintCursorContext *pcontext)
static void paint_cursor_cursor_draw_3d_view_brush_cursor_active(PaintCursorContext *pcontext)
static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
static bool paint_use_2d_cursor(ePaintMode mode)
void ED_paint_cursor_start(Paint *p, bool(*poll)(bContext *C))
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)
static void cursor_draw_tiling_preview(const uint gpuattr, const ARegion *region, const float true_location[3], Sculpt *sd, Object *ob, const float radius)
static void load_tex_task_cb_ex(void *__restrict userdata, const int j, const TaskParallelTLS *__restrict tls)
static void SCULPT_layer_brush_height_preview_draw(const uint gpuattr, const Brush *brush, const float rds, const float line_width, const float outline_col[3], const float alpha)
static void paint_cursor_pose_brush_origins_draw(PaintCursorContext *pcontext)
static void paint_cursor_sculpt_session_update_and_init(PaintCursorContext *pcontext)
static void paint_cursor_setup_2D_drawing(PaintCursorContext *pcontext)
static TexSnapshot secondary_snap
BLI_INLINE void draw_tri_point(uint pos, const float sel_col[4], const float pivot_col[4], float *co, float width, bool selected)
static void paint_cursor_update_unprojected_radius(UnifiedPaintSettings *ups, Brush *brush, ViewContext *vc, const float location[3])
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)
struct CursorSnapshot CursorSnapshot
static bool paint_cursor_is_3d_view_navigating(PaintCursorContext *pcontext)
struct PaintCursorContext PaintCursorContext
static void paint_cursor_draw_main_inactive_cursor(PaintCursorContext *pcontext)
static void paint_draw_2D_view_brush_cursor(PaintCursorContext *pcontext)
static void paint_cursor_update_rake_rotation(PaintCursorContext *pcontext)
static void paint_cursor_setup_3D_drawing(PaintCursorContext *pcontext)
bool get_imapaint_zoom(bContext *C, float *zoomx, float *zoomy)
void paint_get_tex_pixel_col(const struct MTex *mtex, float u, float v, float rgba[4], struct ImagePool *pool, int thread, bool convert, struct ColorSpace *colorspace)
float paint_calc_object_space_radius(struct ViewContext *vc, const float center[3], float pixel_radius)
float paint_get_tex_pixel(const struct MTex *mtex, float u, float v, struct ImagePool *pool, int thread)
#define PAINT_CURVE_NUM_SEGMENTS
bool PAINT_brush_tool_poll(struct bContext *C)
BLI_INLINE void flip_v3_v3(float out[3], const float in[3], const ePaintSymmetryFlags symm)
const float * SCULPT_vertex_co_get(SculptSession *ss, int index)
int SCULPT_active_vertex_get(SculptSession *ss)
bool SCULPT_cursor_geometry_info_update(bContext *C, SculptCursorGeometryInfo *out, const float mval[2], bool use_sampled_normal)
const float * SCULPT_vertex_co_for_grab_active_get(SculptSession *ss, int index)
const float * SCULPT_active_vertex_co_get(SculptSession *ss)
bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass(StrokeCache *cache)
char SCULPT_mesh_symmetry_xyz_get(Object *object)
void SCULPT_boundary_data_free(SculptBoundary *boundary)
void SCULPT_boundary_pivot_line_preview_draw(const uint gpuattr, SculptSession *ss)
SculptBoundary * SCULPT_boundary_data_init(Object *object, Brush *brush, const int initial_vertex, const float radius)
void SCULPT_boundary_edges_preview_draw(const uint gpuattr, SculptSession *ss, const float outline_col[3], const float outline_alpha)
void SCULPT_cloth_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)
void SCULPT_cloth_plane_falloff_preview_draw(const uint gpuattr, SculptSession *ss, const float outline_col[3], float outline_alpha)
struct SculptPoseIKChain * SCULPT_pose_ik_chain_init(struct Sculpt *sd, struct Object *ob, struct SculptSession *ss, struct Brush *br, const float initial_location[3], float radius)
void SCULPT_multiplane_scrape_preview_draw(uint gpuattr, Brush *brush, SculptSession *ss, const float outline_col[3], float outline_alpha)
void SCULPT_geometry_preview_lines_update(bContext *C, struct SculptSession *ss, float radius)
void SCULPT_pose_ik_chain_free(struct SculptPoseIKChain *ik_chain)
int texture_overlay_alpha
float stencil_dimension[2]
struct CurveMapping * curve
float texture_sample_bias
float mask_stencil_pos[2]
float mask_stencil_dimension[2]
int cloth_simulation_area_type
struct PaintCurve * paint_curve
int cloth_force_falloff_type
GPUTexture * overlay_texture
int initial_active_vertex
struct ColorSpace * rect_colorspace
struct SculptSession * sculpt
UnifiedPaintSettings * ups
int prev_active_vertex_index
float scene_space_location[3]
PaintCursorDrawingType cursor_type
struct ToolSettings * toolsettings
SculptPoseIKChainSegment * segments
SculptPoseIKChain * pose_ik_chain_preview
int preview_vert_index_count
int * preview_vert_index_list
SculptBoundary * boundary_preview
struct StrokeCache * cache
struct ExpandCache * expand_cache
bool deform_modifiers_active
float true_initial_location[3]
float true_initial_normal[3]
GPUTexture * overlay_texture
struct bNodeTree * nodetree
float anchored_initial_mouse[2]
float size_pressure_value
struct RegionView3D * rv3d
struct bNodeTreeExec * execdata
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(wmWindow *win)