Blender V5.0
DNA_meta_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 "DNA_ID.h"
12#include "DNA_defs.h"
13#include "DNA_listBase.h"
14
15struct AnimData;
16struct BoundBox;
17struct Material;
18
19typedef struct MetaElem {
20 struct MetaElem *next, *prev;
21
23 struct BoundBox *bb;
24
25 short type, flag;
26 char _pad[4];
28 float x, y, z;
30 float quat[4];
32 float expx;
33 float expy;
34 float expz;
36 float rad;
38 float rad2;
40 float s;
42 float len;
43
45 float *mat, *imat;
47
48typedef struct MetaBall {
49#ifdef __cplusplus
51 static constexpr ID_Type id_type = ID_MB;
52#endif
53
55 struct AnimData *adt;
56
60
61 /* material of the mother ball will define the material used of all others */
62 struct Material **mat;
63
65 char flag, flag2;
66 short totcol;
69 char _pad[2];
70
76
78 float texspace_size[3];
79
82
83 /* bias elements to have an offset volume.
84 * mother ball changes will effect other objects thresholds,
85 * but these may also have their own thresh as an offset */
86 float thresh;
87
88 char _pad0[4];
89
92
94
95/* **************** METABALL ********************* */
96
98enum {
100};
101
103enum {
108};
109
111enum {
112 MB_DS_EXPAND = 1 << 0,
113};
114
116enum {
118 MB_TUBEX = 1, /* Deprecated. */
119 MB_TUBEY = 2, /* Deprecated. */
120 MB_TUBEZ = 3, /* Deprecated. */
125};
126
127#define MB_TYPE_SIZE_SQUARED(type) ((type) == MB_ELIPSOID)
128
130enum {
131 MB_NEGATIVE = 1 << 1,
132 MB_HIDE = 1 << 3,
133 MB_SCALE_RAD = 1 << 4,
134};
ID and Library types, which are fundamental for SDNA.
ID_Type
@ ID_MB
These structs are the foundation for all linked lists in the library system.
@ MB_DS_EXPAND
@ MB_TEXSPACE_FLAG_AUTO
@ MB_SCALE_RAD
@ MB_NEGATIVE
@ MB_HIDE
@ MB_TUBEY
@ MB_PLANE
@ MB_ELIPSOID
@ MB_TUBE
@ MB_TUBEX
@ MB_CUBE
@ MB_TUBEZ
@ MB_BALL
@ MB_UPDATE_ALWAYS
@ MB_UPDATE_FAST
@ MB_UPDATE_NEVER
@ MB_UPDATE_HALFRES
Definition DNA_ID.h:414
MetaElem * lastelem
char _pad[2]
char texspace_flag
ListBase elems
float rendersize
char _pad0[4]
float texspace_size[3]
float wiresize
struct AnimData * adt
float texspace_location[3]
ListBase * editelems
char needs_flush_to_id
struct Material ** mat
float * imat
char _pad[4]
struct MetaElem * next
float quat[4]
struct BoundBox * bb
float * mat
struct MetaElem * prev