Blender V2.61 - r43446
Typedefs | Enumerations | Functions

paint_intern.h File Reference

Go to the source code of this file.

Typedefs

typedef int(* StrokeGetLocation )(struct bContext *C, struct PaintStroke *stroke, float location[3], float mouse[2])
typedef int(* StrokeTestStart )(struct bContext *C, struct wmOperator *op, struct wmEvent *event)
typedef void(* StrokeUpdateStep )(struct bContext *C, struct PaintStroke *stroke, struct PointerRNA *itemptr)
typedef void(* StrokeDone )(struct bContext *C, struct PaintStroke *stroke)
typedef enum BrushStrokeMode BrushStrokeMode
typedef void(* UndoRestoreCb )(struct bContext *C, struct ListBase *lb)
typedef void(* UndoFreeCb )(struct ListBase *lb)

Enumerations

enum  BrushStrokeMode { BRUSH_STROKE_NORMAL, BRUSH_STROKE_INVERT, BRUSH_STROKE_SMOOTH }

Functions

struct PaintStrokepaint_stroke_new (struct bContext *C, StrokeGetLocation get_location, StrokeTestStart test_start, StrokeUpdateStep update_step, StrokeDone done, int event_type)
void paint_stroke_free (struct PaintStroke *stroke)
int paint_space_stroke_enabled (struct Brush *br)
int paint_stroke_modal (struct bContext *C, struct wmOperator *op, struct wmEvent *event)
int paint_stroke_exec (struct bContext *C, struct wmOperator *op)
int paint_stroke_cancel (struct bContext *C, struct wmOperator *op)
struct ViewContextpaint_stroke_view_context (struct PaintStroke *stroke)
void * paint_stroke_mode_data (struct PaintStroke *stroke)
void paint_stroke_set_mode_data (struct PaintStroke *stroke, void *mode_data)
int paint_poll (struct bContext *C)
void paint_cursor_start (struct bContext *C, int(*poll)(struct bContext *C))
int weight_paint_poll (struct bContext *C)
int weight_paint_mode_poll (struct bContext *C)
int vertex_paint_poll (struct bContext *C)
int vertex_paint_mode_poll (struct bContext *C)
void vpaint_fill (struct Object *ob, unsigned int paintcol)
void wpaint_fill (struct VPaint *wp, struct Object *ob, float paintweight)
void PAINT_OT_weight_paint_toggle (struct wmOperatorType *ot)
void PAINT_OT_weight_paint (struct wmOperatorType *ot)
void PAINT_OT_weight_set (struct wmOperatorType *ot)
void PAINT_OT_weight_from_bones (struct wmOperatorType *ot)
void PAINT_OT_weight_sample (struct wmOperatorType *ot)
void PAINT_OT_weight_sample_group (struct wmOperatorType *ot)
void PAINT_OT_vertex_paint_toggle (struct wmOperatorType *ot)
void PAINT_OT_vertex_paint (struct wmOperatorType *ot)
unsigned int vpaint_get_current_col (struct VPaint *vp)
int image_texture_paint_poll (struct bContext *C)
void PAINT_OT_image_paint (struct wmOperatorType *ot)
void PAINT_OT_grab_clone (struct wmOperatorType *ot)
void PAINT_OT_sample_color (struct wmOperatorType *ot)
void PAINT_OT_clone_cursor_set (struct wmOperatorType *ot)
void PAINT_OT_texture_paint_toggle (struct wmOperatorType *ot)
void PAINT_OT_project_image (struct wmOperatorType *ot)
void PAINT_OT_image_from_view (struct wmOperatorType *ot)
int paint_convert_bb_to_rect (struct rcti *rect, const float bb_min[3], const float bb_max[3], const struct ARegion *ar, struct RegionView3D *rv3d, struct Object *ob)
void paint_calc_redraw_planes (float planes[4][4], const struct ARegion *ar, struct RegionView3D *rv3d, struct Object *ob, const struct rcti *screen_rect)
void projectf (struct bglMats *mats, const float v[3], float p[2])
float paint_calc_object_space_radius (struct ViewContext *vc, const float center[3], float pixel_radius)
float paint_get_tex_pixel (struct Brush *br, float u, float v)
int imapaint_pick_face (struct ViewContext *vc, struct Mesh *me, const int mval[2], unsigned int *index)
 * returns 0 if not found, otherwise 1 */
