Blender V4.5
dna_defaults.c
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
61
62#define DNA_DEPRECATED_ALLOW
63
64#include <float.h>
65#include <limits.h>
66#include <stdio.h>
67#include <stdlib.h>
68#include <string.h>
69
70#include "MEM_guardedalloc.h"
71
72#include "BLI_endian_switch.h"
73#include "BLI_math_base.h"
74#include "BLI_math_rotation.h"
75#include "BLI_utildefines.h"
76
77#include "IMB_imbuf_enums.h"
78#include "movie/MOV_enums.hh"
79
80#include "DNA_defaults.h"
81
82#include "DNA_anim_types.h"
83#include "DNA_armature_types.h"
84#include "DNA_asset_types.h"
85#include "DNA_brush_types.h"
86#include "DNA_cachefile_types.h"
87#include "DNA_camera_types.h"
88#include "DNA_cloth_types.h"
90#include "DNA_curve_types.h"
91#include "DNA_curves_types.h"
92#include "DNA_fluid_types.h"
95#include "DNA_image_types.h"
96#include "DNA_key_types.h"
97#include "DNA_lattice_types.h"
98#include "DNA_light_types.h"
100#include "DNA_linestyle_types.h"
101#include "DNA_mask_types.h"
102#include "DNA_material_types.h"
103#include "DNA_mesh_types.h"
104#include "DNA_meta_types.h"
105#include "DNA_modifier_types.h"
106#include "DNA_movieclip_types.h"
107#include "DNA_object_types.h"
108#include "DNA_particle_types.h"
109#include "DNA_pointcloud_types.h"
110#include "DNA_scene_types.h"
111#include "DNA_space_types.h"
112#include "DNA_speaker_types.h"
113#include "DNA_texture_types.h"
114#include "DNA_volume_types.h"
115#include "DNA_world_types.h"
116
117#include "DNA_action_defaults.h"
119#include "DNA_asset_defaults.h"
120#include "DNA_brush_defaults.h"
122#include "DNA_camera_defaults.h"
124#include "DNA_curve_defaults.h"
125#include "DNA_curves_defaults.h"
126#include "DNA_fluid_defaults.h"
129#include "DNA_image_defaults.h"
130#include "DNA_lattice_defaults.h"
131#include "DNA_light_defaults.h"
135#include "DNA_mesh_defaults.h"
136#include "DNA_meta_defaults.h"
139#include "DNA_object_defaults.h"
142#include "DNA_scene_defaults.h"
143#include "DNA_space_defaults.h"
144#include "DNA_speaker_defaults.h"
145#include "DNA_texture_defaults.h"
146#include "DNA_userdef_defaults.h"
147#include "DNA_volume_defaults.h"
148#include "DNA_world_defaults.h"
149
150#define SDNA_DEFAULT_DECL_STRUCT(struct_name) \
151 static const struct_name DNA_DEFAULT_##struct_name = _DNA_DEFAULT_##struct_name
152
153/* DNA_action_defaults.h */
157
158/* DNA_asset_defaults.h */
161
162/* DNA_armature_defaults.h */
164
165/* DNA_brush_defaults.h */
167
168/* DNA_cachefile_defaults.h */
170
171/* DNA_camera_defaults.h */
173
174/* DNA_collection_defaults.h */
176
177/* DNA_curve_defaults.h */
179
180/* DNA_fluid_defaults.h */
184
185/* DNA_image_defaults.h */
187
188/* DNA_curves_defaults.h */
190
191/* DNA_grease_pencil_defaults.h */
193
194/* DNA_lattice_defaults.h */
196
197/* DNA_light_defaults.h */
199
200/* DNA_lightprobe_defaults.h */
202
203/* DNA_linestyle_defaults.h */
205
206/* DNA_material_defaults.h */
208
209/* DNA_mesh_defaults.h */
211
212/* DNA_meta_defaults.h */
214
215/* DNA_movieclip_defaults.h */
219
220/* DNA_object_defaults.h */
222
223/* DNA_particle_defaults.h */
225
226/* DNA_pointcloud_defaults.h */
228
229/* DNA_scene_defaults.h */
233
234/* DNA_space_defaults.h */
236
237/* DNA_speaker_defaults.h */
239
240/* DNA_texture_defaults.h */
242
243/* DNA_userdef_types.h */
247
248/* DNA_view3d_defaults.h */
250
251/* DNA_volume_defaults.h */
253
254/* DNA_world_defaults.h */
256
257/* DNA_modifier_defaults.h */
270// SDNA_DEFAULT_DECL_STRUCT(DataTransferModifierData);
276/* Fluid modifier skipped for now. */
293/* Shape key modifier has no items. */
299/* Softbody modifier skipped for now. */
320
321/* Grease Pencil 3.0 modifiers. */
323
324/* DNA_gpencil_modifier_defaults.h */
375
376#undef SDNA_DEFAULT_DECL_STRUCT
377
378/* Reuse existing definitions. */
379extern const UserDef U_default;
380#define DNA_DEFAULT_UserDef U_default
381
382extern const bTheme U_theme_default;
383#define DNA_DEFAULT_bTheme U_theme_default
384
388#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
389# define SDNA_TYPE_CHECKED(v, t) (&(v) + (_Generic((v), t: 0)))
390#else
391# define SDNA_TYPE_CHECKED(v, t) (&(v))
392#endif
393
394#define SDNA_DEFAULT_DECL(struct_name) \
395 [SDNA_TYPE_FROM_STRUCT(struct_name)] = SDNA_TYPE_CHECKED(DNA_DEFAULT_##struct_name, struct_name)
396
397#define SDNA_DEFAULT_DECL_EX(struct_name, struct_path) \
398 [SDNA_TYPE_FROM_STRUCT(struct_name)] = SDNA_TYPE_CHECKED(DNA_DEFAULT_##struct_path, struct_name)
399
400/* NOTE: Keep headers sorted. */
401
402const void *DNA_default_table[SDNA_TYPE_MAX] = {
403
404 /* DNA_anim_defaults.h */
408
409 /* DNA_asset_defaults.h */
412
413 /* DNA_armature_defaults.h */
415
416 /* DNA_brush_defaults.h */
418
419 /* DNA_cachefile_defaults.h */
421
422 /* DNA_camera_defaults.h */
426
427 /* DNA_collection_defaults.h */
429
430 /* DNA_curve_defaults.h */
432
433 /* DNA_fluid_defaults.h */
437
438 /* DNA_image_defaults.h */
440
441 /* DNA_curves_defaults.h */
443
444 /* DNA_grease_pencil_defaults.h */
446
447 /* DNA_lattice_defaults.h */
449
450 /* DNA_light_defaults.h */
452
453 /* DNA_lightprobe_defaults.h */
455
456 /* DNA_linestyle_defaults.h */
458
459 /* DNA_material_defaults.h */
461
462 /* DNA_mesh_defaults.h */
464
465 /* DNA_space_defaults.h */
468
469 /* DNA_meta_defaults.h */
471
472 /* DNA_movieclip_defaults.h */
477
478 /* DNA_object_defaults.h */
480
481 /* DNA_particle_defaults.h */
483
484 /* DNA_pointcloud_defaults.h */
486
487 /* DNA_scene_defaults.h */
500
510
512
513 /* DNA_speaker_defaults.h */
515
516 /* DNA_texture_defaults.h */
519
520 /* DNA_userdef_types.h */
529
530 /* DNA_view3d_defaults.h */
535
536 /* DNA_volume_defaults.h */
538
539 /* DNA_world_defaults.h */
541
542 /* DNA_modifier_defaults.h */
555 // SDNA_DEFAULT_DECL(DataTransferModifierData),
561 /* Fluid modifier skipped for now. */
578 /* Shape key modifier has no items. */
584 /* Softbody modifier skipped for now. */
606
607 /* Grease Pencil 3.0 defaults. */
609
610 /* DNA_gpencil_modifier_defaults.h */
660};
661#undef SDNA_DEFAULT_DECL
662#undef SDNA_DEFAULT_DECL_EX
663
664uint8_t *_DNA_struct_default_alloc_impl(const uint8_t *data_src,
665 size_t size,
666 const char *alloc_str)
667{
668 uint8_t *data_dst = MEM_mallocN(size, alloc_str);
669 memcpy(data_dst, data_src, size);
670 return data_dst;
671}
const UserDef U_default
const bTheme U_theme_default
Object groups, one object can be in many groups at once.
const void * DNA_default_table[SDNA_TYPE_MAX]
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
#define SDNA_DEFAULT_DECL(struct_name)
#define SDNA_DEFAULT_DECL_STRUCT(struct_name)
#define SDNA_DEFAULT_DECL_EX(struct_name, struct_path)
uint8_t * _DNA_struct_default_alloc_impl(const uint8_t *data_src, size_t size, const char *alloc_str)
void * MEM_mallocN(size_t len, const char *str)
Definition mallocn.cc:128
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 RaytraceEEVEE ray_tracing_options
struct PhysicsSettings physics_settings
struct SceneDisplay display
struct SceneGpencil grease_pencil_settings
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