Blender
V4.5
source
blender
makesdna
DNA_curve_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
9
#pragma once
10
11
#include "
DNA_ID.h
"
12
#include "
DNA_curve_enums.h
"
13
#include "
DNA_defs.h
"
14
#include "
DNA_listBase.h
"
15
#include "
DNA_vec_types.h
"
16
17
#ifdef __cplusplus
18
# include <optional>
19
#endif
20
21
struct
AnimData
;
22
struct
Curves
;
23
struct
CurveProfile
;
24
struct
EditFont
;
25
struct
GHash
;
26
struct
Ipo
;
27
struct
Key
;
28
struct
Material
;
29
struct
Object
;
30
struct
VFont
;
31
32
/* These two Lines with # tell `makesdna` this struct can be excluded. */
33
#
34
#
35
typedef
struct
BevPoint
{
36
float
vec
[3],
tilt
,
radius
,
weight
,
offset
;
38
float
sina
,
cosa
;
40
float
dir
[3],
tan
[3],
quat
[4];
41
short
dupe_tag
;
42
}
BevPoint
;
43
44
/* These two Lines with # tell `makesdna` this struct can be excluded. */
45
#
46
#
47
typedef
struct
BevList
{
48
struct
BevList
*
next
, *
prev
;
49
int
nr
,
dupe_nr
;
51
int
poly
;
52
int
hole
;
53
int
charidx
;
54
int
*
segbevcount
;
55
float
*
seglen
;
56
BevPoint
*
bevpoints
;
57
}
BevList
;
58
76
typedef
struct
BezTriple
{
77
float
vec
[3][3];
79
float
tilt
;
81
float
weight
;
83
float
radius
;
84
86
char
ipo
;
87
89
uint8_t
h1
,
h2
;
91
uint8_t
f1
,
f2
,
f3
;
92
98
char
hide
;
99
101
char
easing
;
103
float
back
;
105
float
amplitude
,
period
;
106
108
char
auto_handle_type
;
109
char
_pad
[3];
110
}
BezTriple
;
111
116
#define BEZKEYTYPE(bezt) (eBezTriple_KeyframeType((bezt)->hide))
117
#define BEZKEYTYPE_LVALUE(bezt) ((bezt)->hide)
118
122
typedef
struct
BPoint
{
123
float
vec
[4];
125
float
tilt
;
127
float
weight
;
129
uint8_t
f1
;
130
char
_pad1
[1];
131
short
hide
;
133
float
radius
;
134
char
_pad
[4];
135
}
BPoint
;
136
141
typedef
struct
Nurb
{
142
DNA_DEFINE_CXX_METHODS
(
Nurb
)
143
144
145
struct
Nurb
*
next
, *
prev
;
146
short
type
;
148
short
mat_nr
;
149
short
hide
,
flag
;
151
int
pntsu
,
pntsv
;
152
char
_pad
[4];
154
short
resolu
,
resolv
;
155
short
orderu
,
orderv
;
156
short
flagu
,
flagv
;
157
158
float
*
knotsu
, *
knotsv
;
159
BPoint
*
bp
;
160
BezTriple
*
bezt
;
161
163
short
tilt_interp
;
164
short
radius_interp
;
165
166
/* only used for dynamically generated Nurbs created from OB_FONT's */
167
int
charidx
;
168
}
Nurb
;
169
170
typedef
struct
CharInfo
{
171
float
kern
;
172
short
mat_nr
;
173
char
flag
;
174
char
_pad
[1];
175
}
CharInfo
;
176
177
typedef
struct
TextBox
{
178
float
x
,
y
,
w
,
h
;
179
}
TextBox
;
180
181
/* These two Lines with # tell `makesdna` this struct can be excluded. */
182
#
183
#
184
typedef
struct
EditNurb
{
185
DNA_DEFINE_CXX_METHODS
(
EditNurb
)
186
187
/* base of nurbs' list (old Curve->editnurb) */
188
ListBase
nurbs;
189
190
/* index data for shape keys */
191
struct
GHash
*keyindex;
192
193
/* shape key being edited */
194
int
shapenr;
195
200
char
needs_flush_to_id;
201
202
}
EditNurb
;
203
204
typedef
struct
Curve
{
205
#ifdef __cplusplus
206
DNA_DEFINE_CXX_METHODS
(
Curve
)
208
static
constexpr
ID_Type
id_type =
ID_CU_LEGACY
;
209
#endif
210
211
ID
id
;
213
struct
AnimData
*
adt
;
214
216
ListBase
nurb
;
217
219
EditNurb
*
editnurb
;
220
221
struct
Object
*
bevobj
, *taperobj, *textoncurve;
223
struct
Ipo
*ipo
DNA_DEPRECATED
;
224
struct
Key
*
key
;
225
struct
Material
**
mat
;
226
227
struct
CurveProfile
*
bevel_profile
;
228
229
float
texspace_location[3];
230
float
texspace_size[3];
231
239
short
ob_type
;
240
241
char
texspace_flag
;
242
char
_pad0[7];
243
short
twist_mode
;
244
float
twist_smooth,
smallcaps_scale
;
245
246
int
pathlen
;
247
short
bevresol
, totcol;
248
int
flag
;
249
float
offset, extrude,
bevel_radius
;
250
251
/* default */
252
short
resolu
, resolv;
253
short
resolu_ren
, resolv_ren;
254
255
/* edit, index in nurb list */
256
int
actnu
;
257
/* edit, index in active nurb (BPoint or BezTriple) */
258
int
actvert
;
259
260
char
overflow
;
261
char
spacemode,
align_y
;
262
char
bevel_mode
;
267
char
taper_radius_mode
;
268
char
_pad[3];
269
270
/* font part */
271
float
spacing, linedist, shear,
fsize
, wordspace, ulpos, ulheight;
272
float
xof
, yof;
273
float
linewidth
;
274
275
/* copy of EditFont vars (wchar_t aligned),
276
* warning! don't use in editmode (storage only) */
277
int
pos
;
278
int
selstart,
selend
;
279
280
/* text data */
285
int
len_char32
;
287
int
len
;
288
char
*
str
;
289
struct
EditFont
*
editfont
;
290
291
char
family[64];
292
struct
VFont
*
vfont
;
293
struct
VFont
*
vfontb
;
294
struct
VFont
*
vfonti
;
295
struct
VFont
*
vfontbi
;
296
297
struct
TextBox
*
tb
;
298
int
totbox,
actbox
;
299
300
struct
CharInfo
*
strinfo
;
301
struct
CharInfo
curinfo;
302
/* font part end */
303
305
float
ctime
;
306
float
bevfac1
, bevfac2;
307
char
bevfac1_mapping
, bevfac2_mapping;
308
309
char
_pad2[1];
310
316
char
edit_data_from_original
;
317
325
const
struct
Curves
*
curve_eval
;
326
327
void
*
batch_cache
;
328
329
#ifdef __cplusplus
331
std::optional<int> material_index_max()
const
;
332
#endif
333
}
Curve
;
334
335
/* **************** CURVE ********************* */
336
337
/* checks if the given BezTriple is selected */
338
#define BEZT_ISSEL_ANY(bezt) \
339
(((bezt)->f2 & SELECT) || ((bezt)->f1 & SELECT) || ((bezt)->f3 & SELECT))
340
#define BEZT_ISSEL_ALL(bezt) \
341
(((bezt)->f2 & SELECT) && ((bezt)->f1 & SELECT) && ((bezt)->f3 & SELECT))
342
#define BEZT_ISSEL_ALL_HIDDENHANDLES(v3d, bezt) \
343
((((v3d) != NULL) && ((v3d)->overlay.handle_display == CURVE_HANDLE_NONE)) ? \
344
(bezt)->f2 & SELECT : \
345
BEZT_ISSEL_ALL(bezt))
346
#define BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, bezt) \
347
((((v3d) != NULL) && ((v3d)->overlay.handle_display == CURVE_HANDLE_NONE)) ? \
348
(bezt)->f2 & SELECT : \
349
BEZT_ISSEL_ANY(bezt))
350
351
#define BEZT_ISSEL_IDX(bezt, i) \
352
((i == 0 && (bezt)->f1 & SELECT) || (i == 1 && (bezt)->f2 & SELECT) || \
353
(i == 2 && (bezt)->f3 & SELECT))
354
355
#define BEZT_SEL_ALL(bezt) \
356
{ \
357
(bezt)->f1 |= SELECT; \
358
(bezt)->f2 |= SELECT; \
359
(bezt)->f3 |= SELECT; \
360
} \
361
((void)0)
362
#define BEZT_DESEL_ALL(bezt) \
363
{ \
364
(bezt)->f1 &= ~SELECT; \
365
(bezt)->f2 &= ~SELECT; \
366
(bezt)->f3 &= ~SELECT; \
367
} \
368
((void)0)
369
#define BEZT_SEL_INVERT(bezt) \
370
{ \
371
(bezt)->f1 ^= SELECT; \
372
(bezt)->f2 ^= SELECT; \
373
(bezt)->f3 ^= SELECT; \
374
} \
375
((void)0)
376
377
#define BEZT_SEL_IDX(bezt, i) \
378
{ \
379
switch (i) { \
380
case 0: \
381
(bezt)->f1 |= SELECT; \
382
break; \
383
case 1: \
384
(bezt)->f2 |= SELECT; \
385
break; \
386
case 2: \
387
(bezt)->f3 |= SELECT; \
388
break; \
389
default: \
390
break; \
391
} \
392
} \
393
((void)0)
394
395
#define BEZT_DESEL_IDX(bezt, i) \
396
{ \
397
switch (i) { \
398
case 0: \
399
(bezt)->f1 &= ~SELECT; \
400
break; \
401
case 1: \
402
(bezt)->f2 &= ~SELECT; \
403
break; \
404
case 2: \
405
(bezt)->f3 &= ~SELECT; \
406
break; \
407
default: \
408
break; \
409
} \
410
} \
411
((void)0)
412
413
#define BEZT_IS_AUTOH(bezt) \
414
(ELEM((bezt)->h1, HD_AUTO, HD_AUTO_ANIM) && ELEM((bezt)->h2, HD_AUTO, HD_AUTO_ANIM))
x
x
Definition
BLI_expr_pylike_eval_test.cc:345
DNA_ID.h
ID and Library types, which are fundamental for SDNA.
ID_Type
ID_Type
Definition
DNA_ID_enums.h:122
ID_CU_LEGACY
@ ID_CU_LEGACY
Definition
DNA_ID_enums.h:127
DNA_curve_enums.h
BevList
struct BevList BevList
CharInfo
struct CharInfo CharInfo
Curve
struct Curve Curve
Definition
CurveAdvancedIterators.h:71
BevPoint
struct BevPoint BevPoint
BPoint
struct BPoint BPoint
TextBox
struct TextBox TextBox
BezTriple
struct BezTriple BezTriple
DNA_defs.h
DNA_DEFINE_CXX_METHODS
#define DNA_DEFINE_CXX_METHODS(class_name)
Definition
DNA_defs.h:66
DNA_listBase.h
These structs are the foundation for all linked lists in the library system.
DNA_vec_types.h
w
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition
btQuadWord.h:119
y
y
Definition
compositor_morphological_blur_info.hh:22
typedef
#define typedef
Definition
gpu_glsl_cpp_stubs.hh:1040
uint8_t
unsigned char uint8_t
Definition
stdint.h:78
AnimData
Definition
DNA_anim_types.h:651
BPoint
Definition
DNA_curve_types.h:122
BPoint::hide
short hide
Definition
DNA_curve_types.h:131
BPoint::_pad1
char _pad1[1]
Definition
DNA_curve_types.h:130
BPoint::_pad
char _pad[4]
Definition
DNA_curve_types.h:134
BPoint::weight
float weight
Definition
DNA_curve_types.h:127
BPoint::f1
uint8_t f1
Definition
DNA_curve_types.h:129
BPoint::vec
float vec[4]
Definition
DNA_curve_types.h:123
BPoint::radius
float radius
Definition
DNA_curve_types.h:133
BPoint::tilt
float tilt
Definition
DNA_curve_types.h:125
BevList
Definition
DNA_curve_types.h:47
BevList::hole
int hole
Definition
DNA_curve_types.h:52
BevList::charidx
int charidx
Definition
DNA_curve_types.h:53
BevList::next
struct BevList * next
Definition
DNA_curve_types.h:48
BevList::seglen
float * seglen
Definition
DNA_curve_types.h:55
BevList::dupe_nr
int dupe_nr
Definition
DNA_curve_types.h:49
BevList::bevpoints
BevPoint * bevpoints
Definition
DNA_curve_types.h:56
BevList::segbevcount
int * segbevcount
Definition
DNA_curve_types.h:54
BevList::nr
int nr
Definition
DNA_curve_types.h:49
BevList::prev
struct BevList * prev
Definition
DNA_curve_types.h:48
BevList::poly
int poly
Definition
DNA_curve_types.h:51
BevPoint
Definition
DNA_curve_types.h:35
BevPoint::dupe_tag
short dupe_tag
Definition
DNA_curve_types.h:41
BevPoint::offset
float offset
Definition
DNA_curve_types.h:36
BevPoint::radius
float radius
Definition
DNA_curve_types.h:36
BevPoint::dir
float dir[3]
Definition
DNA_curve_types.h:40
BevPoint::sina
float sina
Definition
DNA_curve_types.h:38
BevPoint::tilt
float tilt
Definition
DNA_curve_types.h:36
BevPoint::tan
float tan[3]
Definition
DNA_curve_types.h:40
BevPoint::quat
float quat[4]
Definition
DNA_curve_types.h:40
BevPoint::weight
float weight
Definition
DNA_curve_types.h:36
BevPoint::cosa
float cosa
Definition
DNA_curve_types.h:38
BevPoint::vec
float vec[3]
Definition
DNA_curve_types.h:36
BezTriple
Definition
DNA_curve_types.h:76
BezTriple::auto_handle_type
char auto_handle_type
Definition
DNA_curve_types.h:108
BezTriple::ipo
char ipo
Definition
DNA_curve_types.h:86
BezTriple::back
float back
Definition
DNA_curve_types.h:103
BezTriple::h1
uint8_t h1
Definition
DNA_curve_types.h:89
BezTriple::tilt
float tilt
Definition
DNA_curve_types.h:79
BezTriple::f3
uint8_t f3
Definition
DNA_curve_types.h:91
BezTriple::vec
float vec[3][3]
Definition
DNA_curve_types.h:77
BezTriple::amplitude
float amplitude
Definition
DNA_curve_types.h:105
BezTriple::f1
uint8_t f1
Definition
DNA_curve_types.h:91
BezTriple::hide
char hide
Definition
DNA_curve_types.h:98
BezTriple::radius
float radius
Definition
DNA_curve_types.h:83
BezTriple::_pad
char _pad[3]
Definition
DNA_curve_types.h:109
BezTriple::easing
char easing
Definition
DNA_curve_types.h:101
BezTriple::weight
float weight
Definition
DNA_curve_types.h:81
BezTriple::f2
uint8_t f2
Definition
DNA_curve_types.h:91
BezTriple::period
float period
Definition
DNA_curve_types.h:105
BezTriple::h2
uint8_t h2
Definition
DNA_curve_types.h:89
CharInfo
Definition
DNA_curve_types.h:170
CharInfo::mat_nr
short mat_nr
Definition
DNA_curve_types.h:172
CharInfo::kern
float kern
Definition
DNA_curve_types.h:171
CharInfo::flag
char flag
Definition
DNA_curve_types.h:173
CurveProfile
Definition
DNA_curveprofile_types.h:42
Curve
Definition
DNA_curve_types.h:204
Curve::bevobj
struct Object * bevobj
Definition
DNA_curve_types.h:221
Curve::edit_data_from_original
char edit_data_from_original
Definition
DNA_curve_types.h:316
Curve::pathlen
int pathlen
Definition
DNA_curve_types.h:246
Curve::overflow
char overflow
Definition
DNA_curve_types.h:260
Curve::bevel_profile
struct CurveProfile * bevel_profile
Definition
DNA_curve_types.h:227
Curve::mat
struct Material ** mat
Definition
DNA_curve_types.h:225
Curve::vfont
struct VFont * vfont
Definition
DNA_curve_types.h:292
Curve::xof
float xof
Definition
DNA_curve_types.h:272
Curve::len_char32
int len_char32
Definition
DNA_curve_types.h:285
Curve::align_y
char align_y
Definition
DNA_curve_types.h:261
Curve::selend
int selend
Definition
DNA_curve_types.h:278
Curve::tb
struct TextBox * tb
Definition
DNA_curve_types.h:297
Curve::batch_cache
void * batch_cache
Definition
DNA_curve_types.h:327
Curve::actvert
int actvert
Definition
DNA_curve_types.h:258
Curve::len
int len
Definition
DNA_curve_types.h:287
Curve::DNA_DEPRECATED
struct Ipo *ipo DNA_DEPRECATED
Definition
DNA_curve_types.h:223
Curve::adt
struct AnimData * adt
Definition
DNA_curve_types.h:213
Curve::flag
int flag
Definition
DNA_curve_types.h:248
Curve::actbox
int actbox
Definition
DNA_curve_types.h:298
Curve::curve_eval
const struct Curves * curve_eval
Definition
DNA_curve_types.h:325
Curve::editfont
struct EditFont * editfont
Definition
DNA_curve_types.h:289
Curve::actnu
int actnu
Definition
DNA_curve_types.h:256
Curve::bevresol
short bevresol
Definition
DNA_curve_types.h:247
Curve::resolu
short resolu
Definition
DNA_curve_types.h:252
Curve::bevfac1
float bevfac1
Definition
DNA_curve_types.h:306
Curve::texspace_flag
char texspace_flag
Definition
DNA_curve_types.h:241
Curve::twist_mode
short twist_mode
Definition
DNA_curve_types.h:243
Curve::id
ID id
Definition
DNA_curve_types.h:211
Curve::pos
int pos
Definition
DNA_curve_types.h:277
Curve::bevel_radius
float bevel_radius
Definition
DNA_curve_types.h:249
Curve::key
struct Key * key
Definition
DNA_curve_types.h:224
Curve::strinfo
struct CharInfo * strinfo
Definition
DNA_curve_types.h:300
Curve::vfontb
struct VFont * vfontb
Definition
DNA_curve_types.h:293
Curve::linewidth
float linewidth
Definition
DNA_curve_types.h:273
Curve::bevel_mode
char bevel_mode
Definition
DNA_curve_types.h:262
Curve::str
char * str
Definition
DNA_curve_types.h:288
Curve::editnurb
EditNurb * editnurb
Definition
DNA_curve_types.h:219
Curve::vfonti
struct VFont * vfonti
Definition
DNA_curve_types.h:294
Curve::smallcaps_scale
float smallcaps_scale
Definition
DNA_curve_types.h:244
Curve::nurb
ListBase nurb
Definition
DNA_curve_types.h:216
Curve::fsize
float fsize
Definition
DNA_curve_types.h:271
Curve::vfontbi
struct VFont * vfontbi
Definition
DNA_curve_types.h:295
Curve::ctime
float ctime
Definition
DNA_curve_types.h:305
Curve::ob_type
short ob_type
Definition
DNA_curve_types.h:239
Curve::taper_radius_mode
char taper_radius_mode
Definition
DNA_curve_types.h:267
Curve::bevfac1_mapping
char bevfac1_mapping
Definition
DNA_curve_types.h:307
Curve::resolu_ren
short resolu_ren
Definition
DNA_curve_types.h:253
Curves
Definition
DNA_curves_types.h:184
EditFont
Definition
BKE_vfont.hh:38
EditNurb
Definition
DNA_curve_types.h:184
GHash
Definition
BLI_ghash.cc:80
ID
Definition
DNA_ID.h:404
Ipo
Definition
DNA_ipo_types.h:85
Key
Definition
DNA_key_types.h:65
ListBase
Definition
DNA_listBase.h:32
Material
Definition
DNA_material_types.h:164
Nurb
Definition
DNA_curve_types.h:141
Nurb::flagu
short flagu
Definition
DNA_curve_types.h:156
Nurb::orderu
short orderu
Definition
DNA_curve_types.h:155
Nurb::next
struct Nurb * next
Definition
DNA_curve_types.h:145
Nurb::orderv
short orderv
Definition
DNA_curve_types.h:155
Nurb::knotsu
float * knotsu
Definition
DNA_curve_types.h:158
Nurb::pntsu
int pntsu
Definition
DNA_curve_types.h:151
Nurb::charidx
int charidx
Definition
DNA_curve_types.h:167
Nurb::flag
short flag
Definition
DNA_curve_types.h:149
Nurb::tilt_interp
short tilt_interp
Definition
DNA_curve_types.h:163
Nurb::type
short type
Definition
DNA_curve_types.h:146
Nurb::knotsv
float * knotsv
Definition
DNA_curve_types.h:158
Nurb::bezt
BezTriple * bezt
Definition
DNA_curve_types.h:160
Nurb::bp
BPoint * bp
Definition
DNA_curve_types.h:159
Nurb::resolu
short resolu
Definition
DNA_curve_types.h:154
Nurb::prev
struct Nurb * prev
Definition
DNA_curve_types.h:145
Nurb::_pad
char _pad[4]
Definition
DNA_curve_types.h:152
Nurb::resolv
short resolv
Definition
DNA_curve_types.h:154
Nurb::radius_interp
short radius_interp
Definition
DNA_curve_types.h:164
Nurb::hide
short hide
Definition
DNA_curve_types.h:149
Nurb::pntsv
int pntsv
Definition
DNA_curve_types.h:151
Nurb::flagv
short flagv
Definition
DNA_curve_types.h:156
Nurb::mat_nr
short mat_nr
Definition
DNA_curve_types.h:148
Object
Definition
DNA_object_types.h:192
TextBox
Definition
DNA_curve_types.h:177
TextBox::h
float h
Definition
DNA_curve_types.h:178
VFont
Definition
DNA_vfont_types.h:19
Generated on Fri Apr 3 2026 06:33:18 for Blender by
doxygen
1.11.0