Blender V2.61 - r43446
Typedefs | Functions

BKE_brush.h File Reference

Go to the source code of this file.

Typedefs

typedef struct BrushPainter BrushPainter
typedef int(* BrushFunc )(void *user, struct ImBuf *ibuf, float *lastpos, float *pos)

Functions

struct Brushadd_brush (const char *name)
struct Brushcopy_brush (struct Brush *brush)
void make_local_brush (struct Brush *brush)
void free_brush (struct Brush *brush)
void brush_reset_sculpt (struct Brush *brush)
struct ImBufget_brush_icon (struct Brush *brush)
int brush_delete (struct Brush **current_brush)
int brush_texture_set_nr (struct Brush *brush, int nr)
int brush_texture_delete (struct Brush *brush)
int brush_clone_image_set_nr (struct Brush *brush, int nr)
int brush_clone_image_delete (struct Brush *brush)
void brush_jitter_pos (const struct Scene *scene, struct Brush *brush, float *pos, float *jitterpos)
void brush_curve_preset (struct Brush *b, int preset)
float brush_curve_strength_clamp (struct Brush *br, float p, const float len)
float brush_curve_strength (struct Brush *br, float p, const float len)
void brush_sample_tex (const struct Scene *scene, struct Brush *brush, const float xy[2], float rgba[4], const int thread)
void brush_imbuf_new (const struct Scene *scene, struct Brush *brush, short flt, short texfalloff, int size, struct ImBuf **imbuf, int use_color_correction)
BrushPainterbrush_painter_new (struct Scene *scene, struct Brush *brush)
void brush_painter_require_imbuf (BrushPainter *painter, short flt, short texonly, int size)
int brush_painter_paint (BrushPainter *painter, BrushFunc func, float *pos, double time, float pressure, void *user, int use_color_correction)
void brush_painter_break_stroke (BrushPainter *painter)
void brush_painter_free (BrushPainter *painter)
unsigned int * brush_gen_texture_cache (struct Brush *br, int half_side)
struct ImBufbrush_gen_radial_control_imbuf (struct Brush *br)
int brush_size (const struct Scene *scene, struct Brush *brush)
void brush_set_size (struct Scene *scene, struct Brush *brush, int value)
float brush_unprojected_radius (const struct Scene *scene, struct Brush *brush)
void brush_set_unprojected_radius (struct Scene *scene, struct Brush *brush, float value)
float brush_alpha (const struct Scene *scene, struct Brush *brush)
int brush_use_locked_size (const struct Scene *scene, struct Brush *brush)
int brush_use_alpha_pressure (const struct Scene *scene, struct Brush *brush)
int brush_use_size_pressure (const struct Scene *scene, struct Brush *brush)
void brush_scale_unprojected_radius (float *unprojected_radius, int new_brush_size, int old_brush_size)
void brush_scale_size (int *brush_size, float new_unprojected_radius, float old_unprojected_radius)
void brush_debug_print_state (struct Brush *br)

Detailed Description

Definition in file BKE_brush.h.


Typedef Documentation

typedef int(* BrushFunc)(void *user, struct ImBuf *ibuf, float *lastpos, float *pos)

Definition at line 78 of file BKE_brush.h.

typedef struct BrushPainter BrushPainter

Definition at line 77 of file BKE_brush.h.


Function Documentation

struct Brush* add_brush ( const char *  name) [read]
float brush_alpha ( const struct Scene scene,
struct Brush brush 
)
int brush_clone_image_delete ( struct Brush brush)

Definition at line 478 of file brush.c.

References Brush::clone, Image::id, BrushClone::image, NULL, and ID::us.

Referenced by brush_clone_image_set_nr().

int brush_clone_image_set_nr ( struct Brush brush,
int  nr 
)
void brush_curve_preset ( struct Brush b,
int  preset 
)
float brush_curve_strength ( struct Brush br,
float  p,
const float  len 
)

Definition at line 1249 of file brush.c.

References Brush::curve, curvemapping_evaluateF(), and len().

Referenced by brush_imbuf_new(), load_tex(), overlapped_curve(), and tex_strength().

float brush_curve_strength_clamp ( struct Brush br,
float  p,
const float  len 
)
void brush_debug_print_state ( struct Brush br)
int brush_delete ( struct Brush **  current_brush)
struct ImBuf* brush_gen_radial_control_imbuf ( struct Brush br) [read]
unsigned int* brush_gen_texture_cache ( struct Brush br,
int  half_side 
)
void brush_imbuf_new ( const struct Scene scene,
struct Brush brush,
short  flt,
short  texfalloff,
int  size,
struct ImBuf **  imbuf,
int  use_color_correction 
)
void brush_jitter_pos ( const struct Scene scene,
struct Brush brush,
float *  pos,
float *  jitterpos 
)
void brush_painter_break_stroke ( BrushPainter painter)

Definition at line 1035 of file brush.c.

References BrushPainter::firsttouch.

Referenced by imapaint_paint_stroke().

void brush_painter_free ( BrushPainter painter)
BrushPainter* brush_painter_new ( struct Scene scene,
struct Brush brush 
)
int brush_painter_paint ( BrushPainter painter,
BrushFunc  func,
float *  pos,
double  time,
float  pressure,
void *  user,
int  use_color_correction 
)
void brush_painter_require_imbuf ( BrushPainter painter,
short  flt,
short  texonly,
int  size 
)
void brush_reset_sculpt ( struct Brush brush)
void brush_sample_tex ( const struct Scene scene,
struct Brush brush,
const float  xy[2],
float  rgba[4],
const int  thread 
)
void brush_scale_size ( int *  brush_size,
float  new_unprojected_radius,
float  old_unprojected_radius 
)

Definition at line 732 of file brush.c.

void brush_scale_unprojected_radius ( float *  unprojected_radius,
int  new_brush_size,
int  old_brush_size 
)

Definition at line 720 of file brush.c.

void brush_set_size ( struct Scene scene,
struct Brush brush,
int  value 
)
void brush_set_unprojected_radius ( struct Scene scene,
struct Brush brush,
float  value 
)
int brush_size ( const struct Scene scene,
struct Brush brush 
)
int brush_texture_delete ( struct Brush brush)

Definition at line 452 of file brush.c.

References Tex::id, Brush::mtex, MTex::tex, and ID::us.

Referenced by brush_texture_set_nr().

int brush_texture_set_nr ( struct Brush brush,
int  nr 
)
float brush_unprojected_radius ( const struct Scene scene,
struct Brush brush 
)
int brush_use_alpha_pressure ( const struct Scene scene,
struct Brush brush 
)
int brush_use_locked_size ( const struct Scene scene,
struct Brush brush 
)
int brush_use_size_pressure ( const struct Scene scene,
struct Brush brush 
)
struct Brush* copy_brush ( struct Brush brush) [read]
void free_brush ( struct Brush brush)
struct ImBuf* get_brush_icon ( struct Brush brush) [read]
void make_local_brush ( struct Brush brush)