Blender V5.0
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
62
63#define DNA_DEPRECATED_ALLOW
64
65#include <float.h>
66#include <limits.h>
67#include <stdio.h>
68#include <stdlib.h>
69#include <string.h>
70
71#include "MEM_guardedalloc.h"
72
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_layer_types.h"
99#include "DNA_light_types.h"
100#include "DNA_lightprobe_types.h"
101#include "DNA_linestyle_types.h"
102#include "DNA_mask_types.h"
103#include "DNA_material_types.h"
104#include "DNA_mesh_types.h"
105#include "DNA_meta_types.h"
106#include "DNA_modifier_types.h"
107#include "DNA_movieclip_types.h"
108#include "DNA_object_types.h"
109#include "DNA_particle_types.h"
110#include "DNA_pointcloud_types.h"
111#include "DNA_scene_types.h"
112#include "DNA_space_types.h"
113#include "DNA_speaker_types.h"
114#include "DNA_texture_types.h"
115#include "DNA_volume_types.h"
116#include "DNA_world_types.h"
117
118#include "DNA_action_defaults.h"
120#include "DNA_asset_defaults.h"
121#include "DNA_brush_defaults.h"
123#include "DNA_camera_defaults.h"
125#include "DNA_curve_defaults.h"
126#include "DNA_curves_defaults.h"
127#include "DNA_fluid_defaults.h"
130#include "DNA_image_defaults.h"
131#include "DNA_lattice_defaults.h"
132#include "DNA_layer_defaults.h"
133#include "DNA_light_defaults.h"
137#include "DNA_mesh_defaults.h"
138#include "DNA_meta_defaults.h"
141#include "DNA_object_defaults.h"
144#include "DNA_scene_defaults.h"
145#include "DNA_space_defaults.h"
146#include "DNA_speaker_defaults.h"
147#include "DNA_texture_defaults.h"
148#include "DNA_userdef_defaults.h"
149#include "DNA_volume_defaults.h"
150#include "DNA_world_defaults.h"
151
152#define SDNA_DEFAULT_DECL_STRUCT(struct_name) \
153 static const struct_name DNA_DEFAULT_##struct_name = _DNA_DEFAULT_##struct_name
154
155/* DNA_action_defaults.h */
159
160/* DNA_asset_defaults.h */
163
164/* DNA_armature_defaults.h */
166
167/* DNA_brush_defaults.h */
169
170/* DNA_cachefile_defaults.h */
172
173/* DNA_camera_defaults.h */
175
176/* DNA_collection_defaults.h */
178
179/* DNA_curve_defaults.h */
181
182/* DNA_fluid_defaults.h */
186
187/* DNA_image_defaults.h */
189
190/* DNA_curves_defaults.h */
192
193/* DNA_grease_pencil_defaults.h */
195
196/* DNA_lattice_defaults.h */
198
199/* DNA_layer_defaults.h */
201
202/* DNA_light_defaults.h */
204
205/* DNA_lightprobe_defaults.h */
207
208/* DNA_linestyle_defaults.h */
210
211/* DNA_material_defaults.h */
213
214/* DNA_mesh_defaults.h */
216
217/* DNA_meta_defaults.h */
219
220/* DNA_movieclip_defaults.h */
224
225/* DNA_object_defaults.h */
227
228/* DNA_particle_defaults.h */
230
231/* DNA_pointcloud_defaults.h */
233
234/* DNA_scene_defaults.h */
238
239/* DNA_space_defaults.h */
241
242/* DNA_speaker_defaults.h */
244
245/* DNA_texture_defaults.h */
247
248/* DNA_userdef_types.h */
252
253/* DNA_view3d_defaults.h */
255
256/* DNA_volume_defaults.h */
258
259/* DNA_world_defaults.h */
261
262/* DNA_modifier_defaults.h */
275// SDNA_DEFAULT_DECL_STRUCT(DataTransferModifierData);
281/* Fluid modifier skipped for now. */
298/* Shape key modifier has no items. */
304/* Softbody modifier skipped for now. */
325
326/* Grease Pencil 3.0 modifiers. */
328
329/* DNA_gpencil_modifier_defaults.h */
380
381#undef SDNA_DEFAULT_DECL_STRUCT
382
383/* Reuse existing definitions. */
384extern const UserDef U_default;
385#define DNA_DEFAULT_UserDef U_default
386
387extern const bTheme U_theme_default;
388#define DNA_DEFAULT_bTheme U_theme_default
389
393#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
394# define SDNA_TYPE_CHECKED(v, t) (&(v) + (_Generic((v), t: 0)))
395#else
396# define SDNA_TYPE_CHECKED(v, t) (&(v))
397#endif
398
399#define SDNA_DEFAULT_DECL(struct_name) \
400 [SDNA_TYPE_FROM_STRUCT(struct_name)] = SDNA_TYPE_CHECKED(DNA_DEFAULT_##struct_name, struct_name)
401
402#define SDNA_DEFAULT_DECL_EX(struct_name, struct_path) \
403 [SDNA_TYPE_FROM_STRUCT(struct_name)] = SDNA_TYPE_CHECKED(DNA_DEFAULT_##struct_path, struct_name)
404
405/* NOTE: Keep headers sorted. */
406
407const void *DNA_default_table[SDNA_TYPE_MAX] = {
408
409 /* DNA_anim_defaults.h */
413
414 /* DNA_asset_defaults.h */
417
418 /* DNA_armature_defaults.h */
420
421 /* DNA_brush_defaults.h */
423
424 /* DNA_cachefile_defaults.h */
426
427 /* DNA_camera_defaults.h */
431
432 /* DNA_collection_defaults.h */
434
435 /* DNA_curve_defaults.h */
437
438 /* DNA_fluid_defaults.h */
442
443 /* DNA_image_defaults.h */
445
446 /* DNA_curves_defaults.h */
448
449 /* DNA_grease_pencil_defaults.h */
451
452 /* DNA_lattice_defaults.h */
454
455 /* DNA_layer_defaults.h */
457
458 /* DNA_light_defaults.h */
460
461 /* DNA_lightprobe_defaults.h */
463
464 /* DNA_linestyle_defaults.h */
466
467 /* DNA_material_defaults.h */
469
470 /* DNA_mesh_defaults.h */
472
473 /* DNA_space_defaults.h */
476
477 /* DNA_meta_defaults.h */
479
480 /* DNA_movieclip_defaults.h */
485
486 /* DNA_object_defaults.h */
488
489 /* DNA_particle_defaults.h */
491
492 /* DNA_pointcloud_defaults.h */
494
495 /* DNA_scene_defaults.h */
508
518
520
521 /* DNA_speaker_defaults.h */
523
524 /* DNA_texture_defaults.h */
527
528 /* DNA_userdef_types.h */
538
539 /* DNA_view3d_defaults.h */
544
545 /* DNA_volume_defaults.h */
547
548 /* DNA_world_defaults.h */
550
551 /* DNA_modifier_defaults.h */
564 // SDNA_DEFAULT_DECL(DataTransferModifierData),
570 /* Fluid modifier skipped for now. */
587 /* Shape key modifier has no items. */
593 /* Softbody modifier skipped for now. */
615
616 /* Grease Pencil 3.0 defaults. */
618
619 /* DNA_gpencil_modifier_defaults.h */
669};
670#undef SDNA_DEFAULT_DECL
671#undef SDNA_DEFAULT_DECL_EX
672
673uint8_t *_DNA_struct_default_alloc_impl(const uint8_t *data_src,
674 size_t size,
675 const char *alloc_str)
676{
677 uint8_t *data_dst = MEM_mallocN(size, alloc_str);
678 memcpy(data_dst, data_src, size);
679 return data_dst;
680}
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 MeshStatVis statvis
struct ParticleEditSettings particle
struct GP_Sculpt_Settings gp_sculpt
struct WalkNavigation walk_navigation
UserDef_FileSpaceData file_space_data
struct XrNavigation xr_navigation
UserDef_SpaceData space_data
View3DOverlay overlay
View3DShading shading