70 #define MIN_WINDOW_SIZE 128
180 bool skip_layer_check(
short fill_layer_mode,
int gpl_active_index,
int gpl_index);
191 bGPDframe *init_gpf = (all_frames) ? gpl->frames.first :
194 if (init_gpf ==
NULL) {
257 if ((gps->points ==
NULL) || (gps->totpoints < 2)) {
287 pt0 = &gps->points[gps->totpoints - 2];
288 pt1 = &gps->points[gps->totpoints - 1];
326 if ((!show_help) && (show_extend)) {
332 if ((show_help) && (!show_extend)) {
344 const float diff_mat[4][4],
348 const float thershold,
349 const float thickness)
359 const float extend_col[4] = {0.0f, 1.0f, 1.0f, 1.0f};
373 int cyclic_add = (cyclic) ? 1 : 0;
386 for (
int i = 0; i < totpoints; i++, pt++) {
390 CLAMP(alpha, 0.0f, 1.0f);
391 col[3] = alpha <= thershold ? 0.0f : 1.0f;
402 if (cyclic && totpoints > 2) {
418 uchar mouse_color[4] = {0, 0, 255, 255};
442 switch (fill_layer_mode) {
444 if (gpl_index != gpl_active_index) {
450 if (gpl_index != gpl_active_index + 1) {
456 if (gpl_index != gpl_active_index - 1) {
462 if (gpl_index <= gpl_active_index) {
468 if (gpl_index >= gpl_active_index) {
529 if (gpl == tgpf->
gpl) {
530 if ((gpl->actframe ==
NULL) || (gpl->actframe->framenum != tgpf->
active_cfra)) {
531 short add_frame_mode;
556 if ((gps->points ==
NULL) || (gps->totpoints < 2)) {
577 tgpw.
lthick = gpl->line_change;
610 bool is_ortho =
false;
634 char err_out[256] =
"unknown";
637 if (offscreen ==
NULL) {
638 printf(
"GPencil - Fill - Unable to create fill buffer\n");
647 float clip_start, clip_end;
665 float scale_x = (width_new -
width) / 2.0f;
666 float scale_y = (height_new -
height) / 2.0f;
668 viewplane.
xmin -= scale_x;
669 viewplane.
xmax += scale_x;
670 viewplane.
ymin -= scale_y;
671 viewplane.
ymax += scale_y;
708 const float ink[4] = {1.0f, 0.0f, 0.0f, 1.0f};
720 else if (ibuf->
rect) {
743 memcpy(r_col, &ibuf->
rect_float[idx * 4],
sizeof(
float[4]));
757 float *row = &ibuf->
rect_float[ibuf->
x * 4 * row_index];
758 return (row[0] == 0.0f && memcmp(row, row + 1, ((ibuf->
x * 4) - 1) *
sizeof(
float)) != 0);
781 const int extreme = limit - 1;
792 pt = index + (ibuf->
x * extreme);
793 if (pt <= maxpixel) {
795 if (
rgba[0] == 1.0f) {
804 pt = index - (ibuf->
x * extreme);
807 if (
rgba[0] == 1.0f) {
823 int row = index / ibuf->
x;
824 int lowpix = row * ibuf->
x;
825 int higpix = lowpix + ibuf->
x - 1;
828 pt = index - extreme;
831 if (
rgba[0] == 1.0f) {
839 pt = index + extreme;
842 if (
rgba[0] == 1.0f) {
850 return (
bool)(t_a && t_b);
865 const float fill_col[4] = {0.0f, 1.0f, 0.0f, 1.0f};
867 const int maxpixel = (ibuf->
x * ibuf->
y) - 1;
868 bool border_contact =
false;
875 for (
int i = 0; i < maxpixel; i++) {
877 if (
rgba[2] == 1.0f) {
883 if ((index >= 0) && (index <= maxpixel)) {
912 if (
rgba[3] == 0.5f) {
913 border_contact =
true;
917 if ((
rgba[0] != 1.0f) && (
rgba[1] != 1.0f)) {
930 if (
v + 1 <= maxpixel) {
937 if (
v + ibuf->
x <= maxpixel) {
944 if (
v - ibuf->
x >= 0) {
960 return border_contact;
968 const float fill_col[2][4] = {{1.0f, 0.0f, 0.0f, 0.5f}, {0.0f, 0.0f, 0.0f, 0.0f}};
972 const int coloridx = transparent ? 0 : 1;
975 for (idx = 0; idx < ibuf->
x; idx++) {
977 set_pixel(ibuf, idx, fill_col[coloridx]);
979 pixel = idx + (ibuf->
x * (ibuf->
y - 1));
980 set_pixel(ibuf, pixel, fill_col[coloridx]);
983 for (idx = 0; idx < ibuf->
y; idx++) {
985 set_pixel(ibuf, ibuf->
x * idx, fill_col[coloridx]);
987 pixel = ibuf->
x * idx + (ibuf->
x - 1);
988 set_pixel(ibuf, pixel, fill_col[coloridx]);
1002 const float fill_col[3][4] = {
1003 {1.0f, 0.0f, 0.0f, 1.0f}, {0.0f, 1.0f, 0.0f, 1.0f}, {0.0f, 0.0f, 0.0f, 0.0f}};
1006 const int maxpixel = (ibuf->
x * ibuf->
y) - 1;
1008 for (
int v = maxpixel;
v != 0;
v--) {
1012 if (
color[1] == 1.0f) {
1016 else if (
color[0] == 1.0f) {
1036 const float blue_col[4] = {0.0f, 0.0f, 1.0f, 1.0f};
1037 const float clear_col[4] = {1.0f, 0.0f, 0.0f, 1.0f};
1048 for (
int i = 0; i < tgpf->
sbuffer_used && point2D; i++, point2D++) {
1049 int image_idx = ibuf->
x * (int)point2D->
m_xy[1] + (
int)point2D->
m_xy[0];
1056 for (
int idy = 0; idy < ibuf->
y; idy++) {
1059 for (
int idx = 0; idx < ibuf->
x; idx++) {
1060 int image_idx = ibuf->
x * idy + idx;
1063 if (
rgba[2] == 1.0f) {
1072 else if (
rgba[0] == 1.0f) {
1113 #define IS_GREEN (color[1] == 1.0f)
1114 #define IS_NOT_GREEN (color[1] != 1.0f)
1119 const float green[4] = {0.0f, 1.0f, 0.0f, 1.0f};
1120 const int max_size = (ibuf->
x * ibuf->
y) - 1;
1122 for (
int row = 0; row < ibuf->
y; row++) {
1126 int maxpixel = (ibuf->
x * (row + 1)) - 1;
1127 int minpixel = ibuf->
x * row;
1129 for (
int v = maxpixel;
v != minpixel;
v--) {
1149 if (
v + 1 <= maxpixel) {
1158 if (
v + ibuf->
x <= max_size) {
1159 index =
v + ibuf->
x;
1167 if (
v - ibuf->
x >= 0) {
1168 index =
v - ibuf->
x;
1233 #define IS_GREEN (color[1] == 1.0f)
1234 #define IS_NOT_GREEN (color[1] != 1.0f)
1239 const float clear[4] = {0.0f, 0.0f, 0.0f, 0.0f};
1240 const int max_size = (ibuf->
x * ibuf->
y) - 1;
1243 for (
int row = 0; row < ibuf->
y; row++) {
1247 int maxpixel = (ibuf->
x * (row + 1)) - 1;
1248 int minpixel = ibuf->
x * row;
1250 for (
int v = maxpixel;
v != minpixel;
v--) {
1263 if (
v + 1 <= maxpixel) {
1271 if (
v + ibuf->
x <= max_size) {
1279 if (
v - ibuf->
x >= 0) {
1318 int first_co[2] = {-1, -1};
1319 int backtracked_co[2];
1320 int current_check_co[2];
1321 int prev_check_co[2];
1322 int backtracked_offset[1][2] = {{0, 0}};
1323 bool first_pixel =
false;
1324 bool start_found =
false;
1325 const int NEIGHBOR_COUNT = 8;
1327 const int offset[8][2] = {
1341 int imagesize = ibuf->
x * ibuf->
y;
1355 for (
int idx = imagesize - 1; idx != 0; idx--) {
1357 if (
rgba[1] == 1.0f) {
1358 boundary_co[0] = idx % ibuf->
x;
1359 boundary_co[1] = idx / ibuf->
x;
1361 backtracked_co[0] = (idx - 1) % ibuf->
x;
1362 backtracked_co[1] = (idx - 1) / ibuf->
x;
1363 backtracked_offset[0][0] = backtracked_co[0] - boundary_co[0];
1364 backtracked_offset[0][1] = backtracked_co[1] - boundary_co[1];
1373 while (start_found) {
1374 int cur_back_offset = -1;
1375 for (
int i = 0; i < NEIGHBOR_COUNT; i++) {
1376 if (backtracked_offset[0][0] ==
offset[i][0] && backtracked_offset[0][1] ==
offset[i][1]) {
1378 cur_back_offset = i;
1384 while (loop < (NEIGHBOR_COUNT - 1) && cur_back_offset != -1) {
1385 int offset_idx = (cur_back_offset + 1) % NEIGHBOR_COUNT;
1386 current_check_co[0] = boundary_co[0] +
offset[offset_idx][0];
1387 current_check_co[1] = boundary_co[1] +
offset[offset_idx][1];
1389 int image_idx = ibuf->
x * current_check_co[1] + current_check_co[0];
1395 if (image_idx > imagesize - 1) {
1396 start_found =
false;
1402 if (
rgba[1] == 1.0f) {
1405 backtracked_offset[0][0] = backtracked_co[0] - boundary_co[0];
1406 backtracked_offset[0][1] = backtracked_co[1] - boundary_co[1];
1417 if ((boundary_co[0] == start_co[0] && boundary_co[1] == start_co[1]) ||
1418 (boundary_co[0] == first_co[0] && boundary_co[1] == first_co[1])) {
1441 if (totpoints == 0) {
1456 int depth_margin = 0;
1459 int mval_prev[2] = {0};
1460 int interp_depth = 0;
1461 int found_depth = 0;
1466 for (i = 0, ptc = tgpf->
sbuffer; i < totpoints; i++, ptc++) {
1473 depths, mval_i, mval_prev, depth_margin + 1, tgpf->
depth_arr + i) == 0))) {
1474 interp_depth =
true;
1483 if (found_depth ==
false) {
1485 for (i = totpoints - 1; i >= 0; i--) {
1502 if (totpoints == 0) {
1518 point2D->
time = 0.0f;
1532 const bool is_camera = is_lock_axis_view && (tgpf->
rv3d->
persp ==
RV3D_CAMOB) && (!is_depth);
1535 if (brush ==
NULL) {
1608 for (
int i = 0; i < tgpf->
sbuffer_used && point2D; i++, point2D++, pt++) {
1633 if (dvert !=
NULL) {
1642 for (
int i = 0; i < gps->
totpoints; i++) {
1662 if ((!is_depth) && (((align_flag &
GP_PROJECT_VIEWSPACE) && is_lock_axis_view) || (is_camera))) {
1680 const char *status_str =
TIP_(
"Fill: ESC/RMB cancel, LMB Fill, Shift Draw on Back");
1690 const float ink[4] = {1.0f, 0.0f, 0.0f, 1.0f};
1700 if (region != tgpf->
region) {
1775 tgpf->
brush = brush;
1789 bmain, tgpf->
ob, brush);
1975 const float winx_half = tgpf->
region->
winx / 2.0f;
1976 const float winy_half = tgpf->
region->
winy / 2.0f;
1983 float objectbox_min[2], objectbox_max[2];
1990 float diff_mat[4][4];
2008 if ((gps->points ==
NULL) || (gps->totpoints < 2)) {
2022 float boundbox_min[2];
2023 float boundbox_max[2];
2031 &rect_bound, objectbox_min[0], objectbox_max[0], objectbox_min[1], objectbox_max[1]);
2037 if (rect_bound.
xmin < 0.0f) {
2045 if (rect_bound.
ymin < 0.0f) {
2057 if ((zoomx != 1.0f) || (zoomy != 1.0f)) {
2066 const float blue_col[4] = {0.0f, 0.0f, 1.0f, 1.0f};
2068 const int maxpixel = (ibuf->
x * ibuf->
y) - 1;
2070 for (
int i = 0; i < maxpixel; i++) {
2072 if (
rgba[3] == 0.0f) {
2099 if ((!border_contact) || (is_inverted)) {
2111 int totpoints_prv = 0;
2113 while (totpoints > 0) {
2119 if (totpoints > 0) {
2145 if (totpoints < 3) {
2149 if (totpoints_prv == totpoints) {
2151 if (loop_limit > 3) {
2155 totpoints_prv = totpoints;
2182 const bool is_inverted = (is_brush_inv && (
event->modifier &
KM_CTRL) == 0) ||
2183 (!is_brush_inv && (
event->modifier &
KM_CTRL) != 0);
2190 switch (event->
type) {
2203 if ((tgpf->
oldkey != -1) || (!help_lines)) {
2206 bool in_bounds =
false;
2211 tgpf->
mouse[0] =
event->mval[0];
2212 tgpf->
mouse[1] =
event->mval[1];
2230 if (!is_multiedit) {
2253 int step = ((
float)i / (
float)total) * 100.0f;
2263 while ((!tgpf->
done) && (loop_limit < 2)) {
2274 if (tgpf->
zoom == 1.0f) {
2316 else if (do_extend) {
2319 tgpf->
oldkey =
event->type;
2364 ot->
name =
"Grease Pencil Fill";
2366 ot->
description =
"Fill with color the shape formed by strokes";
typedef float(TangentPoint)[2]
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(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)
struct bGPDlayer * BKE_gpencil_layer_active_get(struct bGPdata *gpd)
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 bGPDstroke * BKE_gpencil_stroke_new(int mat_idx, int totpoints, short thickness)
void BKE_gpencil_free_stroke(struct bGPDstroke *gps)
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)
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_frame_selected_hash(struct bGPdata *gpd, struct GHash *r_list)
void BKE_gpencil_stroke_geometry_update(struct bGPdata *gpd, struct bGPDstroke *gps)
void BKE_gpencil_stroke_simplify_fixed(struct bGPdata *gpd, struct bGPDstroke *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)
void BKE_image_release_ibuf(struct Image *ima, struct ImBuf *ibuf, void *lock)
struct ImBuf * BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **r_lock)
struct Image * BKE_image_add_from_imbuf(struct Main *bmain, struct ImBuf *ibuf, const char *name)
void BKE_id_free(struct Main *bmain, void *idv)
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 Brush * BKE_paint_brush(struct Paint *paint)
void BKE_report(ReportList *reports, eReportType type, const char *message)
struct ARegion * BKE_area_find_region_xy(struct ScrArea *area, int regiontype, const int xy[2]) ATTR_NONNULL(3)
BLI_INLINE void * BLI_ghashIterator_getKey(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_int_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
#define GHASH_ITER(gh_iter_, ghash_)
unsigned int BLI_ghash_len(const GHash *gh) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float max_ff(float a, float b)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
void orthographic_m4(float mat[4][4], float left, float right, float bottom, float top, float nearClip, float farClip)
void perspective_m4(float mat[4][4], float left, float right, float bottom, float top, float nearClip, float farClip)
int interp_sparse_array(float *array, int list_size, float skipval)
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[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 normalize_v3(float r[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
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_v2_v2_int(int r[2], const int a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
void minmax_v2v2_v2(float min[2], float max[2], const float vec[2])
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void add_v2_fl(float r[2], float f)
bool BLI_rcti_isect_pt_v(const struct rcti *rect, const int xy[2])
bool BLI_rctf_clamp(struct rctf *rect, const struct rctf *rect_bounds, float r_xy[2])
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
void BLI_stack_pop(BLI_Stack *stack, void *dst) ATTR_NONNULL()
size_t BLI_stack_count(const BLI_Stack *stack) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_stack_push(BLI_Stack *stack, const void *src) ATTR_NONNULL()
bool BLI_stack_is_empty(const BLI_Stack *stack) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_stack_free(BLI_Stack *stack) ATTR_NONNULL()
#define BLI_stack_new(esize, descr)
#define INIT_MINMAX2(min, max)
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
@ GP_BRUSH_FILL_SHOW_HELPLINES
@ GP_BRUSH_MATERIAL_PINNED
@ GP_BRUSH_FILL_SHOW_EXTENDLINES
@ GP_BRUSH_FILL_FIT_DISABLE
@ GP_FILL_GPLMODE_ALL_ABOVE
@ GP_FILL_GPLMODE_VISIBLE
@ GP_FILL_GPLMODE_ALL_BELOW
#define GPENCIL_MIN_FILL_FAC
#define GPENCIL_MULTIEDIT_SESSIONS_ON(gpd)
#define GPENCIL_MAX_FILL_FAC
Object is a sort of wrapper for general info.
@ GP_PROJECT_DEPTH_STROKE
@ GP_TOOL_FLAG_RETAIN_LAST
@ GP_TOOL_FLAG_PAINT_ONBACK
@ GP_TOOL_FLAG_CREATE_WEIGHTS
#define IS_AUTOKEY_ON(scene)
bool ED_operator_regionactive(struct bContext *C)
void ED_workspace_status_text(struct bContext *C, const char *str)
#define REGION_DRAW_POST_VIEW
void * ED_region_draw_cb_activate(struct ARegionType *art, void(*draw)(const struct bContext *, struct ARegion *, void *), void *customdata, int type)
bool ED_region_draw_cb_exit(struct ARegionType *art, void *handle)
bool ED_view3d_depth_read_cached(const ViewDepths *vd, const int mval[2], int margin, float *r_depth)
bool ED_view3d_viewplane_get(struct Depsgraph *depsgraph, const struct View3D *v3d, const struct RegionView3D *rv3d, int winxi, int winyi, struct rctf *r_viewplane, float *r_clipsta, float *r_clipend, float *r_pixsize)
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_update_viewmat(struct Depsgraph *depsgraph, const struct Scene *scene, struct View3D *v3d, struct ARegion *region, const float viewmat[4][4], const float winmat[4][4], const struct rcti *rect, bool offscreen)
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)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_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 GLsizei width
_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 green
void GPU_matrix_pop(void)
void GPU_matrix_identity_projection_set(void)
void GPU_matrix_pop_projection(void)
#define GPU_matrix_set(x)
void GPU_matrix_push(void)
#define GPU_matrix_projection_set(x)
void GPU_matrix_identity_set(void)
void GPU_matrix_push_projection(void)
@ GPU_SHADER_3D_POINT_FIXED_SIZE_VARYING_COLOR
@ GPU_SHADER_3D_FLAT_COLOR
void GPU_blend(eGPUBlend blend)
void GPU_line_width(float width)
void GPU_depth_mask(bool depth)
void GPU_point_size(float size)
struct ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
void IMB_rect_from_float(struct ImBuf *ibuf)
Contains defines and structs used throughout the imbuf module.
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
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
#define ND_SPACE_PROPERTIES
ATTR_WARN_UNUSED_RESULT BMesh * bm
ATTR_WARN_UNUSED_RESULT const BMVert * v
void ED_gpencil_draw_fill(tGPDdraw *tgpw)
static int gpencil_fill_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static void gpencil_zoom_level_set(tGPDfill *tgpf)
static bool is_row_filled(const ImBuf *ibuf, const int row_index)
static bool is_leak_narrow(ImBuf *ibuf, const int maxpixel, int limit, int index, int type)
static void gpencil_fill_status_indicators(bContext *C)
void GPENCIL_OT_fill(wmOperatorType *ot)
static bool gpencil_do_frame_fill(tGPDfill *tgpf, const bool is_inverted)
static bool gpencil_stroke_is_drawable(tGPDfill *tgpf, bGPDstroke *gps)
static bool gpencil_find_and_mark_empty_areas(tGPDfill *tgpf)
static void gpencil_draw_datablock(tGPDfill *tgpf, const float ink[4])
static int gpencil_fill_init(bContext *C, wmOperator *op)
static void gpencil_draw_boundary_lines(const struct bContext *UNUSED(C), struct tGPDfill *tgpf)
static bool gpencil_boundaryfill_area(tGPDfill *tgpf)
static void gpencil_draw_basic_stroke(tGPDfill *tgpf, bGPDstroke *gps, const float diff_mat[4][4], const bool cyclic, const float ink[4], const int flag, const float thershold, const float thickness)
bool skip_layer_check(short fill_layer_mode, int gpl_active_index, int gpl_index)
static void get_pixel(const ImBuf *ibuf, const int idx, float r_col[4])
static void gpencil_fill_exit(bContext *C, wmOperator *op)
static void gpencil_invert_image(tGPDfill *tgpf)
static void set_pixel(ImBuf *ibuf, int idx, const float col[4])
static void gpencil_update_extend(tGPDfill *tgpf)
static int gpencil_fill_modal(bContext *C, wmOperator *op, const wmEvent *event)
static bool gpencil_fill_poll(bContext *C)
static void gpencil_fill_draw_3d(const bContext *C, ARegion *UNUSED(region), void *arg)
static void gpencil_fill_cancel(bContext *C, wmOperator *op)
static void gpencil_erase_processed_area(tGPDfill *tgpf)
static void gpencil_get_outline_points(tGPDfill *tgpf, const bool dilate)
static tGPDfill * gpencil_session_init_fill(bContext *C, wmOperator *op)
static bool contract_shape(ImBuf *ibuf)
static void draw_mouse_position(tGPDfill *tgpf)
static int gpencil_points_from_stack(tGPDfill *tgpf)
static void gpencil_stroke_from_buffer(tGPDfill *tgpf)
static bool dilate_shape(ImBuf *ibuf)
static bool gpencil_render_offscreen(tGPDfill *tgpf)
static void gpencil_get_depth_array(tGPDfill *tgpf)
static void gpencil_create_extensions(tGPDfill *tgpf)
static void gpencil_delete_temp_stroke_extension(tGPDfill *tgpf, const bool all_frames)
static void gpencil_set_borders(tGPDfill *tgpf, const bool transparent)
static void extrapolate_points_by_length(bGPDspoint *a, bGPDspoint *b, float length, float r_point[3])
void gpencil_undo_init(struct bGPdata *gpd)
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_undo_push(struct bGPdata *gpd)
void gpencil_undo_finish(void)
void gpencil_stroke_convertcoords_tpoint(struct Scene *scene, struct ARegion *region, struct Object *ob, const struct tGPspoint *point2D, float *depth, float r_out[3])
void ED_gpencil_projected_2d_bound_box(const GP_SpaceConversion *gsc, const bGPDstroke *gps, const float diff_mat[4][4], float r_min[2], float r_max[2])
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)
void ED_gpencil_fill_vertex_color_set(ToolSettings *ts, Brush *brush, bGPDstroke *gps)
void ED_gpencil_point_vertex_color_set(ToolSettings *ts, Brush *brush, bGPDspoint *pt, tGPspoint *tpt)
void ED_gpencil_drawing_reference_get(const Scene *scene, const Object *ob, char align_flag, float r_vec[3])
void GPU_offscreen_free(GPUOffScreen *ofs)
void GPU_offscreen_unbind(GPUOffScreen *UNUSED(ofs), bool restore)
GPUOffScreen * GPU_offscreen_create(int width, int height, bool depth, eGPUTextureFormat format, char err_out[256])
void GPU_offscreen_read_pixels(GPUOffScreen *ofs, eGPUDataFormat format, void *pixels)
void GPU_clear_color(float red, float green, float blue, float alpha)
void GPU_clear_depth(float depth)
void GPU_offscreen_bind(GPUOffScreen *ofs, bool save)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
ccl_device_inline float3 ceil(const float3 &a)
static void clear(Message *msg)
static void area(int d1, int d2, int e1, int e2, float weights[2])
T length(const vec_base< T, Size > &a)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken rgba("rgba", pxr::TfToken::Immortal)
bool RNA_boolean_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)
struct ARegionType * type
struct Material * material
struct BrushGpencilSettings * gpencil_settings
struct MaterialGPencilStyle * gp_style
struct ToolSettings * toolsettings
struct MDeformVert * dvert
ListBase vertex_group_names
int vertex_group_active_index
struct Depsgraph * depsgraph
struct RegionView3D * rv3d
struct ReportList * reports
struct Depsgraph * depsgraph
struct RegionView3D * rv3d
struct bGPDstroke * gps_mouse
struct ViewDepths * depths
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
void WM_cursor_modal_set(wmWindow *win, int val)
void WM_cursor_modal_restore(wmWindow *win)
void WM_cursor_time(wmWindow *win, int nr)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)