Blender  V2.93
DNA_pointcache_types.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #pragma once
22 
23 #include "DNA_listBase.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
36 #define BPHYS_DATA_INDEX 0
37 #define BPHYS_DATA_LOCATION 1
38 #define BPHYS_DATA_SMOKE_LOW 1
39 #define BPHYS_DATA_VELOCITY 2
40 #define BPHYS_DATA_SMOKE_HIGH 2
41 #define BPHYS_DATA_ROTATION 3
42 #define BPHYS_DATA_DYNAMICPAINT 3
43 #define BPHYS_DATA_AVELOCITY 4 /* used for particles */
44 #define BPHYS_DATA_XCONST 4 /* used for cloth */
45 #define BPHYS_DATA_SIZE 5
46 #define BPHYS_DATA_TIMES 6
47 #define BPHYS_DATA_BOIDS 7
48 
49 #define BPHYS_TOT_DATA 8
50 
51 #define BPHYS_EXTRA_FLUID_SPRINGS 1
52 #define BPHYS_EXTRA_CLOTH_ACCELERATION 2
53 
54 typedef struct PTCacheExtra {
55  struct PTCacheExtra *next, *prev;
56  unsigned int type, totdata;
57  void *data;
59 
60 typedef struct PTCacheMem {
61  struct PTCacheMem *next, *prev;
62  unsigned int frame, totpoint;
63  unsigned int data_types, flag;
64 
66  void *data[8];
67 
68  struct ListBase extradata;
70 
71 typedef struct PointCache {
72  struct PointCache *next, *prev;
74  int flag;
75 
89  int step;
90 
92  int simframe;
96  int endframe;
98  int editframe;
103  char _pad[4];
104 
105  /* for external cache files */
107  int totpoint;
109  int index;
110  short compression, rt;
111 
112  char name[64];
113  char prev_name[64];
114  char info[128];
116  char path[1024];
117 
124  char _pad1[4];
125 
126  struct ListBase mem_cache;
127 
128  struct PTCacheEdit *edit;
130  void (*free_edit)(struct PTCacheEdit *edit);
132 
133 /* pointcache->flag */
134 #define PTCACHE_BAKED (1 << 0)
135 #define PTCACHE_OUTDATED (1 << 1)
136 #define PTCACHE_SIMULATION_VALID (1 << 2)
137 #define PTCACHE_BAKING (1 << 3)
138 //#define PTCACHE_BAKE_EDIT (1 << 4)
139 //#define PTCACHE_BAKE_EDIT_ACTIVE (1 << 5)
140 #define PTCACHE_DISK_CACHE (1 << 6)
142 //#define PTCACHE_QUICK_CACHE (1 << 7)
143 #define PTCACHE_FRAMES_SKIPPED (1 << 8)
144 #define PTCACHE_EXTERNAL (1 << 9)
145 #define PTCACHE_READ_INFO (1 << 10)
147 #define PTCACHE_IGNORE_LIBPATH (1 << 11)
152 #define PTCACHE_FAKE_SMOKE (1 << 12)
153 #define PTCACHE_IGNORE_CLEAR (1 << 13)
154 
155 #define PTCACHE_FLAG_INFO_DIRTY (1 << 14)
156 
157 /* PTCACHE_OUTDATED + PTCACHE_FRAMES_SKIPPED */
158 #define PTCACHE_REDO_NEEDED 258
159 
160 #define PTCACHE_COMPRESS_NO 0
161 #define PTCACHE_COMPRESS_LZO 1
162 #define PTCACHE_COMPRESS_LZMA 2
163 
164 #ifdef __cplusplus
165 }
166 #endif
These structs are the foundation for all linked lists in the library system.
struct PTCacheMem PTCacheMem
struct PTCacheExtra PTCacheExtra
struct PointCache PointCache
unsigned int type
unsigned int totdata
struct PTCacheExtra * next
struct PTCacheExtra * prev
unsigned int flag
unsigned int data_types
unsigned int frame
struct ListBase extradata
struct PTCacheMem * next
struct PTCacheMem * prev
unsigned int totpoint
struct PointCache * next
struct ListBase mem_cache
struct PTCacheEdit * edit
void(* free_edit)(struct PTCacheEdit *edit)
struct PointCache * prev