void imapaint_pick_uv (struct Scene *scene, struct Object *ob, unsigned int faceindex, const int xy[2], float uv[2])
void paint_sample_color (struct Scene *scene, struct ARegion *ar, int x, int y)
void BRUSH_OT_curve_preset (struct wmOperatorType *ot)
void PAINT_OT_face_select_linked (struct wmOperatorType *ot)
void PAINT_OT_face_select_linked_pick (struct wmOperatorType *ot)
void PAINT_OT_face_select_all (struct wmOperatorType *ot)
void PAINT_OT_face_select_inverse (struct wmOperatorType *ot)
void PAINT_OT_face_select_hide (struct wmOperatorType *ot)
void PAINT_OT_face_select_reveal (struct wmOperatorType *ot)
void PAINT_OT_vert_select_all (struct wmOperatorType *ot)
void PAINT_OT_vert_select_inverse (struct wmOperatorType *ot)
int vert_paint_poll (struct bContext *C)
int mask_paint_poll (struct bContext *C)
int facemask_paint_poll (struct bContext *C)
void undo_paint_push_begin (int type, const char *name, UndoRestoreCb restore, UndoFreeCb free)
struct ListBaseundo_paint_push_get_list (int type)
void undo_paint_push_count_alloc (int type, int size)
void undo_paint_push_end (int type)

Detailed Description

Definition in file paint_intern.h.


Typedef Documentation

typedef void(* StrokeDone)(struct bContext *C, struct PaintStroke *stroke)

Definition at line 56 of file paint_intern.h.

typedef int(* StrokeGetLocation)(struct bContext *C, struct PaintStroke *stroke, float location[3], float mouse[2])

Definition at line 53 of file paint_intern.h.

typedef int(* StrokeTestStart)(struct bContext *C, struct wmOperator *op, struct wmEvent *event)

Definition at line 54 of file paint_intern.h.

typedef void(* StrokeUpdateStep)(struct bContext *C, struct PaintStroke *stroke, struct PointerRNA *itemptr)

Definition at line 55 of file paint_intern.h.

typedef void(* UndoFreeCb)(struct ListBase *lb)

Definition at line 160 of file paint_intern.h.

typedef void(* UndoRestoreCb)(struct bContext *C, struct ListBase *lb)

Definition at line 159 of file paint_intern.h.


Enumeration Type Documentation

Enumerator:
BRUSH_STROKE_NORMAL 
BRUSH_STROKE_INVERT 
BRUSH_STROKE_SMOOTH 

Definition at line 152 of file paint_intern.h.


Function Documentation

void BRUSH_OT_curve_preset ( struct wmOperatorType ot)
int facemask_paint_poll ( struct bContext C)
int image_texture_paint_poll ( struct bContext C)

Definition at line 5497 of file paint_image.c.

References image_paint_poll(), and texture_paint_poll().

Referenced by ED_keymap_paint().

int imapaint_pick_face ( struct ViewContext vc,
struct Mesh me,
const int  mval[2],
unsigned int *  index 
)

* returns 0 if not found, otherwise 1 */

Definition at line 316 of file paint_utils.c.

References Mesh::totface, and view3d_sample_backbuf().

Referenced by imapaint_paint_stroke().

void imapaint_pick_uv ( struct Scene scene,
struct Object ob,
unsigned int  faceindex,
const int  xy[2],
float  uv[2] 
)
int mask_paint_poll ( struct bContext C)

Definition at line 5512 of file paint_image.c.

References CTX_data_active_object(), paint_facesel_test(), and paint_vertsel_test().

Referenced by PAINT_OT_weight_set().

float paint_calc_object_space_radius ( struct ViewContext vc,
const float  center[3],
float  pixel_radius 
)
void paint_calc_redraw_planes ( float  planes[4][4],
const struct ARegion ar,
struct RegionView3D rv3d,
struct Object ob,
const struct rcti screen_rect 
)
int paint_convert_bb_to_rect ( struct rcti rect,
const float  bb_min[3],
const float  bb_max[3],
const struct ARegion ar,
struct RegionView3D rv3d,
struct Object ob 
)

Referenced by sculpt_get_redraw_rect().

