diff options
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_gpencil.h | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 8d2d9b934d4..8dd162ea538 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -39,6 +39,7 @@ struct bGPDspoint; struct bGPDstroke; struct bGPdata; struct tGPspoint; +struct GP_SpaceConversion; struct ARegion; struct Depsgraph; @@ -46,6 +47,7 @@ struct Main; struct RegionView3D; struct ReportList; struct Scene; +struct ToolSettings; struct ScrArea; struct View3D; struct ViewLayer; @@ -75,23 +77,8 @@ typedef struct tGPspoint { float uv_rot; /* uv rotation for dor mode */ float rnd[3]; /* rnd value */ bool rnd_dirty; /* rnd flag */ - short tflag; /* Internal flag */ } tGPspoint; -/* tGPspoint->flag */ -typedef enum etGPspoint_tFlag { - /* Created by Fake event (used when mouse/pen move very fast while drawing). */ - GP_TPOINT_FAKE = (1 << 0), -} etGPspoint_tFlag; - -/* used to sort by zdepth gpencil objects in viewport */ -/* TODO: this could be a system parameter in userprefs screen */ -#define GP_CACHE_BLOCK_SIZE 16 -typedef struct tGPencilSort { - struct Base *base; - float zdepth; -} tGPencilSort; - /* ----------- Grease Pencil Tools/Context ------------- */ /* Context-dependent */ @@ -210,12 +197,6 @@ bool ED_gpencil_add_lattice_modifier(const struct bContext *C, /* ------------ Transformation Utilities ------------ */ -/* get difference matrix */ -void ED_gpencil_parent_location(const struct Depsgraph *depsgraph, - struct Object *obact, - struct bGPdata *gpd, - struct bGPDlayer *gpl, - float diff_mat[4][4]); /* reset parent matrix for all layers */ void ED_gpencil_reset_layers_parent(struct Depsgraph *depsgraph, struct Object *obact, @@ -231,7 +212,6 @@ void ED_gpencil_create_stroke(struct bContext *C, struct Object *ob, float mat[4 /* ------------ Object Utilities ------------ */ struct Object *ED_gpencil_add_object(struct bContext *C, - struct Scene *scene, const float loc[3], unsigned short local_view_bits); void ED_gpencil_add_defaults(struct bContext *C, struct Object *ob); @@ -251,11 +231,11 @@ void ED_gp_project_point_to_plane(const struct Scene *scene, const float origin[3], const int axis, struct bGPDspoint *pt); -void ED_gp_get_drawing_reference(const struct Scene *scene, - const struct Object *ob, - struct bGPDlayer *gpl, - char align_flag, - float vec[3]); +void ED_gpencil_drawing_reference_get(const struct Scene *scene, + const struct Object *ob, + struct bGPDlayer *gpl, + char align_flag, + float vec[3]); void ED_gpencil_project_stroke_to_view(struct bContext *C, struct bGPDlayer *gpl, struct bGPDstroke *gps); @@ -277,7 +257,6 @@ void ED_gpencil_tpoint_to_point(struct ARegion *region, float origin[3], const struct tGPspoint *tpt, struct bGPDspoint *pt); -void ED_gpencil_calc_stroke_uv(struct Object *ob, struct bGPDstroke *gps); void ED_gpencil_update_color_uv(struct Main *bmain, struct Material *mat); /* extend selection to stroke intersections @@ -303,9 +282,30 @@ struct tGPspoint *ED_gpencil_sbuffer_ensure(struct tGPspoint *buffer_array, int *buffer_size, int *buffer_used, const bool clear); +void ED_gpencil_sbuffer_update_eval(struct bGPdata *gpd, struct Object *ob_eval); + /* Tag all scene grease pencil object to update. */ void ED_gpencil_tag_scene_gpencil(struct Scene *scene); +/* Vertex color set. */ +void ED_gpencil_fill_vertex_color_set(struct ToolSettings *ts, + struct Brush *brush, + struct bGPDstroke *gps); +void ED_gpencil_point_vertex_color_set(struct ToolSettings *ts, + struct Brush *brush, + struct bGPDspoint *pt); +void ED_gpencil_sbuffer_vertex_color_set(struct Depsgraph *depsgraph, + struct Object *ob, + struct ToolSettings *ts, + struct Brush *brush, + struct Material *material); + +bool ED_gpencil_stroke_check_collision(struct GP_SpaceConversion *gsc, + struct bGPDstroke *gps, + float mouse[2], + const int radius, + const float diff_mat[4][4]); + #ifdef __cplusplus } #endif |