Blender V4.3
DNA_key_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4#pragma once
5
14#include "DNA_ID.h"
15#include "DNA_defs.h"
16#include "DNA_listBase.h"
17
18struct AnimData;
19struct Ipo;
20
21typedef struct KeyBlock {
22 struct KeyBlock *next, *prev;
23
29 float pos;
31 float curval;
32
34 short type;
35 char _pad1[2];
36
38 short relative;
39 short flag;
40
44 int uid;
45
47 void *data;
49 char name[64];
51 char vgroup[64];
52
54 float slidermin;
55 float slidermax;
56
58
59typedef struct Key {
62 struct AnimData *adt;
63
70
75 char elemstr[32];
78 char _pad[4];
79
83 struct Ipo *ipo DNA_DEPRECATED;
84
86
88 int totkey;
89 short flag;
91 char type;
92 char _pad2;
93
96 float ctime;
97
104
105/* **************** KEY ********************* */
106
107/* Key->type: KeyBlocks are interpreted as... */
108enum {
109 /* Sequential positions over time (using KeyBlock->pos and Key->ctime) */
111
112 /* States to blend between (default) */
114};
115
116/* Key->flag */
117enum {
119};
120
121/* KeyBlock->type */
122enum {
127};
128
129/* KeyBlock->flag */
130enum {
131 KEYBLOCK_MUTE = (1 << 0),
132 KEYBLOCK_SEL = (1 << 1),
133 KEYBLOCK_LOCKED = (1 << 2),
135};
136
137#define KEYELEM_FLOAT_LEN_COORD 3
138
139/* Curve key data layout constants */
140#define KEYELEM_ELEM_SIZE_CURVE 3
141
142#define KEYELEM_ELEM_LEN_BPOINT 2
143#define KEYELEM_FLOAT_LEN_BPOINT (KEYELEM_ELEM_LEN_BPOINT * KEYELEM_ELEM_SIZE_CURVE)
144
145#define KEYELEM_ELEM_LEN_BEZTRIPLE 4
146#define KEYELEM_FLOAT_LEN_BEZTRIPLE (KEYELEM_ELEM_LEN_BEZTRIPLE * KEYELEM_ELEM_SIZE_CURVE)
ID and Library types, which are fundamental for SDNA.
@ KEY_RELATIVE
@ KEY_NORMAL
struct KeyBlock KeyBlock
@ KEYBLOCK_LOCKED_SHAPE
@ KEYBLOCK_SEL
@ KEYBLOCK_MUTE
@ KEYBLOCK_LOCKED
@ KEY_LINEAR
@ KEY_CARDINAL
@ KEY_BSPLINE
@ KEY_CATMULL_ROM
struct Key Key
@ KEY_DS_EXPAND
These structs are the foundation for all linked lists in the library system.
Definition DNA_ID.h:413
struct KeyBlock * prev
float slidermax
float slidermin
float curval
struct KeyBlock * next
char vgroup[64]
short relative
char _pad1[2]
void * data
ID * from
int totkey
float ctime
char _pad2
struct Ipo *ipo DNA_DEPRECATED
short flag
char elemstr[32]
int uidgen
int elemsize
struct AnimData * adt
char type
ListBase block
KeyBlock * refkey
char _pad[4]