Blender  V3.3
Classes | Typedefs | Functions | Variables
gpencil_vertex_ops.c File Reference
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_ghash.h"
#include "BLI_math.h"
#include "DNA_brush_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_material_types.h"
#include "BKE_context.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_paint.h"
#include "BKE_report.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "ED_gpencil.h"
#include "ED_screen.h"
#include "DEG_depsgraph.h"
#include "gpencil_intern.h"

Go to the source code of this file.

Classes

struct  GPMatArray
 

Typedefs

typedef struct GPMatArray GPMatArray
 

Functions

static bool is_any_stroke_selected (bContext *C, const bool is_multiedit, const bool is_curve_edit)
 
static bool gpencil_vertexpaint_mode_poll (bContext *C)
 
static int gpencil_vertexpaint_brightness_contrast_exec (bContext *C, wmOperator *op)
 
void GPENCIL_OT_vertex_color_brightness_contrast (wmOperatorType *ot)
 
static int gpencil_vertexpaint_hsv_exec (bContext *C, wmOperator *op)
 
void GPENCIL_OT_vertex_color_hsv (wmOperatorType *ot)
 
static int gpencil_vertexpaint_invert_exec (bContext *C, wmOperator *op)
 
void GPENCIL_OT_vertex_color_invert (wmOperatorType *ot)
 
static int gpencil_vertexpaint_levels_exec (bContext *C, wmOperator *op)
 
void GPENCIL_OT_vertex_color_levels (wmOperatorType *ot)
 
static int gpencil_vertexpaint_set_exec (bContext *C, wmOperator *op)
 
void GPENCIL_OT_vertex_color_set (wmOperatorType *ot)
 
static bool gpencil_extract_palette_from_vertex (bContext *C, const bool selected, const int threshold)
 
static uint get_material_type (MaterialGPencilStyle *gp_style, bool use_stroke, bool use_fill, char *name)
 
static bool gpencil_material_to_vertex_poll (bContext *C)
 
static int gpencil_material_to_vertex_exec (bContext *C, wmOperator *op)
 
void GPENCIL_OT_material_to_vertex_color (wmOperatorType *ot)
 
static bool gpencil_extract_palette_vertex_poll (bContext *C)
 
static int gpencil_extract_palette_vertex_exec (bContext *C, wmOperator *op)
 
void GPENCIL_OT_extract_palette_vertex (wmOperatorType *ot)
 
Reset Stroke Vertex Color Operator
static void gpencil_reset_vertex (bGPDstroke *gps, eGp_Vertex_Mode mode)
 
static int gpencil_stroke_reset_vertex_color_exec (bContext *C, wmOperator *op)
 
void GPENCIL_OT_stroke_reset_vertex_color (wmOperatorType *ot)
 

Variables

static const EnumPropertyItem gpencil_modesEnumPropertyItem_mode []
 

Detailed Description

Brush based operators for editing Grease Pencil strokes.

Definition in file gpencil_vertex_ops.c.

Typedef Documentation

◆ GPMatArray

typedef struct GPMatArray GPMatArray

Function Documentation

◆ get_material_type()

static uint get_material_type ( MaterialGPencilStyle gp_style,
bool  use_stroke,
bool  use_fill,
char *  name 
)
static

◆ gpencil_extract_palette_from_vertex()

static bool gpencil_extract_palette_from_vertex ( bContext C,
const bool  selected,
const int  threshold 
)
static

◆ gpencil_extract_palette_vertex_exec()

static int gpencil_extract_palette_vertex_exec ( bContext C,
wmOperator op 
)
static

◆ gpencil_extract_palette_vertex_poll()

static bool gpencil_extract_palette_vertex_poll ( bContext C)
static

◆ gpencil_material_to_vertex_exec()

static int gpencil_material_to_vertex_exec ( bContext C,
wmOperator op 
)
static

◆ gpencil_material_to_vertex_poll()

static bool gpencil_material_to_vertex_poll ( bContext C)
static

◆ GPENCIL_OT_extract_palette_vertex()

void GPENCIL_OT_extract_palette_vertex ( wmOperatorType ot)

◆ GPENCIL_OT_material_to_vertex_color()

void GPENCIL_OT_material_to_vertex_color ( wmOperatorType ot)

◆ GPENCIL_OT_stroke_reset_vertex_color()

void GPENCIL_OT_stroke_reset_vertex_color ( wmOperatorType ot)

◆ GPENCIL_OT_vertex_color_brightness_contrast()

void GPENCIL_OT_vertex_color_brightness_contrast ( wmOperatorType ot)

◆ GPENCIL_OT_vertex_color_hsv()

void GPENCIL_OT_vertex_color_hsv ( wmOperatorType ot)

◆ GPENCIL_OT_vertex_color_invert()

void GPENCIL_OT_vertex_color_invert ( wmOperatorType ot)

◆ GPENCIL_OT_vertex_color_levels()

void GPENCIL_OT_vertex_color_levels ( wmOperatorType ot)

◆ GPENCIL_OT_vertex_color_set()

void GPENCIL_OT_vertex_color_set ( wmOperatorType ot)

◆ gpencil_reset_vertex()

static void gpencil_reset_vertex ( bGPDstroke gps,
eGp_Vertex_Mode  mode 
)
static

◆ gpencil_stroke_reset_vertex_color_exec()

static int gpencil_stroke_reset_vertex_color_exec ( bContext C,
wmOperator op 
)
static

◆ gpencil_vertexpaint_brightness_contrast_exec()

static int gpencil_vertexpaint_brightness_contrast_exec ( bContext C,
wmOperator op 
)
static

◆ gpencil_vertexpaint_hsv_exec()

static int gpencil_vertexpaint_hsv_exec ( bContext C,
wmOperator op 
)
static

◆ gpencil_vertexpaint_invert_exec()

static int gpencil_vertexpaint_invert_exec ( bContext C,
wmOperator op 
)
static

◆ gpencil_vertexpaint_levels_exec()

static int gpencil_vertexpaint_levels_exec ( bContext C,
wmOperator op 
)
static

◆ gpencil_vertexpaint_mode_poll()

static bool gpencil_vertexpaint_mode_poll ( bContext C)
static

◆ gpencil_vertexpaint_set_exec()

static int gpencil_vertexpaint_set_exec ( bContext C,
wmOperator op 
)
static

◆ is_any_stroke_selected()

static bool is_any_stroke_selected ( bContext C,
const bool  is_multiedit,
const bool  is_curve_edit 
)
static

Variable Documentation

◆ gpencil_modesEnumPropertyItem_mode

const EnumPropertyItem gpencil_modesEnumPropertyItem_mode[]
static
Initial value:
= {
{GPPAINT_MODE_STROKE, "STROKE", 0, "Stroke", ""},
{GPPAINT_MODE_FILL, "FILL", 0, "Fill", ""},
{GPPAINT_MODE_BOTH, "BOTH", 0, "Stroke & Fill", ""},
{0, NULL, 0, NULL, NULL},
}
@ GPPAINT_MODE_STROKE
@ GPPAINT_MODE_FILL
@ GPPAINT_MODE_BOTH

Definition at line 38 of file gpencil_vertex_ops.c.

Referenced by GPENCIL_OT_vertex_color_brightness_contrast(), GPENCIL_OT_vertex_color_hsv(), GPENCIL_OT_vertex_color_invert(), GPENCIL_OT_vertex_color_levels(), and GPENCIL_OT_vertex_color_set().