57 #include "RNA_prototypes.h"
169 const float save_pt[3])
191 const float scale[3] = {1.0f, 1.0f, 1.0f};
192 float plane_normal[3] = {0.0f, 0.0f, 1.0f};
253 float influence = brush->
alpha;
267 influence *= brush_falloff;
290 bool changed =
false;
465 memset(
data->points, 0,
sizeof(
int) *
data->capacity);
466 memset(
data->weights, 0,
sizeof(
float) *
data->capacity);
467 memset(
data->rot_eval, 0,
sizeof(
float) *
data->capacity);
500 data->points[
data->size] = pt_index;
502 data->rot_eval[
data->size] = rot_eval;
528 r[0] = (mval_f[0] * cval) - (mval_f[1] * sval);
529 r[1] = (mval_f[0] * sval) + (mval_f[1] * cval);
539 const float diff_mat[4][4])
547 float matrix[4][4], inverse_diff_mat[4][4];
553 for (
int i = 0; i <
data->size; i++) {
555 float delta[3] = {0.0f};
608 float delta[3] = {0.0f};
684 fac = 1.0f + (inf * inf);
688 fac = 1.0f - (inf * inf);
757 const float axis[3] = {0.0f, 0.0f, 1.0f};
758 float vec[3] = {0.0f};
772 vec[1] += (
float)gso->
mval[1];
816 float mvec[2], svec[2];
926 float mid[3] = {0.0f};
932 for (i = 0, pt = gps->
points; i < gps->totpoints; i++, pt++) {
946 if (
data->totitems > 1) {
953 "cloned strokes ptr array");
971 if (
data->new_colors) {
992 size_t strokes_added = 0;
1032 if (!ma || new_stroke->
mat_nr < 0) {
1038 for (i = 0, pt = new_stroke->
points; i < new_stroke->totpoints; i++, pt++) {
1048 if ((
data->new_strokes) && (strokes_added < data->totitems)) {
1049 data->new_strokes[strokes_added] = new_stroke;
1069 for (snum = 0; snum <
data->totitems; snum++) {
1074 for (i = 0, pt = gps->
points; i < gps->totpoints; i++, pt++) {
1076 float delta[3] = {0.0f};
1128 TIP_(
"GPencil Sculpt: %s Stroke | LMB to paint | RMB/Escape to Exit"
1129 " | Ctrl to Invert Action | Wheel Up/Down for Size "
1130 " | Shift-Wheel Up/Down for Strength"),
1169 gso->
cfra = INT_MAX;
1238 if (found ==
false) {
1242 "Copy some strokes to the clipboard before using the Clone brush to paste "
1354 if ((gpd ==
NULL) || (cfra == gso->
cfra)) {
1408 if (idx_eval != 0) {
1409 pt_prev_eval = &gps_eval->
points[idx_eval - 1];
1413 pt_prev_eval = &gps_eval->
points[idx_eval + 1];
1433 float v_orig_a[2], v_orig_b[2], v_eval_a[2], v_eval_b[2];
1449 const float diff_mat[4][4],
1469 bool include_last =
false;
1470 bool changed =
false;
1471 float rot_eval = 0.0f;
1480 pt_active = (pt->runtime.pt_orig) ? pt->runtime.pt_orig : pt;
1488 if (pt_active !=
NULL) {
1490 changed = apply(gso, gps_active, rot_eval, 0, radius, pc1);
1500 for (i = 0; (i + 1) < gps->
totpoints; i++) {
1503 pt2 = gps->
points + i + 1;
1509 include_last =
false;
1533 if ((i != gps->
totpoints - 2) && (pt->runtime.pt_orig ==
NULL) &&
1542 index = (pt->runtime.pt_orig) ? pt->runtime.idx_orig : i;
1543 if ((pt_active !=
NULL) && (index < gps_active->totpoints)) {
1545 ok = apply(gso, gps_active, rot_eval, index, radius, pc1);
1557 pt = &gps->
points[i + 1];
1560 if ((pt_active !=
NULL) && (index < gps_active->totpoints)) {
1562 ok |= apply(gso, gps_active, rot_eval, index, radius, pc2);
1563 include_last =
false;
1567 include_last =
true;
1572 else if (include_last) {
1581 if ((pt_active !=
NULL) && (index < gps_active->totpoints)) {
1583 changed |= apply(gso, gps_active, rot_eval, index, radius, pc1);
1584 include_last =
false;
1599 const float diff_mat[4][4])
1601 bool changed =
false;
1602 bool redo_geom =
false;
1615 float bound_mat[4][4];
1645 redo_geom |= changed;
1666 if (gps_active !=
NULL) {
1682 redo_geom |= changed;
1689 redo_geom |= changed;
1696 redo_geom |= changed;
1703 redo_geom |= changed;
1711 redo_geom |= changed;
1716 printf(
"ERROR: Unknown type of GPencil Sculpt brush \n");
1765 const int radius = 10;
1774 float bound_mat[4][4];
1777 bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
1789 if ((is_masking_layer) && (gpl == gpl_active)) {
1794 if (is_masking_material) {
1796 if (mat == mat_active) {
1803 if (!is_masking_stroke) {
1830 for (
int i = 0; (i + 1) < gps->
totpoints; i++) {
1833 pt2 = gps->
points + i + 1;
1863 if (!is_multiedit) {
1878 bool changed =
false;
1923 float diff_mat[4][4];
1925 mul_m4_m4m4(diff_mat, diff_mat, gpl->layer_invmat);
1958 if (gpl->actframe !=
NULL) {
1978 bool changed =
false;
1982 gso->
mval[0] = mouse[0] = (int)(mousef[0]);
1983 gso->
mval[1] = mouse[1] = (int)(mousef[1]);
2059 mouse[0] =
event->mval[0] + 1;
2060 mouse[1] =
event->mval[1] + 1;
2070 float pressure =
event->tablet.pressure;
2073 if (pressure >= 0.99f) {
2133 bool needs_timer =
false;
2134 float brush_rate = 0.0f;
2165 brush_rate = 0.001f;
2187 if (is_modal ==
false) {
2209 bool redraw_region =
false;
2210 bool redraw_toolsettings =
false;
2215 switch (event->
type) {
2223 redraw_region =
true;
2263 switch (event->
type) {
2287 redraw_region =
true;
2318 if (redraw_region) {
2324 if (redraw_toolsettings) {
2335 ot->
name =
"Stroke Sculpt";
2336 ot->
idname =
"GPENCIL_OT_sculpt_paint";
2337 ot->
description =
"Apply tweaks to strokes by painting over the strokes";
2359 "Enter a mini 'sculpt-mode' if enabled, otherwise, exit after drawing a single stroke");
typedef float(TangentPoint)[2]
float BKE_brush_curve_strength(const struct Brush *br, float p, float len)
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct bGPDlayer * CTX_data_active_gpencil_layer(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
#define CTX_DATA_COUNT(C, member)
struct ARegion * CTX_wm_region(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
struct bGPDstroke * BKE_gpencil_stroke_duplicate(struct bGPDstroke *gps_src, bool dup_points, bool dup_curve)
struct bGPDlayer * BKE_gpencil_layer_active_get(struct bGPdata *gpd)
struct bGPDframe * BKE_gpencil_frame_addcopy(struct bGPDlayer *gpl, int cframe)
float BKE_gpencil_multiframe_falloff_calc(struct bGPDframe *gpf, int actnum, int f_init, int f_end, struct CurveMapping *cur_falloff)
bool BKE_gpencil_layer_is_editable(const struct bGPDlayer *gpl)
int BKE_gpencil_object_material_index_get(struct Object *ob, struct Material *ma)
void BKE_gpencil_frame_range_selected(struct bGPDlayer *gpl, int *r_initframe, int *r_endframe)
struct bGPDlayer * BKE_gpencil_layer_named_get(struct bGPdata *gpd, const char *name)
struct bGPDframe * BKE_gpencil_layer_frame_get(struct bGPDlayer *gpl, int cframe, eGP_GetFrame_Mode addnew)
void BKE_gpencil_layer_transform_matrix_get(const struct Depsgraph *depsgraph, struct Object *obact, struct bGPDlayer *gpl, float diff_mat[4][4])
bool BKE_gpencil_stroke_smooth_thickness(struct bGPDstroke *gps, int point_index, float influence, int iterations, struct bGPDstroke *r_gps)
void BKE_gpencil_stroke_geometry_update(struct bGPdata *gpd, struct bGPDstroke *gps)
bool BKE_gpencil_stroke_smooth_strength(struct bGPDstroke *gps, int point_index, float influence, int iterations, struct bGPDstroke *r_gps)
bool BKE_gpencil_stroke_smooth_uv(struct bGPDstroke *gps, int point_index, float influence, int iterations, struct bGPDstroke *r_gps)
bool BKE_gpencil_stroke_smooth_point(struct bGPDstroke *gps, int point_index, float influence, int iterations, bool smooth_caps, bool keep_shape, struct bGPDstroke *r_gps)
bool BKE_gpencil_has_transform_modifiers(struct Object *ob)
void BKE_gpencil_tag_full_update(struct bGPdata *gpd, struct bGPDlayer *gpl, struct bGPDframe *gpf, struct bGPDstroke *gps)
General operations, lookup, etc. for materials.
struct MaterialGPencilStyle * BKE_gpencil_material_settings(struct Object *ob, short act)
struct Material * BKE_object_material_get(struct Object *ob, short act)
struct Material * BKE_gpencil_material(struct Object *ob, short act)
void BKE_report(ReportList *reports, eReportType type, const char *message)
bool BLI_ghash_haskey(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
GHash * BLI_ghash_ptr_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float clamp_f(float value, float min, float max)
void plane_from_point_normal_v3(float r_plane[4], const float plane_co[3], const float plane_no[3])
void closest_to_plane_v3(float r_close[3], const float plane[4], const float pt[3])
void mul_m3_v3(const float M[3][3], float r[3])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void unit_m4(float m[4][4])
void mul_mat3_m4_v3(const float M[4][4], float r[3])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void mul_m4_v3(const float M[4][4], float r[3])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
void zero_axis_bias_m4(float mat[4][4])
void loc_eul_size_to_mat4(float R[4][4], const float loc[3], const float eul[3], const float size[3])
void axis_angle_normalized_to_mat3(float R[3][3], const float axis[3], float angle)
MINLINE void round_v2i_v2fl(int r[2], const float a[2])
float angle_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v2_v2(float r[2], const float a[2])
MINLINE float normalize_v3(float r[3])
MINLINE float len_v2v2_int(const int v1[2], const int v2[2])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v2_fl(float r[2], float f)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void negate_v3_v3(float r[3], const float a[3])
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void zero_v3(float r[3])
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
MINLINE void add_v3_v3(float r[3], const float a[3])
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)
bool BLI_rcti_isect_pt(const struct rcti *rect, int x, int y)
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define POINTER_FROM_INT(i)
#define POINTER_AS_UINT(i)
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
struct ID * DEG_get_evaluated_id(const struct Depsgraph *depsgraph, struct ID *id)
@ GP_SCULPT_FLAG_TMP_INVERT
@ GP_SCULPT_FLAGMODE_APPLY_UV
@ GP_SCULPT_FLAGMODE_APPLY_POSITION
@ GP_SCULPT_FLAGMODE_AUTOMASK_LAYER
@ GP_SCULPT_FLAGMODE_AUTOMASK_MATERIAL
@ GP_SCULPT_FLAGMODE_APPLY_THICKNESS
@ GP_SCULPT_FLAGMODE_AUTOMASK_STROKE
@ GP_SCULPT_FLAGMODE_APPLY_STRENGTH
@ GPSCULPT_TOOL_THICKNESS
@ GPSCULPT_TOOL_RANDOMIZE
#define GPENCIL_MULTIEDIT_SESSIONS_ON(gpd)
#define GPENCIL_ANY_SCULPT_MASK(flag)
Object is a sort of wrapper for general info.
@ GP_SCULPT_SETT_FLAG_FRAME_FALLOFF
eGP_Sculpt_SelectMaskFlag
#define IS_AUTOKEY_ON(scene)
bScreen * ED_screen_animation_playing(const struct wmWindowManager *wm)
void ED_region_tag_redraw(struct ARegion *region)
void ED_workspace_status_text(struct bContext *C, const char *str)
void ED_view3d_win_to_delta(const struct ARegion *region, const float xy_delta[2], float zfac, float r_out[3])
eV3DProjStatus ED_view3d_project_float_global(const struct ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
float ED_view3d_calc_zfac(const struct RegionView3D *rv3d, const float co[3])
float ED_view3d_calc_zfac_ex(const struct RegionView3D *rv3d, const float co[3], bool *r_flip)
_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
Read Guarded memory(de)allocation.
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
Platform independent time functions.
#define RNA_BEGIN(sptr, itemptr, propname)
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
const Depsgraph * depsgraph
ListBase gpencil_strokes_copypastebuf
GHash * gpencil_copybuf_validate_colormap(bContext *C)
void gpencil_point_conversion_init(struct bContext *C, GP_SpaceConversion *r_gsc)
void gpencil_point_3d_to_xy(const GP_SpaceConversion *gsc, short flag, const float pt[3], float xy[2])
void gpencil_point_to_parent_space(const bGPDspoint *pt, const float diff_mat[4][4], bGPDspoint *r_pt)
bool gpencil_stroke_inside_circle(const float mval[2], int rad, int x0, int y0, int x1, int y1)
void gpencil_point_to_xy(const GP_SpaceConversion *gsc, const struct bGPDstroke *gps, const struct bGPDspoint *pt, int *r_x, int *r_y)
static int gpencil_sculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void gpencil_brush_clone_add(bContext *C, tGP_BrushEditData *gso)
static bool gpencil_sculpt_brush_poll(bContext *C)
static GP_Sculpt_Settings * gpencil_sculpt_get_settings(Scene *scene)
struct tGPSB_Grab_StrokeData tGPSB_Grab_StrokeData
static bool get_automasking_strokes_list(tGP_BrushEditData *gso)
static void gpencil_sculpt_brush_header_set(bContext *C, tGP_BrushEditData *gso)
static bool gpencil_brush_invert_check(tGP_BrushEditData *gso)
static void gpencil_sculpt_compute_lock_axis(tGP_BrushEditData *gso, bGPDspoint *pt, const float save_pt[3])
static Brush * gpencil_sculpt_get_smooth_brush(tGP_BrushEditData *gso)
static bool gpencil_brush_thickness_apply(tGP_BrushEditData *gso, bGPDstroke *gps, float UNUSED(rot_eval), int pt_index, const int radius, const int co[2])
static bool gpencil_brush_twist_apply(tGP_BrushEditData *gso, bGPDstroke *gps, float UNUSED(rot_eval), int pt_index, const int radius, const int co[2])
static void gpencil_sculpt_brush_exit(bContext *C, wmOperator *op)
static void gpencil_sculpt_brush_apply_event(bContext *C, wmOperator *op, const wmEvent *event)
static void gpencil_brush_clone_init(bContext *C, tGP_BrushEditData *gso)
static bool gpencil_brush_strength_apply(tGP_BrushEditData *gso, bGPDstroke *gps, float UNUSED(rot_eval), int pt_index, const int radius, const int co[2])
static void gpencil_brush_clone_adjust(tGP_BrushEditData *gso)
static int gpencil_sculpt_brush_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool gpencil_sculpt_brush_apply_clone(bContext *C, tGP_BrushEditData *gso)
static void gpencil_brush_grab_calc_dvec(tGP_BrushEditData *gso)
static bool gpencil_brush_grab_store_points(tGP_BrushEditData *gso, bGPDstroke *gps, float rot_eval, int pt_index, const int radius, const int co[2])
static void gpencil_update_geometry(bGPdata *gpd)
static void gpencil_brush_grab_apply_cached(tGP_BrushEditData *gso, bGPDstroke *gps, const float diff_mat[4][4])
static float gpencil_brush_influence_calc(tGP_BrushEditData *gso, const int radius, const int co[2])
static bool gpencil_sculpt_brush_do_frame(bContext *C, tGP_BrushEditData *gso, bGPDlayer *gpl, bGPDframe *gpf, const float diff_mat[4][4])
static bool gpencil_sculpt_brush_apply_standard(bContext *C, tGP_BrushEditData *gso)
static void gpencil_brush_clone_free(tGP_BrushEditData *gso)
static void gpencil_brush_grab_stroke_init(tGP_BrushEditData *gso, bGPDstroke *gps)
static void gpencil_brush_calc_midpoint(tGP_BrushEditData *gso)
bool(* GP_BrushApplyCb)(tGP_BrushEditData *gso, bGPDstroke *gps, float rotation, int pt_index, const int radius, const int co[2])
static int gpencil_sculpt_brush_exec(bContext *C, wmOperator *op)
static bool gpencil_brush_randomize_apply(tGP_BrushEditData *gso, bGPDstroke *gps, float UNUSED(rot_eval), int pt_index, const int radius, const int co[2])
static bool gpencil_brush_smooth_apply(tGP_BrushEditData *gso, bGPDstroke *gps, float UNUSED(rot_eval), int pt_index, const int radius, const int co[2])
static bool gpencil_brush_pinch_apply(tGP_BrushEditData *gso, bGPDstroke *gps, float UNUSED(rot_eval), int pt_index, const int radius, const int co[2])
static bool gpencil_brush_push_apply(tGP_BrushEditData *gso, bGPDstroke *gps, float UNUSED(rot_eval), int pt_index, const int radius, const int co[2])
static bool gpencil_sculpt_brush_do_stroke(tGP_BrushEditData *gso, bGPDstroke *gps, const float diff_mat[4][4], GP_BrushApplyCb apply)
struct tGPSB_CloneBrushData tGPSB_CloneBrushData
static void gpencil_sculpt_brush_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
static void gpencil_sculpt_brush_init_stroke(bContext *C, tGP_BrushEditData *gso)
struct tGP_BrushEditData tGP_BrushEditData
static void gpencil_brush_grab_stroke_free(void *ptr)
static bool gpencil_sculpt_brush_init(bContext *C, wmOperator *op)
static void gpencil_recalc_geometry_tag(bGPDstroke *gps)
static float gpencil_sculpt_rotation_eval_get(tGP_BrushEditData *gso, bGPDstroke *gps_eval, bGPDspoint *pt_eval, int idx_eval)
void GPENCIL_OT_sculpt_paint(wmOperatorType *ot)
bool ED_gpencil_stroke_material_editable(Object *ob, const bGPDlayer *gpl, const bGPDstroke *gps)
bool ED_gpencil_stroke_check_collision(const GP_SpaceConversion *gsc, bGPDstroke *gps, const float mval[2], const int radius, const float diff_mat[4][4])
bool ED_gpencil_stroke_can_use(const bContext *C, const bGPDstroke *gps)
bGPdata * ED_gpencil_data_get_active(const bContext *C)
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
static void area(int d1, int d2, int e1, int e2, float weights[2])
T distance(const T &a, const T &b)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
void RNA_collection_add(PointerRNA *ptr, const char *name, PointerRNA *r_value)
float RNA_float_get(PointerRNA *ptr, const char *name)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_collection_runtime(StructOrFunctionRNA *cont_, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
struct CurveMapping * curve
struct BrushGpencilSettings * gpencil_settings
struct CurveMapping * cur_falloff
struct ToolSettings * toolsettings
struct bGPDframe * gpf_orig
bGPDframe_Runtime runtime
struct bGPDlayer * gpl_orig
bGPDlayer_Runtime runtime
struct bGPDspoint * pt_orig
bGPDspoint_Runtime runtime
struct bGPDstroke * gps_orig
bGPDstroke_Runtime runtime
ListBase vertex_group_names
int vertex_group_active_index
bGPDstroke ** new_strokes
struct GHash * automasking_strokes
bool use_multiframe_falloff
GP_Sculpt_Settings * settings
GHash * stroke_customdata
eGP_Sculpt_SelectMaskFlag mask
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 *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
long int PIL_check_seconds_timer_i(void)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer)
wmTimer * WM_event_add_timer(wmWindowManager *wm, wmWindow *win, int event_type, double timestep)