diff options
Diffstat (limited to 'source/blender/makesdna')
21 files changed, 163 insertions, 234 deletions
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 99737aa3b67..c1dfab8a041 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -304,7 +304,7 @@ typedef struct DriverTarget { char *rna_path; /** - * Name of the posebone to use + * Name of the pose-bone to use * (for vars where DTAR_FLAG_STRUCT_REF is used) - `MAX_ID_NAME - 2`. */ char pchan_name[64]; @@ -918,9 +918,9 @@ typedef struct KS_Path { /** Index that path affects. */ int array_index; - /** (eInsertKeyFlags) settings to supply insertkey() with. */ + /** (#eInsertKeyFlags) settings to supply insert-key() with. */ short keyingflag; - /** (eInsertKeyFlags) for each flag set, the relevant keyingflag bit overrides the default. */ + /** (#eInsertKeyFlags) for each flag set, the relevant keying-flag bit overrides the default. */ short keyingoverride; } KS_Path; diff --git a/source/blender/makesdna/DNA_brush_enums.h b/source/blender/makesdna/DNA_brush_enums.h index 3e7a4431bf5..f409d1c0442 100644 --- a/source/blender/makesdna/DNA_brush_enums.h +++ b/source/blender/makesdna/DNA_brush_enums.h @@ -305,6 +305,12 @@ typedef enum eGP_Sculpt_Mode_Flag { GP_SCULPT_FLAGMODE_APPLY_THICKNESS = (1 << 2), /* apply brush to uv data */ GP_SCULPT_FLAGMODE_APPLY_UV = (1 << 3), + /* Stroke Auto-Masking for sculpt. */ + GP_SCULPT_FLAGMODE_AUTOMASK_STROKE = (1 << 4), + /* Layer Auto-Masking for sculpt. */ + GP_SCULPT_FLAGMODE_AUTOMASK_LAYER = (1 << 5), + /* Material Auto-Masking for sculpt. */ + GP_SCULPT_FLAGMODE_AUTOMASK_MATERIAL = (1 << 6), } eGP_Sculpt_Mode_Flag; typedef enum eAutomasking_flag { @@ -612,6 +618,7 @@ typedef enum eBrushCurvesSculptFlag { BRUSH_CURVES_SCULPT_FLAG_GROW_SHRINK_INVERT = (1 << 1), BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_LENGTH = (1 << 2), BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_SHAPE = (1 << 3), + BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_POINT_COUNT = (1 << 4), } eBrushCurvesSculptFlag; #define MAX_BRUSH_PIXEL_RADIUS 500 diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index 7d230b7d7a3..24e77ecf87f 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -140,6 +140,8 @@ typedef struct BrushGpencilSettings { typedef struct BrushCurvesSculptSettings { /** Number of curves added by the add brush. */ int add_amount; + /** Number of control points in new curves added by the add brush. */ + int points_per_curve; /* eBrushCurvesSculptFlag. */ uint32_t flag; /** When shrinking curves, they shouldn't become shorter than this length. */ diff --git a/source/blender/makesdna/DNA_curves_types.h b/source/blender/makesdna/DNA_curves_types.h index bb53dbafdc8..2388f04cc39 100644 --- a/source/blender/makesdna/DNA_curves_types.h +++ b/source/blender/makesdna/DNA_curves_types.h @@ -9,6 +9,8 @@ #include "DNA_ID.h" #include "DNA_customdata_types.h" +#include "BLI_utildefines.h" + #ifdef __cplusplus extern "C" { #endif @@ -87,6 +89,9 @@ typedef struct CurvesGeometry { * this array is allocated with a length one larger than the number of curves. This is allowed * to be null when there are no curves. * + * Every curve offset must be at least one larger than the previous. + * In other words, every curve must have at least one point. + * * \note This is *not* stored in #CustomData because its size is one larger than #curve_data. */ int *curve_offsets; @@ -105,11 +110,11 @@ typedef struct CurvesGeometry { /** * The total number of control points in all curves. */ - int point_size; + int point_num; /** * The number of curves in the data-block. */ - int curve_size; + int curve_num; /** * Runtime data for curves, stored as a pointer to allow defining this as a C++ class. @@ -130,7 +135,13 @@ typedef struct Curves { /* Materials. */ struct Material **mat; short totcol; - short _pad2[3]; + + /** + * User-defined symmetry flag (#eCurvesSymmetryType) that causes editing operations to maintain + * symmetrical geometry. + */ + char symmetry; + char _pad2[5]; /** * Used as base mesh when curves represent e.g. hair or fur. This surface is used in edit modes. @@ -150,6 +161,14 @@ enum { HA_DS_EXPAND = (1 << 0), }; +/** #Curves.symmetry */ +typedef enum eCurvesSymmetryType { + CURVES_SYMMETRY_X = 1 << 0, + CURVES_SYMMETRY_Y = 1 << 1, + CURVES_SYMMETRY_Z = 1 << 2, +} eCurvesSymmetryType; +ENUM_OPERATORS(eCurvesSymmetryType, CURVES_SYMMETRY_Z) + /* Only one material supported currently. */ #define CURVES_MATERIAL_NR 1 diff --git a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h index 750f97bb3c6..ae47bf5d524 100644 --- a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h +++ b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h @@ -303,7 +303,8 @@ .crease_threshold = DEG2RAD(140.0f), \ .calculation_flags = LRT_ALLOW_DUPLI_OBJECTS | LRT_ALLOW_CLIPPING_BOUNDARIES | \ LRT_USE_CREASE_ON_SHARP_EDGES | LRT_FILTER_FACE_MARK_KEEP_CONTOUR, \ - .angle_splitting_threshold = DEG2RAD(60.0f), \ + /* Do not split by default, this is for better chaining quality. */ \ + .angle_splitting_threshold = 0.0f, \ .chaining_image_threshold = 0.001f, \ .chain_smooth_tolerance = 0.2f,\ .stroke_depth_offset = 0.05,\ diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h index b0e7342c9cb..535533565dd 100644 --- a/source/blender/makesdna/DNA_gpencil_modifier_types.h +++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h @@ -102,7 +102,8 @@ typedef struct NoiseGpencilModifierData { /** Noise Frequency scaling */ float noise_scale; float noise_offset; - char _pad[4]; + short noise_mode; + char _pad[2]; /** How many frames before recalculate randoms. */ int step; /** Custom index for passes. */ @@ -127,6 +128,11 @@ typedef enum eNoiseGpencil_Flag { GP_NOISE_INVERT_MATERIAL = (1 << 11), } eNoiseGpencil_Flag; +typedef enum eNoiseRandomGpencil_Mode { + GP_NOISE_RANDOM_STEP = 0, + GP_NOISE_RANDOM_KEYFRAME = 1, +} eNoiseRandomGpencil_Mode; + typedef struct SubdivGpencilModifierData { GpencilModifierData modifier; /** Material for filtering. */ diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index 4a1b639122a..a83262d7639 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -245,7 +245,7 @@ typedef struct bGPDstroke_Runtime { /** Vertex offset in the VBO where this stroke starts. */ int stroke_start; - /** Triangle offset in the ibo where this fill starts. */ + /** Triangle offset in the IBO where this fill starts. */ int fill_start; /** Curve Handles offset in the IBO where this handle starts. */ int curve_start; @@ -814,10 +814,10 @@ typedef enum eGPdata_Flag { /* Vertex Paint Mode - Toggle paint mode */ GP_DATA_STROKE_VERTEXMODE = (1 << 18), - /* Autolock not active layers */ + /* Auto-lock not active layers. */ GP_DATA_AUTOLOCK_LAYERS = (1 << 20), - /* Enable Bezier Editing Curve (a submode of Edit mode). */ + /* Enable Bezier Editing Curve (a sub-mode of Edit mode). */ GP_DATA_CURVE_EDIT_MODE = (1 << 21), /* Use adaptive curve resolution */ GP_DATA_CURVE_ADAPTIVE_RESOLUTION = (1 << 22), diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index 4e66e2446f0..80f592bb66d 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -64,6 +64,11 @@ typedef struct ImageView { typedef struct ImagePackedFile { struct ImagePackedFile *next, *prev; struct PackedFile *packedfile; + + /* Which view and tile this ImagePackedFile represents. Normal images will use 0 and 1001 + * respectively when creating their ImagePackedFile. Must be provided for each packed image. */ + int view; + int tile_number; /** 1024 = FILE_MAX. */ char filepath[1024]; } ImagePackedFile; diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h index d5f7e25bb80..4ee5f34fcde 100644 --- a/source/blender/makesdna/DNA_layer_types.h +++ b/source/blender/makesdna/DNA_layer_types.h @@ -125,7 +125,7 @@ typedef struct ViewLayerAOV { int type; } ViewLayerAOV; -/* Lightgroup Renderpass definition. */ +/** Light-group Render-pass definition. */ typedef struct ViewLayerLightgroup { struct ViewLayerLightgroup *next, *prev; diff --git a/source/blender/makesdna/DNA_lineart_types.h b/source/blender/makesdna/DNA_lineart_types.h index 2e446427cc3..5b3a23000d7 100644 --- a/source/blender/makesdna/DNA_lineart_types.h +++ b/source/blender/makesdna/DNA_lineart_types.h @@ -21,7 +21,7 @@ typedef enum eLineartMainFlags { LRT_ALLOW_DUPLI_OBJECTS = (1 << 2), LRT_ALLOW_OVERLAPPING_EDGES = (1 << 3), LRT_ALLOW_CLIPPING_BOUNDARIES = (1 << 4), - LRT_REMOVE_DOUBLES = (1 << 5), + /* LRT_REMOVE_DOUBLES = (1 << 5), Deprecated */ LRT_LOOSE_AS_CONTOUR = (1 << 6), LRT_GPENCIL_INVERT_SOURCE_VGROUP = (1 << 7), LRT_GPENCIL_MATCH_OUTPUT_VGROUP = (1 << 8), @@ -47,9 +47,18 @@ typedef enum eLineartEdgeFlag { LRT_EDGE_FLAG_MATERIAL = (1 << 3), LRT_EDGE_FLAG_INTERSECTION = (1 << 4), LRT_EDGE_FLAG_LOOSE = (1 << 5), - LRT_EDGE_FLAG_CHAIN_PICKED = (1 << 6), - LRT_EDGE_FLAG_CLIPPED = (1 << 7), - /** Limited to 8 bits, DON'T ADD ANYMORE until improvements on the data structure. */ + /* LRT_EDGE_FLAG_FOR_FUTURE = (1 << 7), */ + /* Limited to 8 bits for edge type flag, don't add anymore because BMEdge->head.eflag only has 8 + bits. So unless we changed this into a non-single-bit flag thing, we keep it this way. */ + /** Also used as discarded line mark. */ + LRT_EDGE_FLAG_CHAIN_PICKED = (1 << 8), + LRT_EDGE_FLAG_CLIPPED = (1 << 9), + /** Limited to 16 bits for the entire thing. */ + + /** For object loading code to use only. */ + LRT_EDGE_FLAG_INHIBIT = (1 << 14), + /** For discarding duplicated edge types in culling stage. */ + LRT_EDGE_FLAG_NEXT_IS_DUPLICATION = (1 << 15), } eLineartEdgeFlag; #define LRT_EDGE_FLAG_ALL_TYPE 0x3f diff --git a/source/blender/makesdna/DNA_modifier_defaults.h b/source/blender/makesdna/DNA_modifier_defaults.h index 77730ce254c..92a65a50bd4 100644 --- a/source/blender/makesdna/DNA_modifier_defaults.h +++ b/source/blender/makesdna/DNA_modifier_defaults.h @@ -632,7 +632,8 @@ .falloff = 4.0f, \ .mesh_verts_num = 0, \ .bind_verts_num = 0, \ - .polys_num = 0, \ + .target_verts_num = 0, \ + .target_polys_num = 0, \ .flags = 0, \ .mat = _DNA_DEFAULT_UNIT_M4, \ .strength = 1.0f, \ diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 73c4eeaaab3..6e3ce7e98a8 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -2222,13 +2222,19 @@ typedef struct SurfaceDeformModifierData { struct Object *target; /** Vertex bind data. */ SDefVert *verts; + void *_pad1; float falloff; - unsigned int mesh_verts_num, bind_verts_num, polys_num; + /* Number of of vertices on the deformed mesh upon the bind process. */ + unsigned int mesh_verts_num; + /* Number of vertices in the `verts` array of this modifier. */ + unsigned int bind_verts_num; + /* Number of vertices and polygons on the target mesh upon bind process. */ + unsigned int target_verts_num, target_polys_num; int flags; float mat[4][4]; float strength; char defgrp_name[64]; - void *_pad1; + int _pad2; } SurfaceDeformModifierData; /** Surface Deform modifier flags. */ diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index e7e8ab3dd61..3be4f82ecb0 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -868,6 +868,12 @@ typedef struct NodeVertexCol { char name[64]; } NodeVertexCol; +typedef struct NodeCMPCombSepColor { + /* CMPNodeCombSepColorMode */ + uint8_t mode; + uint8_t ycc_mode; +} NodeCMPCombSepColor; + /** Defocus blur node. */ typedef struct NodeDefocus { char bktype, _pad0, preview, gamco; @@ -1498,6 +1504,11 @@ typedef struct NodeFunctionCompare { char _pad[1]; } NodeFunctionCompare; +typedef struct NodeCombSepColor { + /* NodeCombSepColorMode */ + int8_t mode; +} NodeCombSepColor; + /* script node mode */ #define NODE_SCRIPT_INTERNAL 0 #define NODE_SCRIPT_EXTERNAL 1 @@ -1890,6 +1901,16 @@ typedef enum CMPNodeDenoisePrefilter { CMP_NODE_DENOISE_PREFILTER_ACCURATE = 2 } CMPNodeDenoisePrefilter; +/* Color combine/separate modes */ + +typedef enum CMPNodeCombSepColorMode { + CMP_NODE_COMBSEP_COLOR_RGB = 0, + CMP_NODE_COMBSEP_COLOR_HSV = 1, + CMP_NODE_COMBSEP_COLOR_HSL = 2, + CMP_NODE_COMBSEP_COLOR_YCC = 3, + CMP_NODE_COMBSEP_COLOR_YUV = 4, +} CMPNodeCombSepColorMode; + #define CMP_NODE_PLANETRACKDEFORM_MBLUR_SAMPLES_MAX 64 /* Point Density shader node */ @@ -2148,6 +2169,12 @@ typedef enum GeometryNodeScaleElementsMode { GEO_NODE_SCALE_ELEMENTS_SINGLE_AXIS = 1, } GeometryNodeScaleElementsMode; +typedef enum NodeCombSepColorMode { + NODE_COMBSEP_COLOR_RGB = 0, + NODE_COMBSEP_COLOR_HSV = 1, + NODE_COMBSEP_COLOR_HSL = 2, +} NodeCombSepColorMode; + #ifdef __cplusplus } #endif diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 9ea1e3a9e8d..f257833efe8 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -535,7 +535,8 @@ enum { /** Matches #OB_TYPE_SUPPORT_EDITMODE. */ #define OB_DATA_SUPPORT_EDITMODE(_type) \ - (ELEM(_type, ID_ME, ID_CU_LEGACY, ID_MB, ID_LT, ID_AR, ID_CV)) + (ELEM(_type, ID_ME, ID_CU_LEGACY, ID_MB, ID_LT, ID_AR) || \ + (U.experimental.use_new_curves_tools && (_type) == ID_CV)) /* is this ID type used as object data */ #define OB_DATA_SUPPORT_ID(_id_type) \ diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index d28550b5456..a54fd838bbe 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -161,7 +161,7 @@ typedef struct Sequence { * Frames that use the first frame before data begins, * frames that use the last frame after data ends. */ - int startstill, endstill; + int startstill DNA_DEPRECATED, endstill DNA_DEPRECATED; /** Machine: the strip channel */ int machine; int _pad3; diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index df59dd84662..ba926f0f4fa 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -77,6 +77,12 @@ typedef struct bSound { void *spinlock; /* XXX unused currently (SOUND_TYPE_LIMITER) */ /* float start, end; */ + + /* Description of Audio channels, as of eSoundChannels*/ + int audio_channels; + + int samplerate; + } bSound; /* XXX unused currently */ diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index c1e96bcfaf3..85649a31ea4 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -173,7 +173,7 @@ typedef struct SpaceProperties { /* button defines (deprecated) */ #ifdef DNA_DEPRECATED_ALLOW -/* warning: the values of these defines are used in SpaceProperties.tabs[8] */ +/* WARNING: the values of these defines are used in SpaceProperties.tabs[8] */ /* SpaceProperties.mainb new */ # define CONTEXT_SCENE 0 # define CONTEXT_OBJECT 1 @@ -1223,7 +1223,8 @@ typedef struct SpaceImage { char dt_uvstretch; char around; - char _pad1[4]; + char gizmo_flag; + char _pad1[3]; int flag; @@ -1321,6 +1322,13 @@ typedef enum eSpaceImageOverlay_Flag { SI_OVERLAY_SHOW_GRID_BACKGROUND = (1 << 1), } eSpaceImageOverlay_Flag; +/** #SpaceImage.gizmo_flag */ +enum { + /** All gizmos. */ + SI_GIZMO_HIDE = (1 << 0), + SI_GIZMO_HIDE_NAVIGATE = (1 << 1), +}; + /** Keep in sync with `STEPS_LEN` in `grid_frag.glsl`. */ #define SI_GRID_STEPS_LEN 8 @@ -1332,7 +1340,7 @@ typedef enum eSpaceImageOverlay_Flag { typedef struct SpaceText_Runtime { - /** Actual line height, scaled by dpi. */ + /** Actual line height, scaled by DPI. */ int lheight_px; /** Runtime computed, character width. */ diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 21abb632b94..275a89ec680 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -57,7 +57,7 @@ typedef struct uiFontStyle { /** Saved in file, 0 is default. */ short uifont_id; char _pad1[2]; - /** Actual size depends on 'global' dpi. */ + /** Actual size depends on 'global' DPI. */ float points; /** Style hint. */ short italic, bold; @@ -643,6 +643,8 @@ typedef struct UserDef_Experimental { /* The following options are automatically sanitized (set to 0) * when the release cycle is not alpha. */ char use_new_curves_type; + /** Only available when #use_new_curves_type is enabled. */ + char use_new_curves_tools; char use_new_point_cloud_type; char use_full_frame_compositor; char use_sculpt_tools_tilt; @@ -651,7 +653,6 @@ typedef struct UserDef_Experimental { char enable_eevee_next; char use_sculpt_texture_paint; char use_draw_manager_acquire_lock; - char _pad0[1]; /** `makesdna` does not allow empty structs. */ } UserDef_Experimental; diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt index 2afaf04a8d7..c26696b4572 100644 --- a/source/blender/makesdna/intern/CMakeLists.txt +++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -13,6 +13,19 @@ blender_include_dirs( .. ) +set(dna_header_include_file "${CMAKE_CURRENT_BINARY_DIR}/dna_includes_all.h") +set(dna_header_string_file "${CMAKE_CURRENT_BINARY_DIR}/dna_includes_as_strings.h") + +set(DNA_INCLUDE_TEXT "/* Do not edit manually, changes will be overwritten. */\n") +set(DNA_FILE_LIST "/* Do not edit manually, changes will be overwritten. */\n") +foreach(header ${SRC_DNA_INC}) + get_filename_component(dna_header_file ${header} NAME) + string(APPEND DNA_INCLUDE_TEXT "#include \"${header}\"\n") + string(APPEND DNA_FILE_LIST "\t\"${dna_header_file}\",\n") +endforeach() + +file(GENERATE OUTPUT ${dna_header_include_file} CONTENT "${DNA_INCLUDE_TEXT}") +file(GENERATE OUTPUT ${dna_header_string_file} CONTENT "${DNA_FILE_LIST}") # ----------------------------------------------------------------------------- # Build makesdna executable @@ -29,6 +42,8 @@ set(SRC ../../../../intern/guardedalloc/intern/mallocn.c ../../../../intern/guardedalloc/intern/mallocn_guarded_impl.c ../../../../intern/guardedalloc/intern/mallocn_lockfree_impl.c + ${dna_header_include_file} + ${dna_header_string_file} ) # SRC_DNA_INC is defined in the parent dir @@ -115,40 +130,7 @@ set(SRC ../../blenlib/intern/hash_mm2a.c ../../blenlib/intern/listbase.c - ../DNA_armature_defaults.h - ../DNA_asset_defaults.h - ../DNA_brush_defaults.h - ../DNA_cachefile_defaults.h - ../DNA_camera_defaults.h - ../DNA_collection_defaults.h - ../DNA_curve_defaults.h - ../DNA_curves_defaults.h - ../DNA_defaults.h - ../DNA_fluid_defaults.h - ../DNA_gpencil_modifier_defaults.h - ../DNA_image_defaults.h - ../DNA_lattice_defaults.h - ../DNA_light_defaults.h - ../DNA_lightprobe_defaults.h - ../DNA_linestyle_defaults.h - ../DNA_material_defaults.h - ../DNA_mesh_defaults.h - ../DNA_meta_defaults.h - ../DNA_modifier_defaults.h - ../DNA_modifier_types.h - ../DNA_movieclip_defaults.h - ../DNA_object_defaults.h - ../DNA_particle_defaults.h - ../DNA_pointcloud_defaults.h - ../DNA_scene_defaults.h - ../DNA_simulation_defaults.h - ../DNA_space_defaults.h - ../DNA_speaker_defaults.h - ../DNA_texture_defaults.h - ../DNA_vec_defaults.h - ../DNA_view3d_defaults.h - ../DNA_volume_defaults.h - ../DNA_world_defaults.h + ${SRC_DNA_DEFAULTS_INC} ) set(LIB diff --git a/source/blender/makesdna/intern/dna_rename_defs.h b/source/blender/makesdna/intern/dna_rename_defs.h index 86649357433..f25ff5fbbb8 100644 --- a/source/blender/makesdna/intern/dna_rename_defs.h +++ b/source/blender/makesdna/intern/dna_rename_defs.h @@ -61,6 +61,8 @@ DNA_STRUCT_RENAME_ELEM(Curve, ext1, extrude) DNA_STRUCT_RENAME_ELEM(Curve, ext2, bevel_radius) DNA_STRUCT_RENAME_ELEM(Curve, len_wchar, len_char32) DNA_STRUCT_RENAME_ELEM(Curve, width, offset) +DNA_STRUCT_RENAME_ELEM(CurvesGeometry, curve_size, curve_num) +DNA_STRUCT_RENAME_ELEM(CurvesGeometry, point_size, point_num) DNA_STRUCT_RENAME_ELEM(CustomDataExternal, filename, filepath) DNA_STRUCT_RENAME_ELEM(Editing, over_border, overlay_frame_rect) DNA_STRUCT_RENAME_ELEM(Editing, over_cfra, overlay_frame_abs) @@ -106,7 +108,7 @@ DNA_STRUCT_RENAME_ELEM(SDefBind, numverts, verts_num) DNA_STRUCT_RENAME_ELEM(SDefVert, numbinds, binds_num) DNA_STRUCT_RENAME_ELEM(SpaceSeq, overlay_type, overlay_frame_type) DNA_STRUCT_RENAME_ELEM(SurfaceDeformModifierData, num_mesh_verts, mesh_verts_num) -DNA_STRUCT_RENAME_ELEM(SurfaceDeformModifierData, numpoly, polys_num) +DNA_STRUCT_RENAME_ELEM(SurfaceDeformModifierData, numpoly, target_polys_num) DNA_STRUCT_RENAME_ELEM(SurfaceDeformModifierData, numverts, bind_verts_num) DNA_STRUCT_RENAME_ELEM(SurfaceModifierData, numverts, verts_num) DNA_STRUCT_RENAME_ELEM(Text, name, filepath) diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 12ec7262906..806513009be 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -43,92 +43,11 @@ #define SDNA_MAX_FILENAME_LENGTH 255 -/* Included the path relative from /source/blender/ here, - * so we can move headers around with more freedom. */ +/* The include file below is automatically generated from the `SRC_DNA_INC` + * variable in 'source/blender/CMakeLists.txt'. */ static const char *includefiles[] = { - /* if you add files here, please add them at the end - * of makesdna.c (this file) as well */ - "DNA_listBase.h", - "DNA_vec_types.h", - "DNA_ID.h", - "DNA_ipo_types.h", - "DNA_key_types.h", - "DNA_text_types.h", - "DNA_packedFile_types.h", - "DNA_gpu_types.h", - "DNA_camera_types.h", - "DNA_image_types.h", - "DNA_texture_types.h", - "DNA_light_types.h", - "DNA_material_types.h", - "DNA_vfont_types.h", - "DNA_meta_types.h", - "DNA_curve_types.h", - "DNA_mesh_types.h", - "DNA_meshdata_types.h", - "DNA_modifier_types.h", - "DNA_lineart_types.h", - "DNA_lattice_types.h", - "DNA_object_types.h", - "DNA_object_force_types.h", - "DNA_object_fluidsim_types.h", - "DNA_world_types.h", - "DNA_scene_types.h", - "DNA_view3d_types.h", - "DNA_view2d_types.h", - "DNA_space_types.h", - "DNA_userdef_types.h", - "DNA_screen_types.h", - "DNA_sdna_types.h", - "DNA_fileglobal_types.h", - "DNA_sequence_types.h", - "DNA_session_uuid_types.h", - "DNA_effect_types.h", - "DNA_outliner_types.h", - "DNA_sound_types.h", - "DNA_collection_types.h", - "DNA_armature_types.h", - "DNA_action_types.h", - "DNA_constraint_types.h", - "DNA_nla_types.h", - "DNA_node_types.h", - "DNA_color_types.h", - "DNA_brush_types.h", - "DNA_customdata_types.h", - "DNA_particle_types.h", - "DNA_cloth_types.h", - "DNA_gpencil_types.h", - "DNA_gpencil_modifier_types.h", - "DNA_shader_fx_types.h", - "DNA_windowmanager_types.h", - "DNA_anim_types.h", - "DNA_boid_types.h", - "DNA_fluid_types.h", - "DNA_speaker_types.h", - "DNA_movieclip_types.h", - "DNA_tracking_types.h", - "DNA_dynamicpaint_types.h", - "DNA_mask_types.h", - "DNA_rigidbody_types.h", - "DNA_freestyle_types.h", - "DNA_linestyle_types.h", - "DNA_cachefile_types.h", - "DNA_layer_types.h", - "DNA_workspace_types.h", - "DNA_lightprobe_types.h", - "DNA_curveprofile_types.h", - "DNA_xr_types.h", - "DNA_curves_types.h", - "DNA_pointcloud_types.h", - "DNA_volume_types.h", - "DNA_simulation_types.h", - "DNA_pointcache_types.h", - "DNA_uuid_types.h", - "DNA_asset_types.h", - - /* see comment above before editing! */ - - /* empty string to indicate end of includefiles */ +#include "dna_includes_as_strings.h" + /* Empty string to indicate end of include files. */ "", }; @@ -235,7 +154,7 @@ static int preprocess_include(char *maindata, const int maindata_len); /** * Scan this file for serializable types. */ -static int convert_include(const char *filename); +static int convert_include(const char *filepath); /** * Determine how many bytes are needed for each struct. @@ -670,12 +589,12 @@ static int preprocess_include(char *maindata, const int maindata_len) return newlen; } -static void *read_file_data(const char *filename, int *r_len) +static void *read_file_data(const char *filepath, int *r_len) { #ifdef WIN32 - FILE *fp = fopen(filename, "rb"); + FILE *fp = fopen(filepath, "rb"); #else - FILE *fp = fopen(filename, "r"); + FILE *fp = fopen(filepath, "r"); #endif void *data; @@ -711,17 +630,17 @@ static void *read_file_data(const char *filename, int *r_len) return data; } -static int convert_include(const char *filename) +static int convert_include(const char *filepath) { /* read include file, skip structs with a '#' before it. * store all data in temporal arrays. */ int maindata_len; - char *maindata = read_file_data(filename, &maindata_len); + char *maindata = read_file_data(filepath, &maindata_len); char *md = maindata; if (maindata_len == -1) { - fprintf(stderr, "Can't read file %s\n", filename); + fprintf(stderr, "Can't read file %s\n", filepath); return 1; } @@ -759,7 +678,7 @@ static int convert_include(const char *filename) const int strct = add_type(md1, 0); if (strct == -1) { - fprintf(stderr, "File '%s' contains struct we can't parse \"%s\"\n", filename, md1); + fprintf(stderr, "File '%s' contains struct we can't parse \"%s\"\n", filepath, md1); return 1; } @@ -799,7 +718,7 @@ static int convert_include(const char *filename) fprintf(stderr, "File '%s' contains non white space character " "\"%c\" after identifier \"%s\"\n", - filename, + filepath, *md1, md1_prev); return 1; @@ -812,7 +731,7 @@ static int convert_include(const char *filename) const int type = add_type(md1, 0); if (type == -1) { fprintf( - stderr, "File '%s' contains struct we can't parse \"%s\"\n", filename, md1); + stderr, "File '%s' contains struct we can't parse \"%s\"\n", filepath, md1); return 1; } @@ -838,7 +757,7 @@ static int convert_include(const char *filename) if (name == -1) { fprintf(stderr, "File '%s' contains struct with name that can't be added \"%s\"\n", - filename, + filepath, md1); return 1; } @@ -861,7 +780,7 @@ static int convert_include(const char *filename) if (name == -1) { fprintf(stderr, "File '%s' contains struct with name that can't be added \"%s\"\n", - filename, + filepath, md1); return 1; } @@ -1617,82 +1536,9 @@ int main(int argc, char **argv) # pragma GCC poison long #endif -#include "DNA_ID.h" -#include "DNA_action_types.h" -#include "DNA_anim_types.h" -#include "DNA_armature_types.h" -#include "DNA_asset_types.h" -#include "DNA_boid_types.h" -#include "DNA_brush_types.h" -#include "DNA_cachefile_types.h" -#include "DNA_camera_types.h" -#include "DNA_cloth_types.h" -#include "DNA_collection_types.h" -#include "DNA_color_types.h" -#include "DNA_constraint_types.h" -#include "DNA_curve_types.h" -#include "DNA_curveprofile_types.h" -#include "DNA_curves_types.h" -#include "DNA_customdata_types.h" -#include "DNA_dynamicpaint_types.h" -#include "DNA_effect_types.h" -#include "DNA_fileglobal_types.h" -#include "DNA_fluid_types.h" -#include "DNA_freestyle_types.h" -#include "DNA_gpencil_modifier_types.h" -#include "DNA_gpencil_types.h" -#include "DNA_image_types.h" -#include "DNA_ipo_types.h" -#include "DNA_key_types.h" -#include "DNA_lattice_types.h" -#include "DNA_layer_types.h" -#include "DNA_light_types.h" -#include "DNA_lightprobe_types.h" -#include "DNA_lineart_types.h" -#include "DNA_linestyle_types.h" -#include "DNA_listBase.h" -#include "DNA_mask_types.h" -#include "DNA_material_types.h" -#include "DNA_mesh_types.h" -#include "DNA_meshdata_types.h" -#include "DNA_meta_types.h" -#include "DNA_modifier_types.h" -#include "DNA_movieclip_types.h" -#include "DNA_nla_types.h" -#include "DNA_node_types.h" -#include "DNA_object_fluidsim_types.h" -#include "DNA_object_force_types.h" -#include "DNA_object_types.h" -#include "DNA_outliner_types.h" -#include "DNA_packedFile_types.h" -#include "DNA_particle_types.h" -#include "DNA_pointcache_types.h" -#include "DNA_pointcloud_types.h" -#include "DNA_rigidbody_types.h" -#include "DNA_scene_types.h" -#include "DNA_screen_types.h" -#include "DNA_sdna_types.h" -#include "DNA_sequence_types.h" -#include "DNA_session_uuid_types.h" -#include "DNA_shader_fx_types.h" -#include "DNA_simulation_types.h" -#include "DNA_sound_types.h" -#include "DNA_space_types.h" -#include "DNA_speaker_types.h" -#include "DNA_text_types.h" -#include "DNA_texture_types.h" -#include "DNA_tracking_types.h" -#include "DNA_userdef_types.h" -#include "DNA_uuid_types.h" -#include "DNA_vec_types.h" -#include "DNA_vfont_types.h" -#include "DNA_view2d_types.h" -#include "DNA_view3d_types.h" -#include "DNA_volume_types.h" -#include "DNA_windowmanager_types.h" -#include "DNA_workspace_types.h" -#include "DNA_world_types.h" -#include "DNA_xr_types.h" +/* The include file below is automatically generated from the `SRC_DNA_INC` + * variable in 'source/blender/CMakeLists.txt'. */ +#include "dna_includes_all.h" /* end of list */ |