62 const Brush *brush_src = (
const Brush *)id_src;
145 bool force_local, force_copy;
166 else if (force_copy) {
169 brush_new->
id.
us = 0;
372 BLI_assert(id_old_new ==
nullptr ||
ELEM(id_old, id_old_new, id_old_new->orig_id));
447 #define FROM_DEFAULT(member) \
448 memcpy((void *)&brush->member, (void *)&brush_def->member, sizeof(brush->member))
449 #define FROM_DEFAULT_PTR(member) memcpy(brush->member, brush_def->member, sizeof(brush->member))
491 #undef FROM_DEFAULT_PTR
512 brush->
gpencil_settings = MEM_cnew<BrushGpencilSettings>(
"BrushGpencilSettings");
538 Paint *paint =
nullptr;
592 GPCURVE_PRESET_PENCIL = 0,
593 GPCURVE_PRESET_INK = 1,
594 GPCURVE_PRESET_INKNOISE = 2,
595 GPCURVE_PRESET_MARKER = 3,
596 GPCURVE_PRESET_CHISEL_SENSIVITY = 4,
597 GPCURVE_PRESET_CHISEL_STRENGTH = 5,
610 case GPCURVE_PRESET_PENCIL:
613 cuma->
curve[1].
x = 0.75115f;
618 case GPCURVE_PRESET_INK:
621 cuma->
curve[1].
x = 0.63448f;
622 cuma->
curve[1].
y = 0.375f;
626 case GPCURVE_PRESET_INKNOISE:
634 case GPCURVE_PRESET_MARKER:
644 case GPCURVE_PRESET_CHISEL_SENSIVITY:
652 case GPCURVE_PRESET_CHISEL_STRENGTH:
671 #define SMOOTH_STROKE_RADIUS 40
672 #define SMOOTH_STROKE_FACTOR 0.9f
673 #define ACTIVE_SMOOTH 0.35f
679 PRESET_MATERIAL_NONE = 0,
680 PRESET_MATERIAL_DOT_STROKE,
681 } material_preset = PRESET_MATERIAL_NONE;
687 brush->
rgb[0] = 0.498f;
688 brush->
rgb[1] = 1.0f;
689 brush->
rgb[2] = 0.498f;
710 brush->
size = 300.0f;
728 material_preset = PRESET_MATERIAL_DOT_STROKE;
806 brush->
size = 150.0f;
843 brush->
size = 150.0f;
944 material_preset = PRESET_MATERIAL_DOT_STROKE;
1004 brush->
size = 30.0f;
1018 brush->
size = 30.0f;
1030 brush->
size = 30.0f;
1039 brush->
size = 30.0f;
1051 brush->
size = 25.0f;
1064 brush->
size = 25.0f;
1077 brush->
size = 25.0f;
1090 brush->
size = 25.0f;
1103 brush->
size = 25.0f;
1116 brush->
size = 25.0f;
1129 brush->
size = 25.0f;
1143 brush->
size = 25.0f;
1156 brush->
size = 25.0f;
1170 brush->
size = 25.0f;
1182 brush->
size = 25.0f;
1195 brush->
size = 50.0f;
1208 brush->
size = 50.0f;
1221 brush->
size = 25.0f;
1235 brush->
size = 25.0f;
1247 brush->
size = 25.0f;
1260 switch (material_preset) {
1261 case PRESET_MATERIAL_NONE:
1263 case PRESET_MATERIAL_DOT_STROKE: {
1267 const char *ma_id =
"Dots Stroke";
1269 if (ma ==
nullptr) {
1296 if (brush ==
nullptr) {
1314 Brush *brush, *deft_draw;
1317 if ((
reset) || (r_new)) {
1323 if ((
reset) || (r_new)) {
1329 if ((
reset) || (r_new)) {
1335 if ((
reset) || (r_new)) {
1341 if ((
reset) || (r_new)) {
1347 if ((
reset) || (r_new)) {
1353 if ((
reset) || (r_new)) {
1359 if ((
reset) || (r_new)) {
1366 if ((
reset) || (r_new)) {
1372 if ((
reset) || (r_new)) {
1378 if ((
reset) || (r_new)) {
1384 if ((
reset) || (r_new)) {
1390 if ((
reset) || (r_new)) {
1396 if ((
reset) || (r_new)) {
1401 if ((
reset ==
false) && (brush_prev !=
nullptr)) {
1415 Brush *brush, *deft_vertex;
1418 if ((
reset) || (r_new)) {
1421 deft_vertex = brush;
1425 if ((
reset) || (r_new)) {
1430 if ((
reset) || (r_new)) {
1435 if ((
reset) || (r_new)) {
1440 if ((
reset) || (r_new)) {
1445 if (
reset || brush_prev ==
nullptr) {
1449 if (brush_prev !=
nullptr) {
1461 Brush *brush, *deft_sculpt;
1465 if ((
reset) || (r_new)) {
1468 deft_sculpt = brush;
1472 if ((
reset) || (r_new)) {
1478 if ((
reset) || (r_new)) {
1484 if ((
reset) || (r_new)) {
1490 if ((
reset) || (r_new)) {
1496 if ((
reset) || (r_new)) {
1502 if ((
reset) || (r_new)) {
1508 if ((
reset) || (r_new)) {
1514 if ((
reset) || (r_new)) {
1519 if (
reset || brush_prev ==
nullptr) {
1523 if (brush_prev !=
nullptr) {
1535 Brush *brush, *deft_weight;
1538 if ((
reset) || (r_new)) {
1541 deft_weight = brush;
1544 if (
reset || brush_prev ==
nullptr) {
1548 if (brush_prev !=
nullptr) {
1570 if (brush->ob_mode &
ob_mode) {
1580 Brush def = {{
nullptr}};
1583 #define BR_TEST(field, t) \
1584 if (br->field != def.field) { \
1585 printf("br->" #field " = %" #t ";\n", br->field); \
1589 #define BR_TEST_FLAG(_f) \
1590 if ((br->flag & _f) && !(def.flag & _f)) { \
1591 printf("br->flag |= " #_f ";\n"); \
1593 else if (!(br->flag & _f) && (def.flag & _f)) { \
1594 printf("br->flag &= ~" #_f ";\n"); \
1598 #define BR_TEST_FLAG_OVERLAY(_f) \
1599 if ((br->overlay_flags & _f) && !(def.overlay_flags & _f)) { \
1600 printf("br->overlay_flags |= " #_f ";\n"); \
1602 else if (!(br->overlay_flags & _f) && (def.overlay_flags & _f)) { \
1603 printf("br->overlay_flags &= ~" #_f ";\n"); \
1954 cuma =
b->curve->cm;
1961 const float point[3],
1968 float intensity = 1.0;
1969 bool hasrgb =
false;
1981 const float point_2d[2] = {
point[0],
point[1]};
1988 if (rotation > 0.001f || rotation < -0.001f) {
1990 const float flen =
sqrtf(
x *
x +
y *
y);
2011 const float point_2d[2] = {
point[0],
point[1]};
2012 float x = 0.0f,
y = 0.0f;
2013 float invradius = 1.0f;
2051 if (rotation > 0.001f || rotation < -0.001f) {
2053 const float flen =
sqrtf(
x *
x +
y *
y);
2069 rgba[0] = intensity;
2070 rgba[1] = intensity;
2071 rgba[2] = intensity;
2087 float rgba[4], intensity;
2094 const float point_2d[2] = {
point[0],
point[1]};
2101 if (rotation > 0.001f || rotation < -0.001f) {
2103 const float flen =
sqrtf(
x *
x +
y *
y);
2124 const float point_2d[2] = {
point[0],
point[1]};
2125 float x = 0.0f,
y = 0.0f;
2126 float invradius = 1.0f;
2164 if (rotation > 0.001f || rotation < -0.001f) {
2166 const float flen =
sqrtf(
x *
x +
y *
y);
2179 CLAMP(intensity, 0.0f, 1.0f);
2355 float scale = new_brush_size;
2357 if (old_brush_size != 0) {
2358 scale /= (
float)old_brush_size;
2360 (*unprojected_radius) *= scale;
2364 float new_unprojected_radius,
2365 float old_unprojected_radius)
2367 float scale = new_unprojected_radius;
2369 if (old_unprojected_radius != 0) {
2370 scale /= new_unprojected_radius;
2372 (*r_brush_size) = (int)((
float)(*r_brush_size) * scale);
2395 jitterpos[0] =
pos[0] + 2 * rand_pos[0] * diameter * spread;
2396 jitterpos[1] =
pos[1] + 2 * rand_pos[1] * diameter * spread;
2415 float strength = 1.0f;
2432 strength = 3.0f * p * p - 2.0f * p * p * p;
2435 strength =
pow3f(p) * (p * (p * 6.0f - 15.0f) + 10.0f);
2438 strength =
sqrtf(p);
2447 strength =
sqrtf(2 * p - p * p);
2450 strength = p * p * p * p;
2453 strength = p * (2.0f - p);
2464 CLAMP(strength, 0.0f, 1.0f);
2472 const bool use_secondary,
2480 const float step = 2.0 / side;
2485 for (
y = -1.0, iy = 0; iy < side; iy++,
y += step) {
2486 for (
x = -1.0, ix = 0; ix < side; ix++,
x += step) {
2487 const float co[3] = {
x,
y, 0.0f};
2490 float rgba_dummy[4];
2493 rect[iy * side + ix] = intensity;
2502 ImBuf *im = MEM_cnew<ImBuf>(
"radial control texture");
2504 int half = side / 2;
2508 im->
x = im->
y = side;
2512 if (display_gradient || have_texture) {
2513 for (
int i = 0; i < side; i++) {
2514 for (
int j = 0; j < side; j++) {
typedef float(TangentPoint)[2]
bool BKE_bpath_foreach_path_fixed_process(struct BPathForeachPathData *bpath_data, char *path)
void BKE_gpencil_brush_material_set(struct Brush *brush, struct Material *material)
void BKE_previewimg_free(struct PreviewImage **prv)
void BKE_previewimg_id_copy(struct ID *new_id, const struct ID *old_id)
@ IDTYPE_FLAGS_NO_ANIMDATA
struct ID * BKE_id_copy(struct Main *bmain, const struct ID *id)
void id_us_min(struct ID *id)
bool void BKE_lib_id_clear_library_data(struct Main *bmain, struct ID *id, int flags)
void id_fake_user_set(struct ID *id)
@ LIB_ID_MAKELOCAL_FULL_LIBRARY
void BKE_lib_id_expand_local(struct Main *bmain, struct ID *id, int flags)
void BKE_id_blend_write(struct BlendWriter *writer, struct ID *id)
void id_us_plus_no_lib(struct ID *id)
void * BKE_id_new(struct Main *bmain, short type, const char *name)
bool BKE_lib_id_make_local(struct Main *bmain, struct ID *id, int flags)
void BKE_id_delete(struct Main *bmain, void *idv) ATTR_NONNULL()
void BKE_lib_id_swap(struct Main *bmain, struct ID *id_a, struct ID *id_b)
void BKE_lib_id_make_local_generic_action_define(struct Main *bmain, struct ID *id, int flags, bool *r_force_local, bool *r_force_copy)
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(_data, _id_super, _cb_flag)
#define BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL(_data, _func_call)
void BKE_library_foreach_ID_link(struct Main *bmain, struct ID *id, LibraryIDLinkCallback callback, void *user_data, int flag)
bool BKE_library_ID_is_indirectly_used(struct Main *bmain, void *idv)
@ ID_REMAP_SKIP_INDIRECT_USAGE
void void BKE_libblock_remap(struct Main *bmain, void *old_idv, void *new_idv, short remap_flags) ATTR_NONNULL(1
General operations, lookup, etc. for materials.
struct Material * BKE_gpencil_material_add(struct Main *bmain, const char *name)
void BKE_paint_brush_set(struct Paint *paint, struct Brush *br)
void BKE_texture_mtex_foreach_id(struct LibraryForeachIDData *data, struct MTex *mtex)
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float pow2f(float x)
MINLINE float square_f(float a)
MINLINE float pow3f(float x)
MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void zero_v4(float r[4])
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void zero_v3(float r[3])
MINLINE void copy_v2_fl(float r[2], float f)
void BLI_rng_srandom(struct RNG *rng, unsigned int seed) ATTR_NONNULL(1)
void BLI_rng_free(struct RNG *rng) ATTR_NONNULL(1)
struct RNG * BLI_rng_new(unsigned int seed)
float BLI_rng_get_float(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define MEMCMP_STRUCT_AFTER_IS_ZERO(struct_var, member)
#define MEMCPY_STRUCT_AFTER(struct_dst, struct_src, member)
#define BLO_read_data_address(reader, ptr_p)
ID * BLO_read_get_new_id_address(BlendLibReader *reader, struct Library *lib, struct ID *id)
#define BLO_write_id_struct(writer, struct_name, id_address, id)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define BLO_read_id_address(reader, lib, id_ptr_p)
#define BLO_expand(expander, id)
#define BLT_I18NCONTEXT_ID_BRUSH
#define ID_EXTRA_USERS(id)
#define ID_IS_LINKED(_id)
#define ID_REAL_USERS(id)
#define ID_NEW_SET(_id, _idn)
@ GP_SCULPT_FLAGMODE_APPLY_POSITION
@ GP_SCULPT_FLAGMODE_APPLY_THICKNESS
@ GP_BRUSH_DEFAULT_ERASER
@ GP_BRUSH_USE_STRENGTH_PRESSURE
@ GP_BRUSH_GROUP_SETTINGS
@ GP_BRUSH_MATERIAL_PINNED
@ GP_BRUSH_FILL_SHOW_EXTENDLINES
@ GP_BRUSH_USE_JITTER_PRESSURE
@ BRUSH_INVERSE_SMOOTH_PRESSURE
@ BRUSH_INVERT_TO_SCRAPE_FILL
@ BRUSH_CLOTH_DEFORM_DRAG
@ SCULPT_TOOL_DRAW_FACE_SETS
@ SCULPT_TOOL_DISPLACEMENT_ERASER
@ SCULPT_TOOL_SLIDE_RELAX
@ SCULPT_TOOL_DISPLACEMENT_SMEAR
@ SCULPT_TOOL_MULTIPLANE_SCRAPE
@ SCULPT_TOOL_ELASTIC_DEFORM
@ SCULPT_TOOL_CLAY_STRIPS
@ BRUSH_MASK_PRESSURE_RAMP
@ BRUSH_MASK_PRESSURE_CUTOFF
@ BRUSH_ELASTIC_DEFORM_GRAB_TRISCALE
@ GPSCULPT_TOOL_THICKNESS
@ GPSCULPT_TOOL_RANDOMIZE
@ BRUSH_OVERLAY_SECONDARY_OVERRIDE_ON_STROKE
@ BRUSH_OVERLAY_PRIMARY_OVERRIDE_ON_STROKE
@ BRUSH_OVERLAY_SECONDARY
@ BRUSH_OVERLAY_CURSOR_OVERRIDE_ON_STROKE
@ GP_BRUSH_ICON_ERASE_SOFT
@ GP_BRUSH_ICON_GPBRUSH_RANDOMIZE
@ GP_BRUSH_ICON_VERTEX_BLUR
@ GP_BRUSH_ICON_GPBRUSH_GRAB
@ GP_BRUSH_ICON_GPBRUSH_STRENGTH
@ GP_BRUSH_ICON_GPBRUSH_TWIST
@ GP_BRUSH_ICON_VERTEX_REPLACE
@ GP_BRUSH_ICON_VERTEX_DRAW
@ GP_BRUSH_ICON_GPBRUSH_WEIGHT
@ GP_BRUSH_ICON_GPBRUSH_PINCH
@ GP_BRUSH_ICON_VERTEX_SMEAR
@ GP_BRUSH_ICON_GPBRUSH_THICKNESS
@ GP_BRUSH_ICON_GPBRUSH_CLONE
@ GP_BRUSH_ICON_ERASE_STROKE
@ GP_BRUSH_ICON_ERASE_HARD
@ GP_BRUSH_ICON_GPBRUSH_SMOOTH
@ GP_BRUSH_ICON_GPBRUSH_PUSH
@ GP_BRUSH_ICON_VERTEX_AVERAGE
@ GP_BRUSH_PRESET_PENCIL_SOFT
@ GP_BRUSH_PRESET_TWIST_STROKE
@ GP_BRUSH_PRESET_PUSH_STROKE
@ GP_BRUSH_PRESET_MARKER_CHISEL
@ GP_BRUSH_PRESET_ERASER_HARD
@ GP_BRUSH_PRESET_VERTEX_AVERAGE
@ GP_BRUSH_PRESET_INK_PEN
@ GP_BRUSH_PRESET_INK_PEN_ROUGH
@ GP_BRUSH_PRESET_ERASER_STROKE
@ GP_BRUSH_PRESET_DRAW_WEIGHT
@ GP_BRUSH_PRESET_ERASER_POINT
@ GP_BRUSH_PRESET_VERTEX_BLUR
@ GP_BRUSH_PRESET_MARKER_BOLD
@ GP_BRUSH_PRESET_FILL_AREA
@ GP_BRUSH_PRESET_VERTEX_DRAW
@ GP_BRUSH_PRESET_VERTEX_REPLACE
@ GP_BRUSH_PRESET_SMOOTH_STROKE
@ GP_BRUSH_PRESET_GRAB_STROKE
@ GP_BRUSH_PRESET_AIRBRUSH
@ GP_BRUSH_PRESET_CLONE_STROKE
@ GP_BRUSH_PRESET_ERASER_SOFT
@ GP_BRUSH_PRESET_THICKNESS_STROKE
@ GP_BRUSH_PRESET_STRENGTH_STROKE
@ GP_BRUSH_PRESET_RANDOMIZE_STROKE
@ GP_BRUSH_PRESET_VERTEX_SMEAR
@ GP_BRUSH_PRESET_PINCH_STROKE
#define MAX_BRUSH_PIXEL_RADIUS
@ BRUSH_MULTIPLANE_SCRAPE_PLANES_PREVIEW
@ BRUSH_MULTIPLANE_SCRAPE_DYNAMIC
@ BRUSH_USE_CONNECTED_ONLY
@ BRUSH_SLIDE_DEFORM_DRAG
@ CUMA_EXTEND_EXTRAPOLATE
#define DNA_struct_default_get(struct_name)
Object is a sort of wrapper for general info.
@ UNIFIED_PAINT_BRUSH_LOCK_SIZE
#define MTEX_MAP_MODE_VIEW
#define MTEX_MAP_MODE_STENCIL
#define MTEX_MAP_MODE_TILED
#define MTEX_MAP_MODE_RANDOM
_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 type
void IMB_colormanagement_colorspace_to_scene_linear_v3(float pixel[3], struct ColorSpace *colorspace)
struct ImBuf * IMB_dupImBuf(const struct ImBuf *ibuf1)
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
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 Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
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 color
void BKE_brush_weight_set(const Scene *scene, Brush *brush, float value)
float BKE_brush_curve_strength_clamped(const Brush *br, float p, const float len)
static void brush_defaults(Brush *brush)
bool BKE_brush_use_alpha_pressure(const Brush *brush)
void BKE_brush_randomize_texture_coords(UnifiedPaintSettings *ups, bool mask)
float BKE_brush_weight_get(const Scene *scene, const Brush *brush)
void BKE_brush_gpencil_sculpt_presets(Main *bmain, ToolSettings *ts, const bool reset)
float BKE_brush_unprojected_radius_get(const Scene *scene, const Brush *brush)
static void brush_blend_write(BlendWriter *writer, ID *id, const void *id_address)
#define BR_TEST(field, t)
int BKE_brush_size_get(const Scene *scene, const Brush *brush)
static void brush_free_data(ID *id)
static void brush_blend_read_expand(BlendExpander *expander, ID *id)
void BKE_brush_gpencil_weight_presets(Main *bmain, ToolSettings *ts, const bool reset)
void BKE_brush_unprojected_radius_set(Scene *scene, Brush *brush, float unprojected_radius)
void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type)
void BKE_brush_size_set(Scene *scene, Brush *brush, int size)
static void brush_foreach_id(ID *id, LibraryForeachIDData *data)
#define FROM_DEFAULT(member)
Brush * BKE_brush_add(Main *bmain, const char *name, const eObjectMode ob_mode)
#define BR_TEST_FLAG_OVERLAY(_f)
void BKE_brush_alpha_set(Scene *scene, Brush *brush, float alpha)
void BKE_brush_jitter_pos(const Scene *scene, Brush *brush, const float pos[2], float jitterpos[2])
bool BKE_brush_use_size_pressure(const Brush *brush)
void BKE_brush_system_exit(void)
float BKE_brush_curve_strength(const Brush *br, float p, const float len)
Brush * BKE_brush_add_gpencil(Main *bmain, ToolSettings *ts, const char *name, eObjectMode mode)
static void brush_init_data(ID *id)
static void brush_gpencil_curvemap_reset(CurveMap *cuma, int tot, int preset)
static void brush_undo_preserve(BlendLibReader *reader, ID *id_new, ID *id_old)
static void brush_make_local(Main *bmain, ID *id, const int flags)
void BKE_brush_gpencil_paint_presets(Main *bmain, ToolSettings *ts, const bool reset)
void BKE_brush_init_curves_sculpt_settings(Brush *brush)
const float * BKE_brush_secondary_color_get(const struct Scene *scene, const struct Brush *brush)
float BKE_brush_sample_masktex(const Scene *scene, Brush *br, const float point[2], const int thread, struct ImagePool *pool)
#define FROM_DEFAULT_PTR(member)
static bool brush_gen_texture(const Brush *br, const int side, const bool use_secondary, float *rect)
void BKE_brush_sculpt_reset(Brush *br)
const float * BKE_brush_color_get(const struct Scene *scene, const struct Brush *brush)
void BKE_brush_curve_preset(Brush *b, eCurveMappingPreset preset)
static void brush_blend_read_data(BlendDataReader *reader, ID *id)
bool BKE_brush_sculpt_has_secondary_color(const Brush *brush)
void BKE_brush_system_init(void)
void BKE_brush_init_gpencil_settings(Brush *brush)
static void brush_foreach_path(ID *id, BPathForeachPathData *bpath_data)
void BKE_brush_scale_size(int *r_brush_size, float new_unprojected_radius, float old_unprojected_radius)
float BKE_brush_alpha_get(const Scene *scene, const Brush *brush)
#define SMOOTH_STROKE_RADIUS
void BKE_brush_debug_print_state(Brush *br)
void BKE_brush_gpencil_vertex_presets(Main *bmain, ToolSettings *ts, const bool reset)
static void brush_blend_read_lib(BlendLibReader *reader, ID *id)
float BKE_brush_sample_tex_3d(const Scene *scene, const Brush *br, const float point[3], float rgba[4], const int thread, struct ImagePool *pool)
bool BKE_brush_delete(Main *bmain, Brush *brush)
bool BKE_brush_use_locked_size(const Scene *scene, const Brush *brush)
#define SMOOTH_STROKE_FACTOR
void BKE_brush_color_set(struct Scene *scene, struct Brush *brush, const float color[3])
void BKE_brush_scale_unprojected_radius(float *unprojected_radius, int new_brush_size, int old_brush_size)
static int brush_undo_preserve_cb(LibraryIDLinkCallbackData *cb_data)
static void brush_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, const int flag)
struct ImBuf * BKE_brush_gen_radial_control_imbuf(Brush *br, bool secondary, bool display_gradient)
static Brush * gpencil_brush_ensure(Main *bmain, ToolSettings *ts, const char *brush_name, eObjectMode mode, bool *r_new)
struct Brush * BKE_brush_first_search(struct Main *bmain, const eObjectMode ob_mode)
enum eGPCurveMappingPreset { GPCURVE_PRESET_PENCIL=0, GPCURVE_PRESET_INK=1, GPCURVE_PRESET_INKNOISE=2, GPCURVE_PRESET_MARKER=3, GPCURVE_PRESET_CHISEL_SENSIVITY=4, GPCURVE_PRESET_CHISEL_STRENGTH=5, } eGPCurveMappingPreset
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
void IMB_freeImBuf(ImBuf *UNUSED(ibuf))
ccl_gpu_kernel_postfix ccl_global float int int int int float bool reset
clear internal cached data and reset random seed
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken rgba("rgba", pxr::TfToken::Immortal)
static const pxr::TfToken rgb("rgb", pxr::TfToken::Immortal)
static ePaintOverlayControlFlags overlay_flags
struct CurveMapping * curve_sensitivity
struct CurveMapping * curve_strength
struct CurveMapping * curve_jitter
struct CurveMapping * curve_rand_pressure
struct CurveMapping * curve_rand_strength
struct CurveMapping * curve_rand_saturation
struct CurveMapping * curve_rand_hue
float draw_random_strength
struct CurveMapping * curve_rand_uv
struct Material * material
struct CurveMapping * curve_rand_value
float multiplane_scrape_angle
float topology_rake_factor
struct ImBuf * icon_imbuf
struct ColorBand * gradient
float normal_radius_factor
int pose_smooth_iterations
int texture_overlay_alpha
float elastic_deform_volume_preservation
float smooth_stroke_factor
float stencil_dimension[2]
struct CurveMapping * curve
float texture_sample_bias
float mask_stencil_pos[2]
struct BrushGpencilSettings * gpencil_settings
struct Brush * toggle_brush
struct BrushCurvesSculptSettings * curves_sculpt_settings
float crease_pinch_factor
float mask_stencil_dimension[2]
int surface_smooth_iterations
float surface_smooth_current_vertex
struct PaintCurve * paint_curve
float surface_smooth_shape_preservation
struct MaterialGPencilStyle * gp_style
struct ToolSettings * toolsettings
char do_linear_conversion
float size_pressure_value
struct ColorSpace * colorspace
bool RE_texture_evaluate(const MTex *mtex, const float vec[3], const int thread, struct ImagePool *pool, const bool skip_load_image, const bool texnode_preview, float *r_intensity, float r_rgba[4])
static int blend(const Tex *tex, const float texvec[3], TexResult *texres)