Blender  V3.3
Classes | Macros | Typedefs | Functions
gpencil_weight_paint.c File Reference
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLT_translation.h"
#include "DNA_armature_types.h"
#include "DNA_brush_types.h"
#include "DNA_gpencil_types.h"
#include "BKE_action.h"
#include "BKE_brush.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_gpencil.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_object_deform.h"
#include "BKE_report.h"
#include "DNA_meshdata_types.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_prototypes.h"
#include "UI_view2d.h"
#include "ED_gpencil.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "gpencil_intern.h"

Go to the source code of this file.

Classes

struct  tGP_Grid
 
struct  tGP_Selected
 
struct  tGP_BrushWeightpaintData
 

Macros

#define GP_SELECT_BUFFER_CHUNK   256
 

Typedefs

typedef struct tGP_Grid tGP_Grid
 
typedef struct tGP_Selected tGP_Selected
 
typedef struct tGP_BrushWeightpaintData tGP_BrushWeightpaintData
 

Functions

static tGP_Selectedgpencil_select_buffer_ensure (tGP_Selected *buffer_array, int *buffer_size, int *buffer_used, const bool clear)
 
static float brush_influence_calc (tGP_BrushWeightpaintData *gso, const int radius, const int co[2])
 
static void brush_calc_dvec_2d (tGP_BrushWeightpaintData *gso)
 
static bool brush_draw_apply (tGP_BrushWeightpaintData *gso, bGPDstroke *gps, int pt_index, const int radius, const int co[2])
 
static void gpencil_weightpaint_brush_header_set (bContext *C)
 
static bool gpencil_weightpaint_brush_init (bContext *C, wmOperator *op)
 
static void gpencil_weightpaint_brush_exit (bContext *C, wmOperator *op)
 
static bool gpencil_weightpaint_brush_poll (bContext *C)
 
static void gpencil_save_selected_point (tGP_BrushWeightpaintData *gso, bGPDstroke *gps, int index, int pc[2])
 
static void gpencil_weightpaint_select_stroke (tGP_BrushWeightpaintData *gso, bGPDstroke *gps, const float diff_mat[4][4], const float bound_mat[4][4])
 
static bool gpencil_weightpaint_brush_do_frame (bContext *C, tGP_BrushWeightpaintData *gso, bGPDlayer *gpl, bGPDframe *gpf, const float diff_mat[4][4], const float bound_mat[4][4])
 
static bool gpencil_weightpaint_brush_apply_to_layers (bContext *C, tGP_BrushWeightpaintData *gso)
 
static void gpencil_weightpaint_brush_apply (bContext *C, wmOperator *op, PointerRNA *itemptr)
 
static void gpencil_weightpaint_brush_apply_event (bContext *C, wmOperator *op, const wmEvent *event)
 
static int gpencil_weightpaint_brush_exec (bContext *C, wmOperator *op)
 
static int gpencil_weightpaint_brush_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int gpencil_weightpaint_brush_modal (bContext *C, wmOperator *op, const wmEvent *event)
 
void GPENCIL_OT_weight_paint (wmOperatorType *ot)
 

Detailed Description

Brush based operators for editing Grease Pencil strokes.

Definition in file gpencil_weight_paint.c.

Macro Definition Documentation

◆ GP_SELECT_BUFFER_CHUNK

#define GP_SELECT_BUFFER_CHUNK   256

Definition at line 52 of file gpencil_weight_paint.c.

Typedef Documentation

◆ tGP_BrushWeightpaintData

◆ tGP_Grid

typedef struct tGP_Grid tGP_Grid

◆ tGP_Selected

typedef struct tGP_Selected tGP_Selected

Function Documentation

◆ brush_calc_dvec_2d()

static void brush_calc_dvec_2d ( tGP_BrushWeightpaintData gso)
static

◆ brush_draw_apply()

static bool brush_draw_apply ( tGP_BrushWeightpaintData gso,
bGPDstroke gps,
int  pt_index,
const int  radius,
const int  co[2] 
)
static

◆ brush_influence_calc()

static float brush_influence_calc ( tGP_BrushWeightpaintData gso,
const int  radius,
const int  co[2] 
)
static

◆ GPENCIL_OT_weight_paint()

void GPENCIL_OT_weight_paint ( wmOperatorType ot)

◆ gpencil_save_selected_point()

static void gpencil_save_selected_point ( tGP_BrushWeightpaintData gso,
bGPDstroke gps,
int  index,
int  pc[2] 
)
static

◆ gpencil_select_buffer_ensure()

static tGP_Selected* gpencil_select_buffer_ensure ( tGP_Selected buffer_array,
int *  buffer_size,
int *  buffer_used,
const bool  clear 
)
static

◆ gpencil_weightpaint_brush_apply()

static void gpencil_weightpaint_brush_apply ( bContext C,
wmOperator op,
PointerRNA itemptr 
)
static

◆ gpencil_weightpaint_brush_apply_event()

static void gpencil_weightpaint_brush_apply_event ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ gpencil_weightpaint_brush_apply_to_layers()

static bool gpencil_weightpaint_brush_apply_to_layers ( bContext C,
tGP_BrushWeightpaintData gso 
)
static

◆ gpencil_weightpaint_brush_do_frame()

static bool gpencil_weightpaint_brush_do_frame ( bContext C,
tGP_BrushWeightpaintData gso,
bGPDlayer gpl,
bGPDframe gpf,
const float  diff_mat[4][4],
const float  bound_mat[4][4] 
)
static

◆ gpencil_weightpaint_brush_exec()

static int gpencil_weightpaint_brush_exec ( bContext C,
wmOperator op 
)
static

◆ gpencil_weightpaint_brush_exit()

static void gpencil_weightpaint_brush_exit ( bContext C,
wmOperator op 
)
static

◆ gpencil_weightpaint_brush_header_set()

static void gpencil_weightpaint_brush_header_set ( bContext C)
static

Definition at line 274 of file gpencil_weight_paint.c.

References C, ED_workspace_status_text(), and TIP_.

Referenced by gpencil_weightpaint_brush_init().

◆ gpencil_weightpaint_brush_init()

static bool gpencil_weightpaint_brush_init ( bContext C,
wmOperator op 
)
static

◆ gpencil_weightpaint_brush_invoke()

static int gpencil_weightpaint_brush_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ gpencil_weightpaint_brush_modal()

static int gpencil_weightpaint_brush_modal ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ gpencil_weightpaint_brush_poll()

static bool gpencil_weightpaint_brush_poll ( bContext C)
static

Definition at line 358 of file gpencil_weight_paint.c.

References C, and CTX_DATA_COUNT.

Referenced by GPENCIL_OT_weight_paint().

◆ gpencil_weightpaint_select_stroke()

static void gpencil_weightpaint_select_stroke ( tGP_BrushWeightpaintData gso,
bGPDstroke gps,
const float  diff_mat[4][4],
const float  bound_mat[4][4] 
)
static