Blender
V2.93
source
blender
makesdna
DNA_key_types.h
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*
16
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17
* All rights reserved.
18
*/
19
#pragma once
20
29
#include "
DNA_ID.h
"
30
#include "
DNA_defs.h
"
31
#include "
DNA_listBase.h
"
32
33
#ifdef __cplusplus
34
extern
"C"
{
35
#endif
36
37
struct
AnimData
;
38
struct
Ipo
;
39
40
typedef
struct
KeyBlock
{
41
struct
KeyBlock
*
next
, *
prev
;
42
48
float
pos
;
50
float
curval
;
51
53
short
type
;
54
char
_pad1
[2];
55
57
short
relative
;
58
short
flag
;
59
61
int
totelem
;
63
int
uid
;
64
66
void
*
data
;
68
char
name
[64];
70
char
vgroup
[64];
71
73
float
slidermin
;
74
float
slidermax
;
75
76
}
KeyBlock
;
77
78
typedef
struct
Key
{
79
ID
id
;
81
struct
AnimData
*
adt
;
82
88
KeyBlock
*
refkey
;
89
94
char
elemstr
[32];
96
int
elemsize
;
97
char
_pad
[4];
98
100
ListBase
block
;
102
struct
Ipo
*ipo
DNA_DEPRECATED
;
103
104
ID
*
from
;
105
107
int
totkey
;
108
short
flag
;
110
char
type
;
111
char
_pad2
;
112
115
float
ctime
;
116
121
int
uidgen
;
122
}
Key
;
123
124
/* **************** KEY ********************* */
125
126
/* Key->type: KeyBlocks are interpreted as... */
127
enum
{
128
/* Sequential positions over time (using KeyBlock->pos and Key->ctime) */
129
KEY_NORMAL
= 0,
130
131
/* States to blend between (default) */
132
KEY_RELATIVE
= 1,
133
};
134
135
/* Key->flag */
136
enum
{
137
KEY_DS_EXPAND
= 1,
138
};
139
140
/* KeyBlock->type */
141
enum
{
142
KEY_LINEAR
= 0,
143
KEY_CARDINAL
= 1,
144
KEY_BSPLINE
= 2,
145
KEY_CATMULL_ROM
= 3,
146
};
147
148
/* KeyBlock->flag */
149
enum
{
150
KEYBLOCK_MUTE
= (1 << 0),
151
KEYBLOCK_SEL
= (1 << 1),
152
KEYBLOCK_LOCKED
= (1 << 2),
153
};
154
155
#define KEYELEM_FLOAT_LEN_COORD 3
156
157
/* Curve key data layout constants */
158
#define KEYELEM_ELEM_SIZE_CURVE 3
159
160
#define KEYELEM_ELEM_LEN_BPOINT 2
161
#define KEYELEM_FLOAT_LEN_BPOINT (KEYELEM_ELEM_LEN_BPOINT * KEYELEM_ELEM_SIZE_CURVE)
162
163
#define KEYELEM_ELEM_LEN_BEZTRIPLE 4
164
#define KEYELEM_FLOAT_LEN_BEZTRIPLE (KEYELEM_ELEM_LEN_BEZTRIPLE * KEYELEM_ELEM_SIZE_CURVE)
165
166
#ifdef __cplusplus
167
}
168
#endif
DNA_ID.h
ID and Library types, which are fundamental for sdna.
DNA_defs.h
KeyBlock
struct KeyBlock KeyBlock
Key
struct Key Key
Definition:
NOD_static_types.h:187
KEY_DS_EXPAND
@ KEY_DS_EXPAND
Definition:
DNA_key_types.h:137
KEY_LINEAR
@ KEY_LINEAR
Definition:
DNA_key_types.h:142
KEY_CARDINAL
@ KEY_CARDINAL
Definition:
DNA_key_types.h:143
KEY_BSPLINE
@ KEY_BSPLINE
Definition:
DNA_key_types.h:144
KEY_CATMULL_ROM
@ KEY_CATMULL_ROM
Definition:
DNA_key_types.h:145
KEY_RELATIVE
@ KEY_RELATIVE
Definition:
DNA_key_types.h:132
KEY_NORMAL
@ KEY_NORMAL
Definition:
DNA_key_types.h:129
KEYBLOCK_SEL
@ KEYBLOCK_SEL
Definition:
DNA_key_types.h:151
KEYBLOCK_MUTE
@ KEYBLOCK_MUTE
Definition:
DNA_key_types.h:150
KEYBLOCK_LOCKED
@ KEYBLOCK_LOCKED
Definition:
DNA_key_types.h:152
DNA_listBase.h
These structs are the foundation for all linked lists in the library system.
AnimData
Definition:
DNA_anim_types.h:1083
ID
Definition:
DNA_ID.h:273
Ipo
Definition:
DNA_ipo_types.h:99
KeyBlock
Definition:
DNA_key_types.h:40
KeyBlock::uid
int uid
Definition:
DNA_key_types.h:63
KeyBlock::prev
struct KeyBlock * prev
Definition:
DNA_key_types.h:41
KeyBlock::flag
short flag
Definition:
DNA_key_types.h:58
KeyBlock::name
char name[64]
Definition:
DNA_key_types.h:68
KeyBlock::totelem
int totelem
Definition:
DNA_key_types.h:61
KeyBlock::pos
float pos
Definition:
DNA_key_types.h:48
KeyBlock::slidermax
float slidermax
Definition:
DNA_key_types.h:74
KeyBlock::slidermin
float slidermin
Definition:
DNA_key_types.h:73
KeyBlock::curval
float curval
Definition:
DNA_key_types.h:50
KeyBlock::next
struct KeyBlock * next
Definition:
DNA_key_types.h:41
KeyBlock::vgroup
char vgroup[64]
Definition:
DNA_key_types.h:70
KeyBlock::relative
short relative
Definition:
DNA_key_types.h:57
KeyBlock::type
short type
Definition:
DNA_key_types.h:53
KeyBlock::_pad1
char _pad1[2]
Definition:
DNA_key_types.h:54
KeyBlock::data
void * data
Definition:
DNA_key_types.h:66
Key
Definition:
DNA_key_types.h:78
Key::from
ID * from
Definition:
DNA_key_types.h:104
Key::totkey
int totkey
Definition:
DNA_key_types.h:107
Key::ctime
float ctime
Definition:
DNA_key_types.h:115
Key::_pad2
char _pad2
Definition:
DNA_key_types.h:111
Key::DNA_DEPRECATED
struct Ipo *ipo DNA_DEPRECATED
Definition:
DNA_key_types.h:102
Key::flag
short flag
Definition:
DNA_key_types.h:108
Key::elemstr
char elemstr[32]
Definition:
DNA_key_types.h:94
Key::id
ID id
Definition:
DNA_key_types.h:79
Key::uidgen
int uidgen
Definition:
DNA_key_types.h:121
Key::elemsize
int elemsize
Definition:
DNA_key_types.h:96
Key::adt
struct AnimData * adt
Definition:
DNA_key_types.h:81
Key::type
char type
Definition:
DNA_key_types.h:110
Key::block
ListBase block
Definition:
DNA_key_types.h:100
Key::refkey
KeyBlock * refkey
Definition:
DNA_key_types.h:88
Key::_pad
char _pad[4]
Definition:
DNA_key_types.h:97
ListBase
Definition:
DNA_listBase.h:46
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1