75 #define IN_CURVE_EDIT 2
77 #define IN_BRUSH_SIZE 4
78 #define IN_BRUSH_STRENGTH 5
82 #define SELECT_START 1
87 #define BIG_SIZE_CTL 15
88 #define MID_SIZE_CTL 10
89 #define SMALL_SIZE_CTL 8
150 if ((
x > 0 &&
y > 0) || (
x < 0 &&
y < 0)) {
176 if (angle < 0.4f || angle > (
M_PI - 0.4f)) {
194 const float origin[2],
206 float va[2],
float vb[2],
const float a[2],
const float b[2],
const float angle)
268 "Primitives cannot be added as active layer is locked or hidden");
414 TIP_(
"Line: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- to "
415 "adjust subdivision number, Shift to align, Alt to center, E: extrude"),
420 TIP_(
"Polyline: ESC to cancel, LMB to set, Enter/MMB to confirm, WHEEL/+- to "
421 "adjust subdivision number, Shift to align"),
426 TIP_(
"Rectangle: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- "
427 "to adjust subdivision number, Shift to square, Alt to center"),
432 TIP_(
"Circle: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust subdivision "
433 "number, Shift to square, Alt to center"),
439 TIP_(
"Arc: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust subdivision number, "
440 "Shift to square, Alt to center, M: Flip, E: extrude"),
445 TIP_(
"Curve: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust subdivision "
446 "number, Shift to square, Alt to center, E: extrude"),
460 BLI_snprintf(status_str,
sizeof(status_str),
"%s: %s", msg_str, str_ofs);
466 "%s: %d (%d, %d) (%d, %d)",
489 "%s: %d (%d, %d) (%d, %d)",
514 coords[0][0] = tgpi->
start[0];
515 coords[0][1] = tgpi->
start[1];
516 coords[1][0] = tgpi->
end[0];
517 coords[1][1] = tgpi->
start[1];
518 coords[2][0] = tgpi->
end[0];
519 coords[2][1] = tgpi->
end[1];
520 coords[3][0] = tgpi->
start[0];
521 coords[3][1] = tgpi->
end[1];
522 coords[4][0] = tgpi->
start[0];
523 coords[4][1] = tgpi->
start[1];
526 for (
int j = 0; j < 4; j++) {
534 for (
int j = 0; j < 4; j++) {
536 for (
int k = 0; k < tgpi->
tot_edges; k++) {
711 const bool is_camera = is_lock_axis_view && (tgpi->
rv3d->
persp ==
RV3D_CAMOB) && (!is_depth);
730 switch (tgpi->
type) {
767 float *depth_arr =
NULL;
769 int mval_i[2], mval_prev[2] = {0};
770 bool interp_depth =
false;
771 bool found_depth =
false;
787 for (
int i = 0; i < gps->
totpoints; i++, ptc++) {
791 depths, mval_i, mval_prev, depth_margin + 1, depth_arr + i) == 0))) {
801 for (
int i = 0; i < gps->
totpoints; i++) {
802 depth_arr[i] = 0.9999f;
807 bool valid_depth =
false;
808 for (
int i = 0; i < gps->
totpoints; i++) {
809 if (depth_arr[i] < 0.9999f) {
836 last_valid = first_valid;
839 for (i = gps->
totpoints - 1; i >= 0; i--) {
850 if (!
ELEM(i, first_valid, last_valid)) {
865 for (
int i = 0; i < gps->
totpoints; i++) {
884 float curve_pressure = 1.0;
885 float pressure = 1.0;
892 pressure = curve_pressure;
908 const float fac = p2d->
rnd[0] * exfactor * jitter;
911 float mvec[2], svec[2];
922 if (p2d->
rnd[1] > 0.5f) {
956 CLAMP(pressure, 0.1f, 1.0f);
1074 for (
int i = 0; i < gps->
totpoints; i++) {
1080 if ((!is_depth) && (((align_flag &
GP_PROJECT_VIEWSPACE) && is_lock_axis_view) || (is_camera))) {
1218 tgpi->
brush = brush;
1222 "gp primitive cpoint");
1227 bmain, tgpi->
ob, ts);
1236 tgpi->
curve =
false;
1320 short add_frame_mode;
1363 for (
int i = 0; i < gps->
totpoints; i++) {
1377 float diff_mat[4][4], ctrl1[2], ctrl2[2];
1383 while (doit && gps) {
1393 if (gps_target !=
NULL) {
1432 if ((a < BIG_SIZE_CTL && tgpi->tot_stored_edges == 0) ||
b <
BIG_SIZE_CTL) {
1436 else if (tgpi->
curve) {
1448 switch (event->
type) {
1495 float dx = (tgpi->
mval[0] - tgpi->
mvalo[0]);
1496 float dy = (tgpi->
mval[1] - tgpi->
mvalo[1]);
1504 float dx = (tgpi->
mval[0] - tgpi->
mvalo[0]);
1505 float dy = (tgpi->
mval[1] - tgpi->
mvalo[1]);
1555 float adjust = (move[1] > 0.0f) ? 0.01f : -0.01f;
1578 int adjust = (move[1] > 0.0f) ? 1 : -1;
1603 for (
int i = 0; i < gps->
totpoints; i++) {
1626 switch (event->
type) {
1653 switch (event->
type) {
1746 switch (event->
type) {
1770 switch (event->
type) {
1797 switch (event->
type) {
1920 switch (tgpi->
type) {
1951 if (has_numinput ==
false) {
2020 "Number of subdivision by edges",
2039 ot->
name =
"Grease Pencil Box Shape";
2040 ot->
idname =
"GPENCIL_OT_primitive_box";
2041 ot->
description =
"Create predefined grease pencil stroke box shapes";
2059 ot->
name =
"Grease Pencil Line Shape";
2060 ot->
idname =
"GPENCIL_OT_primitive_line";
2061 ot->
description =
"Create predefined grease pencil stroke lines";
2079 ot->
name =
"Grease Pencil Polyline Shape";
2080 ot->
idname =
"GPENCIL_OT_primitive_polyline";
2081 ot->
description =
"Create predefined grease pencil stroke polylines";
2099 ot->
name =
"Grease Pencil Circle Shape";
2100 ot->
idname =
"GPENCIL_OT_primitive_circle";
2101 ot->
description =
"Create predefined grease pencil stroke circle shapes";
2119 ot->
name =
"Grease Pencil Curve Shape";
2120 ot->
idname =
"GPENCIL_OT_primitive_curve";
2121 ot->
description =
"Create predefined grease pencil stroke curve shapes";
typedef float(TangentPoint)[2]
#define BKE_brush_tool_set(brush, p, tool)
void BKE_brush_gpencil_paint_presets(struct Main *bmain, struct ToolSettings *ts, bool reset)
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)
struct bGPDlayer * BKE_gpencil_layer_addnew(struct bGPdata *gpd, const char *name, bool setactive, bool add_to_header)
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
void BKE_gpencil_layer_transform_matrix_get(const struct Depsgraph *depsgraph, struct Object *obact, struct bGPDlayer *gpl, float diff_mat[4][4])
void BKE_gpencil_stroke_copy_to_keyframes(struct bGPdata *gpd, struct bGPDlayer *gpl, struct bGPDframe *gpf, struct bGPDstroke *gps, bool tail)
void BKE_gpencil_stroke_geometry_update(struct bGPdata *gpd, struct bGPDstroke *gps)
void BKE_gpencil_stroke_boundingbox_calc(struct bGPDstroke *gps)
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, eReportType 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, int list_size, 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])
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v2_v2(float r[2], const float a[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], float u)
MINLINE void mul_v2_fl(float r[2], float f)
void interp_v2_v2v2(float r[2], const float a[2], const float b[2], float t)
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])
void rotate_v2_v2fl(float r[2], const float p[2], float angle)
MINLINE float len_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v2(float r[2])
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)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
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)
bool ED_view3d_depth_read_cached(const ViewDepths *vd, const int mval[2], int margin, float *r_depth)
bool ED_view3d_depth_read_cached_seg(const ViewDepths *vd, const int mval_sta[2], const int mval_end[2], int margin, float *depth)
void ED_view3d_depths_free(ViewDepths *depths)
void view3d_region_operator_needs_opengl(struct wmWindow *win, struct ARegion *region)
void ED_view3d_depth_override(struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, struct Object *obact, eV3DDepthOverrideMode mode, struct ViewDepths **r_depths)
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 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
_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
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
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.
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 r_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)
bGPDstroke * ED_gpencil_stroke_nearest_to_ends(bContext *C, const GP_SpaceConversion *gsc, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps, const float ctrl1[2], const float ctrl2[2], const float radius, int *r_index)
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_stroke_extremes_to2d(const GP_SpaceConversion *gsc, const float diff_mat[4][4], bGPDstroke *gps, float r_ctrl1[2], float r_ctrl2[2])
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)
tGPspoint * ED_gpencil_sbuffer_ensure(tGPspoint *buffer_array, int *buffer_size, int *buffer_used, const bool clear)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool reset
clear internal cached data and reset random seed
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])
T midpoint(const T &a, const T &b)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
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
ListBase vertex_group_names
int vertex_group_active_index
struct ViewDepths * depths
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)
void WM_event_drag_start_mval_fl(const wmEvent *event, const ARegion *region, float r_mval[2])
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)