Blender V5.0
DNA_meshdata_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
8
9#pragma once
10
11#include "BLI_sys_types.h"
12
13/* -------------------------------------------------------------------- */
16
23typedef struct MSelect {
25 int index;
27 int type;
29
31enum {
35};
36
38
39/* -------------------------------------------------------------------- */
42
93
95
96/* -------------------------------------------------------------------- */
99
101typedef struct MFloatProperty {
102 float f;
104typedef struct MIntProperty {
105 int i;
108typedef struct MStringProperty {
109 char s[255], s_len;
111typedef struct MBoolProperty {
112 uint8_t b;
114typedef struct MInt8Property {
115 int8_t i;
117
119
120/* -------------------------------------------------------------------- */
123
127typedef struct MDeformWeight {
129 unsigned int def_nr;
131 float weight;
133
154
155typedef struct MVertSkin {
160 float radius[3];
161
163 int flag;
165
179
181
182/* -------------------------------------------------------------------- */
185
190typedef struct MLoopCol {
191 unsigned char r, g, b, a;
193
194typedef struct MPropCol {
195 float color[4];
197
199typedef struct MDisps {
200 /* Strange bug in SDNA: if disps pointer comes first, it fails to see totdisp */
202 int level;
204
211 unsigned int *hidden;
213
215typedef struct GridPaintMask {
220 float *data;
221
223 unsigned int level;
224
225 char _pad[4];
227
229
230/* -------------------------------------------------------------------- */
233
241#
242#
243typedef struct OrigSpaceFace {
244 float uv[4][2];
246
247#
248#
249typedef struct OrigSpaceLoop {
250 float uv[2];
252
254
255#ifdef DNA_DEPRECATED_ALLOW
256
257/* -------------------------------------------------------------------- */
260
261typedef struct FreestyleEdge {
262 char flag;
263} FreestyleEdge;
264
266enum {
267 FREESTYLE_EDGE_MARK = 1,
268};
269
270typedef struct FreestyleFace {
271 char flag;
272} FreestyleFace;
273
275enum {
276 FREESTYLE_FACE_MARK = 1,
277};
278
280
281/* -------------------------------------------------------------------- */
284
290typedef struct MEdge {
292 unsigned int v1, v2;
294 char crease_legacy;
298 char bweight_legacy;
299 short flag_legacy;
300} MEdge;
301
303enum {
305 // SELECT = (1 << 0),
306 ME_SEAM = (1 << 2),
308 // ME_HIDE = (1 << 4),
310 ME_LOOSEEDGE = (1 << 7),
312 ME_SHARP = (1 << 9),
313};
314
322typedef struct MPoly {
324 int loopstart;
326 int totloop;
328 short mat_nr_legacy;
329 char flag_legacy, _pad;
330} MPoly;
331
333enum {
335 ME_SMOOTH = (1 << 0),
337 ME_FACE_SEL = (1 << 1),
339 // ME_HIDE = (1 << 4),
340};
341
346typedef struct MLoopUV {
347 float uv[2];
348 int flag;
349} MLoopUV;
350
352enum {
353 MLOOPUV_EDGESEL = (1 << 0),
354 MLOOPUV_VERTSEL = (1 << 1),
355 MLOOPUV_PINNED = (1 << 2),
356};
357
361typedef struct MVert {
362 float co_legacy[3];
367 char flag_legacy;
371 char bweight_legacy;
372 char _pad[2];
373} MVert;
374
376enum {
378 // SELECT = (1 << 0),
380 ME_HIDE = (1 << 4),
381};
382
388typedef struct MLoop {
390 unsigned int v;
392 unsigned int e;
393} MLoop;
394
395#endif
396
402typedef struct MFace {
403 unsigned int v1, v2, v3, v4;
404 short mat_nr;
408
410enum {
411 ME_V1V2 = (1 << 0),
412 ME_V2V3 = (1 << 1),
413 ME_V3V1 = (1 << 2),
415 ME_V4V1 = (1 << 3),
416};
417
419typedef struct MTFace {
420 float uv[4][2];
422
428typedef struct MCol {
429 unsigned char a, r, g, b;
431
432#ifdef DNA_DEPRECATED_ALLOW
433
435typedef struct MRecast {
436 int i;
437} MRecast;
438
439#endif
440
@ MVERT_SKIN_LOOSE
@ MVERT_SKIN_ROOT
@ ME_VSEL
@ ME_FSEL
@ ME_ESEL
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
nullptr float
unsigned char r
unsigned char a
unsigned char g
unsigned char b
struct MDeformWeight * dw
unsigned int def_nr
float(* disps)[3]
unsigned int * hidden
unsigned int v2
unsigned int v1
unsigned int v4
unsigned int v3
unsigned char a
unsigned char b
unsigned char r
unsigned char g
float uv[4][2]
i
Definition text_draw.cc:230
uint8_t flag
Definition wm_window.cc:145