diff options
author | Julian Eisel <julian@blender.org> | 2021-03-31 23:53:03 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-03-31 23:53:03 +0300 |
commit | c7904d2398fd4d43d15268c792aa15ea8ee538fe (patch) | |
tree | 484fd7f66ac59c82abd4aca18894f991b4935483 /source/blender/makesdna | |
parent | 91b87d8d7fb8aec62faf00e5e0c3619d2753a92e (diff) | |
parent | 1a100d2d78c75c9a6ac015606cc16698e7775682 (diff) |
Merge branch 'master' into ui-asset-view-templateui-asset-view-template
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 74 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_armature_types.h | 7 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_curve_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 22 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/intern/dna_genfile.c | 5 |
7 files changed, 93 insertions, 24 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 077f9bf8bdc..d88db091cc2 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -763,19 +763,53 @@ typedef enum IDRecalcFlag { * See e.g. how #BKE_library_unused_linked_data_set_tag is doing this. */ enum { + /* Special case: Library, should never ever depend on any other type. */ INDEX_ID_LI = 0, - INDEX_ID_IP, + + /* Animation types, might be used by almost all other types. */ + INDEX_ID_IP, /* Deprecated. */ INDEX_ID_AC, - INDEX_ID_KE, - INDEX_ID_PAL, + + /* Grease Pencil, special case, should be with the other obdata, but it can also be used by many + * other ID types, including node trees e.g. + * So there is no proper place for those, for now keep close to the lower end of the processing + * hierarchy, but we may want to re-evaluate that at some point. */ INDEX_ID_GD, + + /* Node trees, abstraction for procedural data, potentially used by many other ID types. + * + * NOTE: While node trees can also use many other ID types, they should not /own/ any of those, + * while they are being owned by many other ID types. This is why they are placed here. */ INDEX_ID_NT, + + /* File-wrapper types, those usually 'embed' external files in Blender, with no dependencies to + * other ID types. */ + INDEX_ID_VF, + INDEX_ID_TXT, + INDEX_ID_SO, + + /* Image/movie types, can be used by shading ID types, but also directly by Objects, Scenes, etc. + */ + INDEX_ID_MSK, INDEX_ID_IM, + INDEX_ID_MC, + + /* Shading types. */ INDEX_ID_TE, INDEX_ID_MA, - INDEX_ID_VF, - INDEX_ID_AR, + INDEX_ID_LS, + INDEX_ID_WO, + + /* Simulation-related types. */ INDEX_ID_CF, + INDEX_ID_SIM, + INDEX_ID_PA, + + /* Shape Keys snow-flake, can be used by several obdata types. */ + INDEX_ID_KE, + + /* Object data types. */ + INDEX_ID_AR, INDEX_ID_ME, INDEX_ID_CU, INDEX_ID_MB, @@ -785,26 +819,28 @@ enum { INDEX_ID_LT, INDEX_ID_LA, INDEX_ID_CA, - INDEX_ID_TXT, - INDEX_ID_SO, - INDEX_ID_GR, - INDEX_ID_PC, - INDEX_ID_BR, - INDEX_ID_PA, INDEX_ID_SPK, INDEX_ID_LP, - INDEX_ID_WO, - INDEX_ID_MC, - INDEX_ID_SCR, + + /* Collection and object types. */ INDEX_ID_OB, - INDEX_ID_LS, + INDEX_ID_GR, + + /* Preset-like, not-really-data types, can use many other ID types but should never be used by + * any actual data type (besides Scene, due to tool settings). */ + INDEX_ID_PAL, + INDEX_ID_PC, + INDEX_ID_BR, + + /* Scene, after preset-like ID types because of tool settings. */ INDEX_ID_SCE, + + /* UI-related types, should never be used by any other data type. */ + INDEX_ID_SCR, INDEX_ID_WS, INDEX_ID_WM, - /* TODO: This should probably be tweaked, #Mask and #Simulation are rather low-level types that - * should most likely be defined //before// #Object and geometry type indices? */ - INDEX_ID_MSK, - INDEX_ID_SIM, + + /* Special values. */ INDEX_ID_NULL, INDEX_ID_MAX, }; diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 09304ce09f2..85780bc33c5 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -134,7 +134,7 @@ typedef struct bArmature { /** ID data is older than edit-mode data (TODO: move to edit-mode struct). */ char needs_flush_to_id; - char _pad0[7]; + char _pad0[3]; int flag; int drawtype; @@ -146,6 +146,9 @@ typedef struct bArmature { unsigned int layer_used; /** For buttons to work, both variables in this order together. */ unsigned int layer, layer_protected; + + /** Relative position of the axes on the bone, from head (0.0f) to tail (1.0f). */ + float axes_position; } bArmature; /* armature->flag */ @@ -230,8 +233,10 @@ typedef enum eBone_Flag { BONE_MULT_VG_ENV = (1 << 11), /** bone doesn't deform geometry */ BONE_NO_DEFORM = (1 << 12), +#ifdef DNA_DEPRECATED_ALLOW /** set to prevent destruction of its unkeyframed pose (after transform) */ BONE_UNKEYED = (1 << 13), +#endif /** set to prevent hinge child bones from influencing the transform center */ BONE_HINGE_CHILD_TRANSFORM = (1 << 14), #ifdef DNA_DEPRECATED_ALLOW diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 4f914089347..ff2e7fc500a 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -72,7 +72,7 @@ typedef struct BevPoint { float sina, cosa; /** 3D Only. */ float dir[3], tan[3], quat[4]; - short split_tag, dupe_tag; + short dupe_tag; } BevPoint; /* These two Lines with # tell makesdna this struct can be excluded. */ diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index f24d0e40d19..7b4788737f8 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -715,6 +715,12 @@ typedef struct NodeBilateralBlurData { char _pad[2]; } NodeBilateralBlurData; +typedef struct NodeAntiAliasingData { + float threshold; + float contrast_limit; + float corner_rounding; +} NodeAntiAliasingData; + /* NOTE: Only for do-version code. */ typedef struct NodeHueSat { float hue, sat, val; @@ -1108,6 +1114,14 @@ typedef struct NodeDenoise { char hdr; } NodeDenoise; +typedef struct NodeAttributeClamp { + /* CustomDataType. */ + uint8_t data_type; + + /* NodeClampOperation. */ + uint8_t operation; +} NodeAttributeClamp; + typedef struct NodeAttributeCompare { /* FloatCompareOperation. */ uint8_t operation; @@ -1119,6 +1133,14 @@ typedef struct NodeAttributeCompare { char _pad[5]; } NodeAttributeCompare; +typedef struct NodeAttributeMapRange { + /* GeometryNodeAttributeDataType */ + uint8_t data_type; + + /* NodeMapRangeType. */ + uint8_t interpolation_type; +} NodeAttributeMapRange; + typedef struct NodeAttributeMath { /* NodeMathOperation. */ uint8_t operation; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 4595b12e9d4..334669d3433 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -646,7 +646,8 @@ typedef struct UserDef_Experimental { char use_switch_object_operator; char use_sculpt_tools_tilt; char use_asset_browser; - char _pad[6]; + char use_override_templates; + char _pad[5]; /** `makesdna` does not allow empty structs. */ } UserDef_Experimental; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index b8e2256c3c6..2f4e4e57b9f 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -367,7 +367,7 @@ typedef struct View3D { #define V3D_LOCAL_COLLECTIONS (1 << 0) #define V3D_FLAG_UNUSED_1 (1 << 1) /* cleared */ #define V3D_HIDE_HELPLINES (1 << 2) -#define V3D_INVALID_BACKBUF (1 << 3) +#define V3D_FLAG_UNUSED_2 (1 << 3) /* cleared */ #define V3D_XR_SESSION_MIRROR (1 << 4) #define V3D_FLAG_UNUSED_10 (1 << 10) /* cleared */ @@ -380,6 +380,8 @@ typedef struct View3D { enum { /** The 3D view which the XR session was created in is flagged with this. */ V3D_RUNTIME_XR_SESSION_ROOT = (1 << 0), + /** Some operators override the depth buffer for dedicated occlusion operations. */ + V3D_RUNTIME_DEPTHBUF_OVERRIDDEN = (1 << 1), }; /** #RegionView3D.persp */ diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 3690a1126d4..d199638710d 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -1194,7 +1194,10 @@ static void reconstruct_struct(const DNA_ReconstructInfo *reconstruct_info, new_block + step->data.substruct.new_offset); break; case RECONSTRUCT_STEP_INIT_ZERO: - /* Do nothing, because the memory block has been calloced. */ + /* Do nothing, because the memory block are zeroed (from #MEM_callocN). + * + * Note that the struct could be initialized with the default struct, + * however this complicates versioning, especially with flags, see: D4500. */ break; } } |