91 #define IN_CURVE_EDIT 2
93 #define IN_BRUSH_SIZE 4
94 #define IN_BRUSH_STRENGTH 5
98 #define SELECT_START 1
103 #define BIG_SIZE_CTL 15
104 #define MID_SIZE_CTL 10
105 #define SMALL_SIZE_CTL 8
166 if ((
x > 0 &&
y > 0) || (
x < 0 &&
y < 0)) {
192 if (angle < 0.4f || angle > (
M_PI - 0.4f)) {
210 const float origin[2],
222 float va[2],
float vb[2],
const float a[2],
const float b[2],
const float angle)
284 "Primitives cannot be added as active layer is locked or hidden");
426 TIP_(
"Line: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- to "
427 "adjust subdivision number, Shift to align, Alt to center, E: extrude"),
432 TIP_(
"Polyline: ESC to cancel, LMB to set, Enter/MMB to confirm, WHEEL/+- to "
433 "adjust subdivision number, Shift to align"),
438 TIP_(
"Rectangle: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- "
439 "to adjust subdivision number, Shift to square, Alt to center"),
444 TIP_(
"Circle: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust subdivision "
445 "number, Shift to square, Alt to center"),
451 TIP_(
"Arc: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust subdivision number, "
452 "Shift to square, Alt to center, M: Flip, E: extrude"),
457 TIP_(
"Curve: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust subdivision "
458 "number, Shift to square, Alt to center, E: extrude"),
472 BLI_snprintf(status_str,
sizeof(status_str),
"%s: %s", msg_str, str_ofs);
478 "%s: %d (%d, %d) (%d, %d)",
501 "%s: %d (%d, %d) (%d, %d)",
526 coords[0][0] = tgpi->
start[0];
527 coords[0][1] = tgpi->
start[1];
528 coords[1][0] = tgpi->
end[0];
529 coords[1][1] = tgpi->
start[1];
530 coords[2][0] = tgpi->
end[0];
531 coords[2][1] = tgpi->
end[1];
532 coords[3][0] = tgpi->
start[0];
533 coords[3][1] = tgpi->
end[1];
534 coords[4][0] = tgpi->
start[0];
535 coords[4][1] = tgpi->
start[1];
538 for (
int j = 0; j < 4; j++) {
546 for (
int j = 0; j < 4; j++) {
548 for (
int k = 0; k < tgpi->
tot_edges; k++) {
622 corner[0] = midpoint[0] - (cp1[0] - midpoint[0]);
623 corner[1] = midpoint[1] - (cp1[1] - midpoint[1]);
723 const bool is_camera = is_lock_axis_view && (tgpi->
rv3d->
persp ==
RV3D_CAMOB) && (!is_depth);
743 switch (tgpi->
type) {
780 float *depth_arr =
NULL;
782 int mval_i[2], mval_prev[2] = {0};
783 bool interp_depth =
false;
784 bool found_depth =
false;
799 for (
int i = 0; i < gps->
totpoints; i++, ptc++) {
803 tgpi->
region, mval_i, mval_prev, depth_margin + 1, depth_arr + i) == 0))) {
813 for (
int i = 0; i < gps->
totpoints; i++) {
814 depth_arr[i] = 0.9999f;
819 bool valid_depth =
false;
820 for (
int i = 0; i < gps->
totpoints; i++) {
821 if (depth_arr[i] < 0.9999f) {
840 if (depth_arr[i] != FLT_MAX) {
848 last_valid = first_valid;
851 for (i = gps->
totpoints - 1; i >= 0; i--) {
852 if (depth_arr[i] != FLT_MAX) {
862 if (!
ELEM(i, first_valid, last_valid)) {
863 depth_arr[i] = FLT_MAX;
877 for (
int i = 0; i < gps->
totpoints; i++) {
896 float curve_pressure = 1.0;
897 float pressure = 1.0;
904 pressure = curve_pressure;
920 const float fac = p2d->
rnd[0] * exfactor * jitter;
923 float mvec[2], svec[2];
925 mvec[0] = (p2d->
x - (p2d - 1)->
x);
926 mvec[1] = (p2d->
y - (p2d - 1)->
y);
935 if (p2d->
rnd[1] > 0.5f) {
969 CLAMP(pressure, 0.1f, 1.0f);
1085 for (
int i = 0; i < gps->
totpoints; i++) {
1091 if ((!is_depth) && (((align_flag &
GP_PROJECT_VIEWSPACE) && is_lock_axis_view) || (is_camera))) {
1224 tgpi->
brush = brush;
1228 "gp primitive cpoint");
1233 bmain, tgpi->
ob, ts);
1242 tgpi->
curve =
false;
1318 const int def_nr = tgpi->
ob->
actdef - 1;
1326 short add_frame_mode;
1369 for (
int i = 0; i < gps->
totpoints; i++) {
1384 while (doit && gps) {
1387 if (gps_target !=
NULL) {
1426 if ((a < BIG_SIZE_CTL && tgpi->tot_stored_edges == 0) || b <
BIG_SIZE_CTL) {
1430 else if (tgpi->
curve) {
1442 switch (event->
type) {
1489 float dx = (tgpi->
mval[0] - tgpi->
mvalo[0]);
1490 float dy = (tgpi->
mval[1] - tgpi->
mvalo[1]);
1498 float dx = (tgpi->
mval[0] - tgpi->
mvalo[0]);
1499 float dy = (tgpi->
mval[1] - tgpi->
mvalo[1]);
1550 float adjust = (move[1] > 0.0f) ? 0.01f : -0.01f;
1574 int adjust = (move[1] > 0.0f) ? 1 : -1;
1599 for (
int i = 0; i < gps->
totpoints; i++) {
1622 switch (event->
type) {
1649 switch (event->
type) {
1742 switch (event->
type) {
1766 switch (event->
type) {
1793 switch (event->
type) {
1834 printf(
"GP Add Primitive Modal: LEFTMOUSE %d, Status = %d\n", event->
val, tgpi->
flag);
1921 switch (tgpi->
type) {
1952 if (has_numinput ==
false) {
2021 "Number of subdivision by edges",
2033 "Number of points by edge",
2047 ot->
name =
"Grease Pencil Box Shape";
2048 ot->
idname =
"GPENCIL_OT_primitive_box";
2049 ot->
description =
"Create predefined grease pencil stroke box shapes";
2067 ot->
name =
"Grease Pencil Line Shape";
2068 ot->
idname =
"GPENCIL_OT_primitive_line";
2069 ot->
description =
"Create predefined grease pencil stroke lines";
2087 ot->
name =
"Grease Pencil Polyline Shape";
2088 ot->
idname =
"GPENCIL_OT_primitive_polyline";
2089 ot->
description =
"Create predefined grease pencil stroke polylines";
2107 ot->
name =
"Grease Pencil Circle Shape";
2108 ot->
idname =
"GPENCIL_OT_primitive_circle";
2109 ot->
description =
"Create predefined grease pencil stroke circle shapes";
2127 ot->
name =
"Grease Pencil Curve Shape";
2128 ot->
idname =
"GPENCIL_OT_primitive_curve";
2129 ot->
description =
"Create predefined grease pencil stroke curve shapes";
typedef float(TangentPoint)[2]
void BKE_brush_gpencil_paint_presets(struct Main *bmain, struct ToolSettings *ts, const bool reset)
#define BKE_brush_tool_set(brush, p, tool)
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct bGPDlayer * CTX_data_active_gpencil_layer(const bContext *C)
struct bGPdata * CTX_data_gpencil_data(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
void CTX_wm_operator_poll_msg_set(struct bContext *C, const char *msg)
struct Main * CTX_data_main(const bContext *C)
struct ToolSettings * CTX_data_tool_settings(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
bool BKE_gpencil_free_strokes(struct bGPDframe *gpf)
struct bGPDlayer * BKE_gpencil_layer_active_get(struct bGPdata *gpd)
void BKE_gpencil_stroke_select_index_reset(struct bGPDstroke *gps)
void BKE_gpencil_dvert_ensure(struct bGPDstroke *gps)
struct Material * BKE_gpencil_object_material_ensure_from_active_input_brush(struct Main *bmain, struct Object *ob, struct Brush *brush)
struct Material * BKE_gpencil_object_material_ensure_from_active_input_toolsettings(struct Main *bmain, struct Object *ob, struct ToolSettings *ts)
struct bGPDframe * BKE_gpencil_layer_frame_get(struct bGPDlayer *gpl, int cframe, eGP_GetFrame_Mode addnew)
int BKE_gpencil_object_material_get_index_from_brush(struct Object *ob, struct Brush *brush)
#define GPENCIL_STRENGTH_MIN
struct bGPDlayer * BKE_gpencil_layer_addnew(struct bGPdata *gpd, const char *name, bool setactive)
void BKE_gpencil_stroke_geometry_update(struct bGPdata *gpd, struct bGPDstroke *gps)
void BKE_gpencil_stroke_copy_to_keyframes(struct bGPdata *gpd, struct bGPDlayer *gpl, struct bGPDframe *gpf, struct bGPDstroke *gps, const bool tail)
General operations, lookup, etc. for materials.
short BKE_object_material_slot_find_index(struct Object *ob, struct Material *ma)
void BKE_paint_brush_set(struct Paint *paint, struct Brush *br)
struct Brush * BKE_paint_toolslots_brush_get(struct Paint *paint, int slot_index)
void BKE_report(ReportList *reports, ReportType type, const char *message)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void void void BLI_movelisttolist(struct ListBase *dst, struct ListBase *src) ATTR_NONNULL(1
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void void void BLI_movelisttolist_reverse(struct ListBase *dst, struct ListBase *src) ATTR_NONNULL(1
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float square_f(float a)
int interp_sparse_array(float *array, const int list_size, const float skipval)
bool invert_m4_m4(float R[4][4], const float A[4][4])
void loc_eul_size_to_mat4(float R[4][4], const float loc[3], const float eul[3], const float size[3])
MINLINE void round_v2i_v2fl(int r[2], const float a[2])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void copy_v2fl_v2i(float r[2], const int a[2])
void interp_v2_v2v2(float r[2], const float a[2], const float b[2], const float t)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void rotate_v2_v2fl(float r[2], const float p[2], const float angle)
MINLINE void sub_v2_v2(float r[2], const float a[2])
MINLINE void mul_v2_fl(float r[2], float f)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
MINLINE void add_v2_v2(float r[2], const float a[2])
MINLINE float len_manhattan_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
void mid_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void zero_v2(float r[2])
MINLINE float len_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v2(float r[2])
void interp_v2_v2v2v2v2_cubic(float p[2], const float v1[2], const float v2[2], const float v3[2], const float v4[2], const float u)
MINLINE void copy_v2_fl(float r[2], float f)
void BLI_rng_free(struct RNG *rng) ATTR_NONNULL(1)
struct RNG * BLI_rng_new(unsigned int seed)
float BLI_rng_get_float(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
void DEG_id_tag_update(struct ID *id, int flag)
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
@ ID_RECALC_COPY_ON_WRITE
@ GP_BRUSH_USE_STRENGTH_RAND_PRESS
@ GP_BRUSH_USE_STRENGTH_AT_STROKE
@ GP_BRUSH_USE_PRESS_AT_STROKE
@ GP_BRUSH_USE_PRESSURE_RAND_PRESS
@ GP_BRUSH_USE_STRENGTH_PRESSURE
@ GP_BRUSH_USE_JITTER_PRESSURE
#define GPENCIL_MULTIEDIT_SESSIONS_ON(gpd)
@ GP_DATA_STROKE_PAINTMODE
@ GP_DATA_STROKE_EDITMODE
Object is a sort of wrapper for general info.
@ GP_SCULPT_SETT_FLAG_PRIMITIVE_CURVE
@ GP_PROJECT_DEPTH_STROKE_ENDPOINTS
@ GP_PROJECT_DEPTH_STROKE
@ GP_PROJECT_DEPTH_STROKE_FIRST
@ GP_TOOL_FLAG_RETAIN_LAST
@ GP_TOOL_FLAG_PAINT_ONBACK
@ GP_TOOL_FLAG_AUTOMERGE_STROKE
@ GP_TOOL_FLAG_CREATE_WEIGHTS
@ OP_IS_MODAL_CURSOR_REGION
#define GPENCIL_MINIMUM_JOIN_DIST
#define IS_AUTOKEY_ON(scene)
void ED_workspace_status_text(struct bContext *C, const char *str)
void ED_view3d_depth_override(struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, struct Object *obact, eV3DDepthOverrideMode mode, bool update_cache)
void view3d_region_operator_needs_opengl(struct wmWindow *win, struct ARegion *region)
bool ED_view3d_autodist_depth_seg(struct ARegion *region, const int mval_sta[2], const int mval_end[2], int margin, float *depth)
bool ED_view3d_autodist_depth(struct ARegion *region, const int mval[2], int margin, float *depth)
NSNotificationCenter * center
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
Group RGB to Bright Vector Camera CLAMP
Platform independent time functions.
void UI_GetThemeColor4fv(int colorid, float col[4])
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void reset()
clear internal cached data and reset random seed
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
void gpencil_point_conversion_init(struct bContext *C, GP_SpaceConversion *r_gsc)
void gpencil_apply_parent_point(struct Depsgraph *depsgraph, struct Object *obact, bGPDlayer *gpl, bGPDspoint *pt)
void gpencil_stroke_convertcoords_tpoint(struct Scene *scene, struct ARegion *region, struct Object *ob, const struct tGPspoint *point2D, float *depth, float out[3])
static void gpencil_primitive_cancel(bContext *C, wmOperator *op)
static void gpencil_primitive_update(bContext *C, wmOperator *op, tGPDprimitive *tgpi)
static void gpencil_primitive_common_props(wmOperatorType *ot, int subdiv, int type)
void GPENCIL_OT_primitive_line(wmOperatorType *ot)
void GPENCIL_OT_primitive_curve(wmOperatorType *ot)
static const EnumPropertyItem gpencil_primitive_type[]
static void gpencil_primitive_rotate_line(float va[2], float vb[2], const float a[2], const float b[2], const float angle)
static void gpencil_primitive_strength(tGPDprimitive *tgpi, bool reset)
static void gpencil_primitive_circle(tGPDprimitive *tgpi, tGPspoint *points2D)
static void gpencil_primitive_rectangle(tGPDprimitive *tgpi, tGPspoint *points2D)
static void gpencil_primitive_init(bContext *C, wmOperator *op)
static void gpencil_primitive_update_cps(tGPDprimitive *tgpi)
static void gpencil_rotate_v2_v2v2fl(float v[2], const float p[2], const float origin[2], const float angle)
static int gpencil_primitive_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void gpencil_primitive_add_segment(tGPDprimitive *tgpi)
static void gpencil_primitive_set_cp(tGPDprimitive *tgpi, const float p[2], float color[4], int size)
static void gpencil_session_validatebuffer(tGPDprimitive *p)
static void gpencil_primitive_size(tGPDprimitive *tgpi, bool reset)
static void gpencil_primitive_interaction_end(bContext *C, wmOperator *op, wmWindow *win, tGPDprimitive *tgpi)
void GPENCIL_OT_primitive_polyline(wmOperatorType *ot)
static void gpencil_init_colors(tGPDprimitive *p)
static bool gpencil_primitive_add_poll(bContext *C)
static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void gpencil_primitive_interaction_begin(tGPDprimitive *tgpi, const wmEvent *event)
static void gpencil_primitive_arc(tGPDprimitive *tgpi, tGPspoint *points2D)
void GPENCIL_OT_primitive_box(wmOperatorType *ot)
static void gpencil_primitive_bezier(tGPDprimitive *tgpi, tGPspoint *points2D)
static void gpencil_primitive_status_indicators(bContext *C, tGPDprimitive *tgpi)
#define IN_BRUSH_STRENGTH
static void gpencil_primitive_edit_event_handling(bContext *C, wmOperator *op, wmWindow *win, const wmEvent *event, tGPDprimitive *tgpi)
static void gpencil_primitive_allocate_memory(tGPDprimitive *tgpi)
static void gpencil_primitive_to_square(tGPDprimitive *tgpi, const float x, const float y)
static void gpencil_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
static void gpencil_primitive_constrain(tGPDprimitive *tgpi, bool line_mode)
static void gpencil_primitive_set_initdata(bContext *C, tGPDprimitive *tgpi)
static void gpencil_primitive_exit(bContext *C, wmOperator *op)
static void gpencil_primitive_line(tGPDprimitive *tgpi, tGPspoint *points2D, bool editable)
void GPENCIL_OT_primitive_circle(wmOperatorType *ot)
static void gpencil_primitive_move(tGPDprimitive *tgpi, bool reset)
void ED_gpencil_stroke_close_by_distance(bGPDstroke *gps, const float threshold)
void ED_gpencil_project_point_to_plane(const Scene *scene, const Object *ob, bGPDlayer *gpl, const RegionView3D *rv3d, const float origin[3], const int axis, bGPDspoint *pt)
void ED_gpencil_project_stroke_to_plane(const Scene *scene, const Object *ob, const RegionView3D *rv3d, bGPDlayer *gpl, bGPDstroke *gps, const float origin[3], const int axis)
void ED_gpencil_project_stroke_to_view(bContext *C, bGPDlayer *gpl, bGPDstroke *gps)
bGPDstroke * ED_gpencil_stroke_join_and_trim(bGPdata *gpd, bGPDframe *gpf, bGPDstroke *gps, bGPDstroke *gps_dst, const int pt_index)
void ED_gpencil_fill_vertex_color_set(ToolSettings *ts, Brush *brush, bGPDstroke *gps)
void ED_gpencil_init_random_settings(Brush *brush, const int mval[2], GpRandomSettings *random_settings)
void ED_gpencil_sbuffer_update_eval(bGPdata *gpd, Object *ob_eval)
void ED_gpencil_point_vertex_color_set(ToolSettings *ts, Brush *brush, bGPDspoint *pt, tGPspoint *tpt)
void ED_gpencil_tpoint_to_point(ARegion *region, float origin[3], const tGPspoint *tpt, bGPDspoint *pt)
void ED_gpencil_drawing_reference_get(const Scene *scene, const Object *ob, char align_flag, float r_vec[3])
void ED_gpencil_sbuffer_vertex_color_set(Depsgraph *depsgraph, Object *ob, ToolSettings *ts, Brush *brush, Material *material, float random_color[3], float pen_pressure)
bGPDstroke * ED_gpencil_stroke_nearest_to_ends(bContext *C, GP_SpaceConversion *gsc, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps, const float radius, int *r_index)
tGPspoint * ED_gpencil_sbuffer_ensure(tGPspoint *buffer_array, int *buffer_size, int *buffer_used, const bool clear)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
int RNA_int_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
struct CurveMapping * curve_strength
struct CurveMapping * curve_jitter
struct CurveMapping * curve_rand_pressure
struct CurveMapping * curve_rand_strength
float draw_random_strength
struct BrushGpencilSettings * gpencil_settings
struct CurveMapping * cur_primitive
struct ToolSettings * toolsettings
struct MDeformVert * dvert
bGPDcontrolpoint * cp_points
struct Depsgraph * depsgraph
GpRandomSettings random_settings
struct Material * material
struct RegionView3D * rv3d
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
struct ReportList * reports
long int PIL_check_seconds_timer_i(void)
void WM_cursor_modal_set(wmWindow *win, int val)
void WM_cursor_modal_restore(wmWindow *win)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)