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:
authorFalk David <falkdavid@gmx.de>2020-11-13 23:43:00 +0300
committerFalk David <falkdavid@gmx.de>2020-11-13 23:43:00 +0300
commit0be88c7d15d2ad1af284c6283370173647ae74eb (patch)
tree5fff573c512e284547ebe0c921ecffdae2c377c4 /source/blender/makesdna/DNA_curve_types.h
parent9d28353b525ecfbcca1501be72e4276dfb2bbc2a (diff)
GPencil: Merge GSoC curve edit mode
Differential Revision: https://developer.blender.org/D8660 This patch is the result of the GSoC 2020 "Editing Grease Pencil Strokes Using Curves" project. It adds a submode to greasepencil edit mode that allows for the transformation of greasepencil strokes using bezier curves. More information about the project can be found here: https://wiki.blender.org/wiki/User:Filedescriptor/GSoC_2020.
Diffstat (limited to 'source/blender/makesdna/DNA_curve_types.h')
-rw-r--r--source/blender/makesdna/DNA_curve_types.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 2f362034b78..4eca81c27cc 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -519,6 +519,10 @@ typedef enum eBezTriple_KeyframeType {
(bezt)->f2 & SELECT : \
BEZT_ISSEL_ANY(bezt))
+#define BEZT_ISSEL_IDX(bezt, i) \
+ ((i == 0 && (bezt)->f1 & SELECT) || (i == 1 && (bezt)->f2 & SELECT) || \
+ (i == 2 && (bezt)->f3 & SELECT))
+
#define BEZT_SEL_ALL(bezt) \
{ \
(bezt)->f1 |= SELECT; \
@@ -533,6 +537,49 @@ typedef enum eBezTriple_KeyframeType {
(bezt)->f3 &= ~SELECT; \
} \
((void)0)
+#define BEZT_SEL_INVERT(bezt) \
+ { \
+ (bezt)->f1 ^= SELECT; \
+ (bezt)->f2 ^= SELECT; \
+ (bezt)->f3 ^= SELECT; \
+ } \
+ ((void)0)
+
+#define BEZT_SEL_IDX(bezt, i) \
+ { \
+ switch (i) { \
+ case 0: \
+ (bezt)->f1 |= SELECT; \
+ break; \
+ case 1: \
+ (bezt)->f2 |= SELECT; \
+ break; \
+ case 2: \
+ (bezt)->f3 |= SELECT; \
+ break; \
+ default: \
+ break; \
+ } \
+ } \
+ ((void)0)
+
+#define BEZT_DESEL_IDX(bezt, i) \
+ { \
+ switch (i) { \
+ case 0: \
+ (bezt)->f1 &= ~SELECT; \
+ break; \
+ case 1: \
+ (bezt)->f2 &= ~SELECT; \
+ break; \
+ case 2: \
+ (bezt)->f3 &= ~SELECT; \
+ break; \
+ default: \
+ break; \
+ } \
+ } \
+ ((void)0)
#define BEZT_IS_AUTOH(bezt) \
(ELEM((bezt)->h1, HD_AUTO, HD_AUTO_ANIM) && ELEM((bezt)->h2, HD_AUTO, HD_AUTO_ANIM))