void paint_cursor_start ( struct bContext C,
int(*)(struct bContext *C)  poll 
)
float paint_get_tex_pixel ( struct Brush br,
float  u,
float  v 
)
void PAINT_OT_clone_cursor_set ( struct wmOperatorType ot)
void PAINT_OT_face_select_all ( struct wmOperatorType ot)
void PAINT_OT_face_select_hide ( struct wmOperatorType ot)
void PAINT_OT_face_select_inverse ( struct wmOperatorType ot)
void PAINT_OT_face_select_linked ( struct wmOperatorType ot)
void PAINT_OT_face_select_linked_pick ( struct wmOperatorType ot)
void PAINT_OT_face_select_reveal ( struct wmOperatorType ot)
void PAINT_OT_grab_clone ( struct wmOperatorType ot)
void PAINT_OT_image_from_view ( struct wmOperatorType ot)
void PAINT_OT_image_paint ( struct wmOperatorType ot)
void PAINT_OT_project_image ( struct wmOperatorType ot)
void PAINT_OT_sample_color ( struct wmOperatorType ot)
void PAINT_OT_texture_paint_toggle ( struct wmOperatorType ot)
void PAINT_OT_vert_select_all ( struct wmOperatorType ot)
void PAINT_OT_vert_select_inverse ( struct wmOperatorType ot)
void PAINT_OT_vertex_paint ( struct wmOperatorType ot)
void PAINT_OT_vertex_paint_toggle ( struct wmOperatorType ot)
void PAINT_OT_weight_from_bones ( struct wmOperatorType ot)
void PAINT_OT_weight_paint ( struct wmOperatorType ot)
void PAINT_OT_weight_paint_toggle ( struct wmOperatorType ot)
void PAINT_OT_weight_sample ( struct wmOperatorType ot)
void PAINT_OT_weight_sample_group ( struct wmOperatorType ot)
void PAINT_OT_weight_set ( struct wmOperatorType ot)
int paint_poll ( struct bContext C)
void paint_sample_color ( struct Scene scene,
struct ARegion ar,
int  x,
int  y 
)
int paint_space_stroke_enabled ( struct Brush br)
int paint_stroke_cancel ( struct bContext C,
struct wmOperator op 
)
int paint_stroke_exec ( struct bContext C,
struct wmOperator op 
)
void paint_stroke_free ( struct PaintStroke stroke)

Definition at line 828 of file paint_stroke.c.

References MEM_freeN().

Referenced by sculpt_brush_stroke_invoke(), and sculpt_get_brush_geometry().

int paint_stroke_modal ( struct bContext C,
struct wmOperator op,
struct wmEvent event 
)
void* paint_stroke_mode_data ( struct PaintStroke stroke)
struct PaintStroke* paint_stroke_new ( struct bContext C,
StrokeGetLocation  get_location,
StrokeTestStart  test_start,
StrokeUpdateStep  update_step,
StrokeDone  done,
int  event_type 
) [read]
void paint_stroke_set_mode_data ( struct PaintStroke stroke,
void *  mode_data 
)

Definition at line 965 of file paint_stroke.c.

References PaintStroke::mode_data.

Referenced by vpaint_stroke_test_start(), and wpaint_stroke_test_start().

struct ViewContext* paint_stroke_view_context ( struct PaintStroke stroke) [read]
void projectf ( struct bglMats mats,
const float  v[3],
float  p[2] 
)

Definition at line 145 of file paint_utils.c.

References bglMats::modelview, bglMats::projection, and bglMats::viewport.

Referenced by project_brush_radius().

void undo_paint_push_begin ( int  type,
const char *  name,
UndoRestoreCb  restore,
UndoFreeCb  free 
)
void undo_paint_push_count_alloc ( int  type,
int  size 
)
void undo_paint_push_end ( int  type)

Definition at line 229 of file paint_undo.c.

References UNDO_PAINT_IMAGE, UNDO_PAINT_MESH, and undo_stack_push_end().

Referenced by paint_exit(), and sculpt_undo_push_end().

struct ListBase* undo_paint_push_get_list ( int  type) [read]
int vert_paint_poll ( struct bContext C)
int vertex_paint_mode_poll ( struct bContext C)
int vertex_paint_poll ( struct bContext C)
void vpaint_fill ( struct Object ob,
unsigned int  paintcol 
)
unsigned int vpaint_get_current_col ( struct VPaint vp)
int weight_paint_mode_poll ( struct bContext C)
int weight_paint_poll ( struct bContext C)
void wpaint_fill ( struct VPaint wp,
struct Object ob,
float  paintweight 
)