Blender  V3.3
dna_defaults.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
55 #define DNA_DEPRECATED_ALLOW
56 
57 #include <limits.h>
58 #include <stdio.h>
59 #include <stdlib.h>
60 #include <string.h>
61 
62 #include "MEM_guardedalloc.h"
63 
64 #include "BLI_endian_switch.h"
65 #include "BLI_math.h"
66 #include "BLI_memarena.h"
67 #include "BLI_utildefines.h"
68 
69 #include "IMB_imbuf.h"
70 
71 #include "DNA_defaults.h"
72 
73 #include "DNA_armature_types.h"
74 #include "DNA_asset_types.h"
75 #include "DNA_brush_types.h"
76 #include "DNA_cachefile_types.h"
77 #include "DNA_camera_types.h"
78 #include "DNA_cloth_types.h"
79 #include "DNA_collection_types.h"
80 #include "DNA_curve_types.h"
81 #include "DNA_curves_types.h"
82 #include "DNA_fluid_types.h"
84 #include "DNA_image_types.h"
85 #include "DNA_key_types.h"
86 #include "DNA_lattice_types.h"
87 #include "DNA_light_types.h"
88 #include "DNA_lightprobe_types.h"
89 #include "DNA_linestyle_types.h"
90 #include "DNA_mask_types.h"
91 #include "DNA_material_types.h"
92 #include "DNA_mesh_types.h"
93 #include "DNA_meta_types.h"
94 #include "DNA_modifier_types.h"
95 #include "DNA_movieclip_types.h"
96 #include "DNA_object_types.h"
97 #include "DNA_particle_types.h"
98 #include "DNA_pointcloud_types.h"
99 #include "DNA_scene_types.h"
100 #include "DNA_simulation_types.h"
101 #include "DNA_space_types.h"
102 #include "DNA_speaker_types.h"
103 #include "DNA_texture_types.h"
104 #include "DNA_volume_types.h"
105 #include "DNA_world_types.h"
106 
107 #include "DNA_armature_defaults.h"
108 #include "DNA_asset_defaults.h"
109 #include "DNA_brush_defaults.h"
110 #include "DNA_cachefile_defaults.h"
111 #include "DNA_camera_defaults.h"
112 #include "DNA_collection_defaults.h"
113 #include "DNA_curve_defaults.h"
114 #include "DNA_curves_defaults.h"
115 #include "DNA_fluid_defaults.h"
117 #include "DNA_image_defaults.h"
118 #include "DNA_lattice_defaults.h"
119 #include "DNA_light_defaults.h"
120 #include "DNA_lightprobe_defaults.h"
121 #include "DNA_linestyle_defaults.h"
122 #include "DNA_material_defaults.h"
123 #include "DNA_mesh_defaults.h"
124 #include "DNA_meta_defaults.h"
125 #include "DNA_modifier_defaults.h"
126 #include "DNA_movieclip_defaults.h"
127 #include "DNA_object_defaults.h"
128 #include "DNA_particle_defaults.h"
129 #include "DNA_pointcloud_defaults.h"
130 #include "DNA_scene_defaults.h"
131 #include "DNA_simulation_defaults.h"
132 #include "DNA_space_defaults.h"
133 #include "DNA_speaker_defaults.h"
134 #include "DNA_texture_defaults.h"
135 #include "DNA_volume_defaults.h"
136 #include "DNA_world_defaults.h"
137 
138 #define SDNA_DEFAULT_DECL_STRUCT(struct_name) \
139  static const struct_name DNA_DEFAULT_##struct_name = _DNA_DEFAULT_##struct_name
140 
141 /* DNA_asset_defaults.h */
144 
145 /* DNA_armature_defaults.h */
147 
148 /* DNA_brush_defaults.h */
150 
151 /* DNA_cachefile_defaults.h */
153 
154 /* DNA_camera_defaults.h */
156 
157 /* DNA_collection_defaults.h */
159 
160 /* DNA_curve_defaults.h */
162 
163 /* DNA_fluid_defaults.h */
167 
168 /* DNA_image_defaults.h */
170 
171 /* DNA_curves_defaults.h */
173 
174 /* DNA_lattice_defaults.h */
176 
177 /* DNA_light_defaults.h */
179 
180 /* DNA_lightprobe_defaults.h */
182 
183 /* DNA_linestyle_defaults.h */
185 
186 /* DNA_material_defaults.h */
188 
189 /* DNA_mesh_defaults.h */
191 
192 /* DNA_meta_defaults.h */
194 
195 /* DNA_movieclip_defaults.h */
199 
200 /* DNA_object_defaults.h */
202 
203 /* DNA_particle_defaults.h */
205 
206 /* DNA_pointcloud_defaults.h */
208 
209 /* DNA_scene_defaults.h */
212 
213 /* DNA_simulation_defaults.h */
215 
216 /* DNA_space_defaults.h */
218 
219 /* DNA_speaker_defaults.h */
221 
222 /* DNA_texture_defaults.h */
224 
225 /* DNA_view3d_defaults.h */
227 
228 /* DNA_volume_defaults.h */
230 
231 /* DNA_world_defaults.h */
233 
234 /* DNA_modifier_defaults.h */
247 // SDNA_DEFAULT_DECL_STRUCT(DataTransferModifierData);
253 /* Fluid modifier skipped for now. */
270 /* Shape key modifier has no items. */
276 /* Softbody modifier skipped for now. */
292 
293 /* DNA_gpencil_modifier_defaults.h */
320 
321 #undef SDNA_DEFAULT_DECL_STRUCT
322 
323 /* Reuse existing definitions. */
324 extern const struct UserDef U_default;
325 #define DNA_DEFAULT_UserDef U_default
326 
327 extern const bTheme U_theme_default;
328 #define DNA_DEFAULT_bTheme U_theme_default
329 
333 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
334 # define SDNA_TYPE_CHECKED(v, t) (&(v) + (_Generic((v), t : 0)))
335 #else
336 # define SDNA_TYPE_CHECKED(v, t) (&(v))
337 #endif
338 
339 #define SDNA_DEFAULT_DECL(struct_name) \
340  [SDNA_TYPE_FROM_STRUCT(struct_name)] = SDNA_TYPE_CHECKED(DNA_DEFAULT_##struct_name, struct_name)
341 
342 #define SDNA_DEFAULT_DECL_EX(struct_name, struct_path) \
343  [SDNA_TYPE_FROM_STRUCT(struct_name)] = SDNA_TYPE_CHECKED(DNA_DEFAULT_##struct_path, struct_name)
344 
346 const void *DNA_default_table[SDNA_TYPE_MAX] = {
347 
348  /* DNA_asset_defaults.h */
351 
352  /* DNA_armature_defaults.h */
354 
355  /* DNA_brush_defaults.h */
357 
358  /* DNA_cachefile_defaults.h */
360 
361  /* DNA_camera_defaults.h */
365 
366  /* DNA_collection_defaults.h */
368 
369  /* DNA_curve_defaults.h */
371 
372  /* DNA_fluid_defaults.h */
376 
377  /* DNA_image_defaults.h */
379 
380  /* DNA_curves_defaults.h */
382 
383  /* DNA_lattice_defaults.h */
385 
386  /* DNA_light_defaults.h */
388 
389  /* DNA_lightprobe_defaults.h */
391 
392  /* DNA_linestyle_defaults.h */
394 
395  /* DNA_material_defaults.h */
397 
398  /* DNA_mesh_defaults.h */
400 
401  /* DNA_space_defaults.h */
404 
405  /* DNA_meta_defaults.h */
407 
408  /* DNA_movieclip_defaults.h */
413 
414  /* DNA_object_defaults.h */
416 
417  /* DNA_particle_defaults.h */
419 
420  /* DNA_pointcloud_defaults.h */
422 
423  /* DNA_scene_defaults.h */
434 
444 
445  /* DNA_simulation_defaults.h */
447 
448  /* DNA_speaker_defaults.h */
450 
451  /* DNA_texture_defaults.h */
454 
455  /* DNA_userdef_types.h */
461 
462  /* DNA_view3d_defaults.h */
467 
468  /* DNA_volume_defaults.h */
470 
471  /* DNA_world_defaults.h */
473 
474  /* DNA_modifier_defaults.h */
487  // SDNA_DEFAULT_DECL(DataTransferModifierData),
493  /* Fluid modifier skipped for now. */
510  /* Shape key modifier has no items. */
516  /* Softbody modifier skipped for now. */
532 
533  /* DNA_gpencil_modifier_defaults.h */
560 };
561 #undef SDNA_DEFAULT_DECL
562 #undef SDNA_DEFAULT_DECL_EX
563 
565  size_t size,
566  const char *alloc_str)
567 {
568  uint8_t *data_dst = MEM_mallocN(size, alloc_str);
569  memcpy(data_dst, data_src, size);
570  return data_dst;
571 }
Object groups, one object can be in many groups at once.
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
const struct UserDef U_default
uint8_t * _DNA_struct_default_alloc_impl(const uint8_t *data_src, size_t size, const char *alloc_str)
Definition: dna_defaults.c:564
#define SDNA_DEFAULT_DECL(struct_name)
Definition: dna_defaults.c:339
const void * DNA_default_table[SDNA_TYPE_MAX]
Definition: dna_defaults.c:346
#define SDNA_DEFAULT_DECL_STRUCT(struct_name)
Definition: dna_defaults.c:138
#define SDNA_DEFAULT_DECL_EX(struct_name, struct_path)
Definition: dna_defaults.c:342
const bTheme U_theme_default
void *(* MEM_mallocN)(size_t len, const char *str)
Definition: mallocn.c:33
unsigned char uint8_t
Definition: stdint.h:78
The meta-data of an asset. By creating and giving this for a data-block (ID.asset_data),...
struct MTex mtex
struct CameraStereoSettings stereo
struct CameraDOFSettings dof
struct GP_Sculpt_Guide guide
struct MovieTrackingMarker undist_marker
ParticleBrushData brush[7]
struct BakeData bake
struct ImageFormatData im_format
struct FFMpegCodecData ffcodecdata
struct PhysicsSettings physics_settings
struct SceneDisplay display
struct RenderData r
View3DCursor cursor
struct DisplaySafeAreas safe_areas
struct AudioData audio
struct SceneEEVEE eevee
MaskSpaceInfo mask_info
struct CurvePaintSettings curve_paint_settings
struct ImagePaintSettings imapaint
struct UnifiedPaintSettings unified_paint_settings
struct MeshStatVis statvis
struct ParticleEditSettings particle
struct GP_Sculpt_Settings gp_sculpt
struct WalkNavigation walk_navigation
UserDef_FileSpaceData file_space_data
UserDef_SpaceData space_data
View3DOverlay overlay
View3DShading shading