Blender V5.3
DNA_curves_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "DNA_ID.h"
12#include "DNA_attribute_types.h"
14#include "DNA_listBase.h"
15
16#include "BLI_enum_flags.hh"
17
18namespace blender {
19
20namespace bke {
21class CurvesGeometry;
23} // namespace bke
24
25namespace draw {
26struct CurvesBatchCache;
27}
28
59/* The number of supported curve types. */
60#define CURVE_TYPES_NUM 4
61
72#define BEZIER_HANDLES_NUM 4
73
82
95
97enum eCurves_Flag : int {
98 HA_DS_EXPAND = (1 << 0),
100};
102
103
110
111
135 int *curve_offsets = nullptr;
136
139
144
147
151 int point_num = 0;
155 int curve_num = 0;
156
160 ListBaseT<struct bDeformGroup> vertex_group_names = {nullptr, nullptr};
163
166
171
178 float *custom_knots = nullptr;
179
181
182 char _pad[4] = {};
183
184#ifdef __cplusplus
186 const bke::CurvesGeometry &wrap() const;
187#endif
188};
189
195struct Curves {
196#ifdef __cplusplus
198 static constexpr ID_Type id_type = ID_CV;
199#endif
200
203 struct AnimData *adt = nullptr;
204
207
210
211 /* Materials. */
212 struct Material **mat = nullptr;
213 short totcol = 0;
214
225 char _pad[4] = {};
226
234 struct Object *surface = nullptr;
235
241 char *surface_uv_map = nullptr;
242
243 /* Distance to keep the curves away from the surface. */
245 char _pad2[4] = {};
246
247 /* Draw cache to store data used for viewport drawing. */
249};
250
251/* Only one material supported currently. */
252#define CURVES_MATERIAL_NR 1
253
254} // namespace blender
#define ENUM_OPERATORS(_enum_type)
ID and Library types, which are fundamental for SDNA.
These structs are the foundation for all linked lists in the library system.
BLI_INLINE Texture * wrap(MTLTexture *texture)
BMesh Iterators.
@ NURBS_KNOT_MODE_ENDPOINT_BEZIER
@ NURBS_KNOT_MODE_BEZIER
@ NURBS_KNOT_MODE_ENDPOINT
@ NURBS_KNOT_MODE_NORMAL
@ NURBS_KNOT_MODE_CUSTOM
@ CV_SCULPT_COLLISION_ENABLED
@ CURVE_TYPE_CATMULL_ROM
@ NORMAL_MODE_MINIMUM_TWIST
signed char int8_t
Definition BKE_text.h:76
bke::CurvesGeometryRuntime * runtime
struct AttributeStorage attribute_storage
ListBaseT< struct bDeformGroup > vertex_group_names
draw::CurvesBatchCache * batch_cache
eCurvesSymmetryType symmetry
CurvesGeometry geometry
struct Object * surface
struct AnimData * adt
struct Material ** mat