Blender  V3.3
DNA_meta_types.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
8 #pragma once
9 
10 #include "DNA_ID.h"
11 #include "DNA_defs.h"
12 #include "DNA_listBase.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 struct AnimData;
19 struct BoundBox;
20 struct Ipo;
21 struct Material;
22 
23 typedef struct MetaElem {
24  struct MetaElem *next, *prev;
25 
27  struct BoundBox *bb;
28 
29  short type, flag;
30  char _pad[4];
32  float x, y, z;
34  float quat[4];
36  float expx;
37  float expy;
38  float expz;
40  float rad;
42  float rad2;
44  float s;
46  float len;
47 
49  float *mat, *imat;
51 
52 typedef struct MetaBall {
53  ID id;
54  struct AnimData *adt;
55 
61  struct Ipo *ipo DNA_DEPRECATED;
62 
63  /* material of the mother ball will define the material used of all others */
64  struct Material **mat;
65 
67  char flag, flag2;
68  short totcol;
70  char texflag;
71  char _pad[2];
72 
78 
79  /* texture space, copied as one block in editobject.c */
80  float loc[3];
81  float size[3];
82  float rot[3];
83 
86 
87  /* bias elements to have an offset volume.
88  * mother ball changes will effect other objects thresholds,
89  * but these may also have their own thresh as an offset */
90  float thresh;
91 
92  /* used in editmode */
93  // ListBase edit_elems;
95 
96  void *batch_cache;
98 
99 /* **************** METABALL ********************* */
100 
101 /* texflag */
102 #define MB_AUTOSPACE 1
103 
104 /* mb->flag */
105 #define MB_UPDATE_ALWAYS 0
106 #define MB_UPDATE_HALFRES 1
107 #define MB_UPDATE_FAST 2
108 #define MB_UPDATE_NEVER 3
109 
110 /* mb->flag2 */
111 #define MB_DS_EXPAND (1 << 0)
112 
113 /* ml->type */
114 #define MB_BALL 0
115 #define MB_TUBEX 1 /* deprecated. */
116 #define MB_TUBEY 2 /* deprecated. */
117 #define MB_TUBEZ 3 /* deprecated. */
118 #define MB_TUBE 4
119 #define MB_PLANE 5
120 #define MB_ELIPSOID 6
121 #define MB_CUBE 7
122 
123 #define MB_TYPE_SIZE_SQUARED(type) (type == MB_ELIPSOID)
124 
125 /* ml->flag */
126 #define MB_NEGATIVE 2
127 #define MB_HIDE 8
128 #define MB_SCALE_RAD 16
129 
130 #ifdef __cplusplus
131 }
132 #endif
ID and Library types, which are fundamental for sdna.
These structs are the foundation for all linked lists in the library system.
struct MetaBall MetaBall
struct MetaElem MetaElem
Definition: DNA_ID.h:368
MetaElem * lastelem
char _pad[2]
float thresh
float size[3]
ListBase elems
float rendersize
void * batch_cache
char texflag
struct Ipo *ipo DNA_DEPRECATED
ListBase disp
short totcol
float loc[3]
float wiresize
struct AnimData * adt
ListBase * editelems
char needs_flush_to_id
struct Material ** mat
float rot[3]
float expy
float * imat
char _pad[4]
struct MetaElem * next
short type
float expx
float expz
float quat[4]
float rad2
struct BoundBox * bb
float * mat
struct MetaElem * prev
short flag