Blender V2.61 - r43446
Classes | Typedefs | Functions

paint_stroke.c File Reference

#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_brush_types.h"
#include "RNA_access.h"
#include "BKE_context.h"
#include "BKE_paint.h"
#include "BKE_brush.h"
#include "WM_api.h"
#include "WM_types.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "paint_intern.h"
#include "sculpt_intern.h"
#include <float.h>
#include <math.h>

Go to the source code of this file.

Classes

struct  PaintStroke
struct  Snapshot

Typedefs

typedef struct PaintStroke PaintStroke
typedef struct Snapshot Snapshot

Functions

static void paint_draw_smooth_stroke (bContext *C, int x, int y, void *customdata)
static int same_snap (Snapshot *snap, Brush *brush, ViewContext *vc)
static void make_snap (Snapshot *snap, Brush *brush, ViewContext *vc)
static int load_tex (Sculpt *sd, Brush *br, ViewContext *vc)
static int project_brush_radius (RegionView3D *rv3d, float radius, float location[3], bglMats *mats)
static int sculpt_get_brush_geometry (bContext *C, int x, int y, int *pixel_radius, float location[3])
static void paint_draw_alpha_overlay (Sculpt *sd, Brush *brush, ViewContext *vc, int x, int y)
static void paint_cursor_on_hit (Sculpt *sd, Brush *brush, ViewContext *vc, const float location[3])
static void paint_draw_cursor (bContext *C, int x, int y, void *UNUSED(unused))
static float event_tablet_data (wmEvent *event, int *pen_flip)
static void paint_brush_stroke_add_step (bContext *C, wmOperator *op, wmEvent *event, float mouse_in[2])
static int paint_smooth_stroke (PaintStroke *stroke, float output[2], wmEvent *event)
static int paint_space_stroke (bContext *C, wmOperator *op, wmEvent *event, const float final_mouse[2])
PaintStrokepaint_stroke_new (bContext *C, StrokeGetLocation get_location, StrokeTestStart test_start, StrokeUpdateStep update_step, StrokeDone done, int event_type)
void paint_stroke_free (PaintStroke *stroke)
int paint_space_stroke_enabled (Brush *br)
int paint_stroke_modal (bContext *C, wmOperator *op, wmEvent *event)
int paint_stroke_exec (bContext *C, wmOperator *op)
int paint_stroke_cancel (bContext *C, wmOperator *op)
ViewContextpaint_stroke_view_context (PaintStroke *stroke)
void * paint_stroke_mode_data (struct PaintStroke *stroke)
void paint_stroke_set_mode_data (PaintStroke *stroke, void *mode_data)
int paint_poll (bContext *C)
void paint_cursor_start (bContext *C, int(*poll)(bContext *C))

Detailed Description

Definition in file paint_stroke.c.


Typedef Documentation

typedef struct PaintStroke PaintStroke
typedef struct Snapshot Snapshot

Function Documentation

static float event_tablet_data ( wmEvent event,
int *  pen_flip 
) [static]
static int load_tex ( Sculpt sd,
Brush br,
ViewContext vc 
) [static]
static void make_snap ( Snapshot snap,
Brush brush,
ViewContext vc 
) [static]
static void paint_brush_stroke_add_step ( bContext C,
wmOperator op,
wmEvent event,
float  mouse_in[2] 
) [static]
static void paint_cursor_on_hit ( Sculpt sd,
Brush brush,
ViewContext vc,
const float  location[3] 
) [static]
void paint_cursor_start ( bContext C,
int(*)(bContext *C)  poll 
)
static void paint_draw_alpha_overlay ( Sculpt sd,
Brush brush,
ViewContext vc,
int  x,
int  y 
) [static]
static void paint_draw_cursor ( bContext C,
int  x,
int  y,
void *  UNUSEDunused 
) [static]
static void paint_draw_smooth_stroke ( bContext C,
int  x,
int  y,
void *  customdata 
) [static]
int paint_poll ( bContext C)
static int paint_smooth_stroke ( PaintStroke stroke,
float  output[2],
wmEvent event 
) [static]
static int paint_space_stroke ( bContext C,
wmOperator op,
wmEvent event,
const float  final_mouse[2] 
) [static]
int paint_space_stroke_enabled ( Brush br)
int paint_stroke_cancel ( bContext C,
wmOperator op 
)
int paint_stroke_exec ( bContext C,
wmOperator op 
)
void paint_stroke_free ( 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 ( bContext C,
wmOperator op,
wmEvent event 
)
void* paint_stroke_mode_data ( struct PaintStroke stroke)
PaintStroke* paint_stroke_new ( bContext C,
StrokeGetLocation  get_location,
StrokeTestStart  test_start,
StrokeUpdateStep  update_step,
StrokeDone  done,
int  event_type 
) [read]
void paint_stroke_set_mode_data ( 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().

ViewContext* paint_stroke_view_context ( PaintStroke stroke) [read]
static int project_brush_radius ( RegionView3D rv3d,
float  radius,
float  location[3],
bglMats mats 
) [static]
static int same_snap ( Snapshot snap,
Brush brush,
ViewContext vc 
) [static]
static int sculpt_get_brush_geometry ( bContext C,
int  x,
int  y,
int *  pixel_radius,
float  location[3] 
) [static]