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:
authorCampbell Barton <campbell@blender.org>2022-09-08 05:04:36 +0300
committerCampbell Barton <campbell@blender.org>2022-09-08 05:08:20 +0300
commit17bc29253070f1707acd40c75e4a0e5c53704b24 (patch)
tree6fc27c8998e29bc1f6599bd4dc9fd3d9a3b20df1 /source/blender/makesdna
parentc2c369ebe693456b7048b3908f342f5667e0fd03 (diff)
Cleanup: remove ED_types.h & ACTIVE, DESELECT definitions
- ACTIVE flag is no longer in use. - DESELECT was used in some places as an alias for false, even though this could arguably help readability, in practice this was often passed with a selection flag leading to confusing calls such as `select_beztriple(bezt, DESELECT, SELECT, HIDDEN)`. Replace SELECT/DESELECT with true/false in these cases. - Remove ED_types.h. Add a 'SELECT' definition to DNA_anim_types.h, for fcurve_test, we could use a shared DNA header, or remove use of the define entirely in favor of typed enums.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_anim_types.h3
-rw-r--r--source/blender/makesdna/DNA_curve_types.h4
-rw-r--r--source/blender/makesdna/DNA_object_types.h8
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h7
4 files changed, 16 insertions, 6 deletions
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index e2b58cefef6..0ab14988e40 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -1160,6 +1160,9 @@ typedef struct IdAdtTemplate {
AnimData *adt;
} IdAdtTemplate;
+/* From: `DNA_object_types.h`, see it's doc-string there. */
+#define SELECT 1
+
/* ************************************************ */
#ifdef __cplusplus
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 6e18d442ee2..5862c3a6707 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -439,9 +439,9 @@ enum {
/* *************** BEZTRIPLE **************** */
-/* BezTriple.f1,2,3 */
+/** #BezTriple.f1, #BezTriple.f2, #BezTriple.f3. */
typedef enum eBezTriple_Flag {
- /* SELECT */
+ /* `SELECT = (1 << 0)` */
BEZT_FLAG_TEMP_TAG = (1 << 1), /* always clear. */
/* Can be used to ignore keyframe points for certain operations. */
BEZT_FLAG_IGNORE_TAG = (1 << 2),
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index ac9e61e03e8..add11d61db8 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -477,7 +477,13 @@ typedef struct ObHook {
/* **************** OBJECT ********************* */
-/* used many places, should be specialized. */
+/**
+ * This is used as a flag for many kinds of data that use selections, examples include:
+ * - #BezTriple.f1, #BezTriple.f2, #BezTriple.f3
+ * - #bNote.flag
+ * - #MovieTrackingTrack.flag
+ * And more, ideally this would have a generic location.
+ */
#define SELECT 1
/** #Object.type */
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index a46d737ba9d..b436b33cfb3 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -522,8 +522,6 @@ typedef struct SequencerScopes {
#define MAXSEQ 128
-#define SELECT 1
-
/** #Editor.overlay_frame_flag */
#define SEQ_EDIT_OVERLAY_FRAME_SHOW 1
#define SEQ_EDIT_OVERLAY_FRAME_ABS 2
@@ -549,9 +547,12 @@ typedef struct SequencerScopes {
#define SEQ_NAME_MAXSTR 64
+/* From: `DNA_object_types.h`, see it's doc-string there. */
+#define SELECT 1
+
/** #Sequence.flag */
enum {
- /* SELECT */
+ /* `SELECT = (1 << 0)` */
SEQ_LEFTSEL = (1 << 1),
SEQ_RIGHTSEL = (1 << 2),
SEQ_OVERLAP = (1 << 3),