Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-06-09 16:41:26 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-06-09 16:46:55 +0300
commit37d68871b7c5e6dea36ce4e08013eb645ef550c9 (patch)
treebc221a53f7683850526a3fb51d22561c9d1714cf /source/blender/editors/include/ED_gpencil.h
parentc23b1de2cf8ad13f102d2d5484d09e280b36dda4 (diff)
GPencil: Keep original stroke when reproject
When reproject a stroke sometimes is good to keep the copy of the original stroke to create volume effects Related to T77639 {F8603513} Reviewed By: mendio, pepeland Maniphest Tasks: T77639 Differential Revision: https://developer.blender.org/D7963 50258
Diffstat (limited to 'source/blender/editors/include/ED_gpencil.h')
-rw-r--r--source/blender/editors/include/ED_gpencil.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 0c228fc962b..2a1d9c2dd6c 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -64,6 +64,22 @@ struct bAnimContext;
struct wmKeyConfig;
struct wmOperator;
+/* Reproject stroke modes. */
+typedef enum eGP_ReprojectModes {
+ /* Axis */
+ GP_REPROJECT_FRONT = 0,
+ GP_REPROJECT_SIDE,
+ GP_REPROJECT_TOP,
+ /* On same plane, parallel to view-plane. */
+ GP_REPROJECT_VIEW,
+ /* Reprojected on to the scene geometry */
+ GP_REPROJECT_SURFACE,
+ /* Reprojected on 3D cursor orientation */
+ GP_REPROJECT_CURSOR,
+ /* Keep equals (used in some operators) */
+ GP_REPROJECT_KEEP,
+} eGP_ReprojectModes;
+
/* ------------- Grease-Pencil Runtime Data ---------------- */
/* Temporary 'Stroke Point' data (2D / screen-space)
@@ -246,6 +262,15 @@ void ED_gpencil_project_stroke_to_view(struct bContext *C,
struct bGPDlayer *gpl,
struct bGPDstroke *gps);
+void ED_gpencil_stroke_reproject(struct Depsgraph *depsgraph,
+ const struct GP_SpaceConversion *gsc,
+ struct SnapObjectContext *sctx,
+ struct bGPDlayer *gpl,
+ struct bGPDframe *gpf,
+ struct bGPDstroke *gps,
+ const eGP_ReprojectModes mode,
+ const bool keep_original);
+
/* set sculpt cursor */
void ED_gpencil_toggle_brush_cursor(struct bContext *C, bool enable, void *customdata);