diff options
Diffstat (limited to 'source/blender/makesdna')
21 files changed, 233 insertions, 157 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 060b55ffe5c..4f479abe2b0 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -534,12 +534,14 @@ typedef struct PreviewImage { #define ID_IS_LINKED(_id) (((const ID *)(_id))->lib != NULL) -/* Note that this is a fairly high-level check, should be used at user interaction level, not in +/* Note that these are fairly high-level checks, should be used at user interaction level, not in * BKE_library_override typically (especially due to the check on LIB_TAG_EXTERN). */ -#define ID_IS_OVERRIDABLE_LIBRARY(_id) \ - (ID_IS_LINKED(_id) && !ID_MISSING(_id) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0 && \ +#define ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(_id) \ + (ID_IS_LINKED(_id) && !ID_MISSING(_id) && \ (BKE_idtype_get_info_from_id((const ID *)(_id))->flags & IDTYPE_FLAGS_NO_LIBLINKING) == 0 && \ !ELEM(GS(((ID *)(_id))->name), ID_SCE)) +#define ID_IS_OVERRIDABLE_LIBRARY(_id) \ + (ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY((_id)) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0) /* NOTE: The three checks below do not take into account whether given ID is linked or not (when * chaining overrides over several libraries). User must ensure the ID is not linked itself @@ -798,7 +800,9 @@ typedef enum IDRecalcFlag { * Use this tag with a scene ID which owns the sequences. */ ID_RECALC_SEQUENCER_STRIPS = (1 << 14), - ID_RECALC_AUDIO_SEEK = (1 << 15), + /* Runs on frame-change (used for seeking audio too). */ + ID_RECALC_FRAME_CHANGE = (1 << 15), + ID_RECALC_AUDIO_FPS = (1 << 16), ID_RECALC_AUDIO_VOLUME = (1 << 17), ID_RECALC_AUDIO_MUTE = (1 << 18), @@ -886,7 +890,7 @@ typedef enum IDRecalcFlag { #define FILTER_ID_CF (1ULL << 28) #define FILTER_ID_WS (1ULL << 29) #define FILTER_ID_LP (1ULL << 31) -#define FILTER_ID_HA (1ULL << 32) +#define FILTER_ID_CV (1ULL << 32) #define FILTER_ID_PT (1ULL << 33) #define FILTER_ID_VO (1ULL << 34) #define FILTER_ID_SIM (1ULL << 35) @@ -897,7 +901,7 @@ typedef enum IDRecalcFlag { FILTER_ID_MB | FILTER_ID_MC | FILTER_ID_ME | FILTER_ID_MSK | FILTER_ID_NT | FILTER_ID_OB | \ FILTER_ID_PA | FILTER_ID_PAL | FILTER_ID_PC | FILTER_ID_SCE | FILTER_ID_SPK | FILTER_ID_SO | \ FILTER_ID_TE | FILTER_ID_TXT | FILTER_ID_VF | FILTER_ID_WO | FILTER_ID_CF | FILTER_ID_WS | \ - FILTER_ID_LP | FILTER_ID_HA | FILTER_ID_PT | FILTER_ID_VO | FILTER_ID_SIM) + FILTER_ID_LP | FILTER_ID_CV | FILTER_ID_PT | FILTER_ID_VO | FILTER_ID_SIM) /** * This enum defines the index assigned to each type of IDs in the array returned by @@ -980,7 +984,7 @@ enum { INDEX_ID_ME, INDEX_ID_CU, INDEX_ID_MB, - INDEX_ID_HA, + INDEX_ID_CV, INDEX_ID_PT, INDEX_ID_VO, INDEX_ID_LT, diff --git a/source/blender/makesdna/DNA_ID_enums.h b/source/blender/makesdna/DNA_ID_enums.h index 45faf9e7f57..839c1e8933f 100644 --- a/source/blender/makesdna/DNA_ID_enums.h +++ b/source/blender/makesdna/DNA_ID_enums.h @@ -90,7 +90,7 @@ typedef enum ID_Type { ID_CF = MAKE_ID2('C', 'F'), /* CacheFile */ ID_WS = MAKE_ID2('W', 'S'), /* WorkSpace */ ID_LP = MAKE_ID2('L', 'P'), /* LightProbe */ - ID_HA = MAKE_ID2('H', 'A'), /* Hair */ + ID_CV = MAKE_ID2('C', 'V'), /* Curves */ ID_PT = MAKE_ID2('P', 'T'), /* PointCloud */ ID_VO = MAKE_ID2('V', 'O'), /* Volume */ ID_SIM = MAKE_ID2('S', 'I'), /* Simulation (geometry node groups) */ diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 82b20483902..1ca724b7108 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -478,9 +478,6 @@ typedef struct bPose { short flag; char _pad[2]; - /** Proxy layer: copy from armature, gets synced. */ - unsigned int proxy_layer; - char _pad1[4]; /** Local action time of this pose. */ float ctime; @@ -503,8 +500,6 @@ typedef struct bPose { /** Settings for visualization of bone animation. */ bAnimVizSettings avs; - /** Proxy active bone name, MAXBONENAME. */ - char proxy_act_bone[64]; } bPose; /* Pose->flag */ diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 566ffd19669..1005b5186aa 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -77,7 +77,7 @@ typedef struct Bone { /** dist, weight: for non-deformgroup deforms. */ float dist, weight; /** - * The width for block bones. + * The width for block bones. The final X/Z bone widths are double these values. * * \note keep in this order for transform code which stores a pointer to `xwidth`, * accessing length and `zwidth` as offsets. diff --git a/source/blender/makesdna/DNA_brush_enums.h b/source/blender/makesdna/DNA_brush_enums.h index 68e50c5b29d..2f41389f2c6 100644 --- a/source/blender/makesdna/DNA_brush_enums.h +++ b/source/blender/makesdna/DNA_brush_enums.h @@ -522,7 +522,7 @@ typedef enum eBrushUVSculptTool { SCULPT_TOOL_SLIDE_RELAX, \ SCULPT_TOOL_MASK) == 0) -/* ImagePaintSettings.tool */ +/** #ImagePaintSettings.tool */ typedef enum eBrushImagePaintTool { PAINT_TOOL_DRAW = 0, PAINT_TOOL_SOFTEN = 1, @@ -534,7 +534,7 @@ typedef enum eBrushImagePaintTool { /* The enums here should be kept in sync with the weight paint tool. * This is because #smooth_brush_toggle_on and #smooth_brush_toggle_off - * assumes that the Blur blursh has the same enum value. */ + * assumes that the blur brush has the same enum value. */ typedef enum eBrushVertexPaintTool { VPAINT_TOOL_DRAW = 0, VPAINT_TOOL_BLUR = 1, diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index d587bd8082b..53b1a60e53e 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -714,8 +714,6 @@ typedef enum eBConstraint_Flags { CONSTRAINT_SPACEONCE = (1 << 6), /* influence ipo is on constraint itself, not in action channel */ CONSTRAINT_OWN_IPO = (1 << 7), - /* indicates that constraint was added locally (i.e. didn't come from the proxy-lib) */ - CONSTRAINT_PROXY_LOCAL = (1 << 8), /* indicates that constraint is temporarily disabled (only used in GE) */ CONSTRAINT_OFF = (1 << 9), /* use bbone curve shape when calculating headtail values (also used by dependency graph!) */ diff --git a/source/blender/makesdna/DNA_hair_defaults.h b/source/blender/makesdna/DNA_curves_defaults.h index 095e4fdf583..66c7a1bd71b 100644 --- a/source/blender/makesdna/DNA_hair_defaults.h +++ b/source/blender/makesdna/DNA_curves_defaults.h @@ -24,10 +24,10 @@ /* clang-format off */ /* -------------------------------------------------------------------- */ -/** \name Hair Struct +/** \name Curves Struct * \{ */ -#define _DNA_DEFAULT_Hair \ +#define _DNA_DEFAULT_Curves \ { \ .flag = 0, \ } diff --git a/source/blender/makesdna/DNA_curves_types.h b/source/blender/makesdna/DNA_curves_types.h new file mode 100644 index 00000000000..c7f31557e48 --- /dev/null +++ b/source/blender/makesdna/DNA_curves_types.h @@ -0,0 +1,108 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup DNA + */ + +#pragma once + +#include "DNA_ID.h" +#include "DNA_customdata_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * A reusable data structure for geometry consisting of many curves. All control point data is + * stored contiguously for better efficiency. Data for each curve is stored as a slice of the + * main #point_data array. + * + * The data structure is meant to be embedded in other data-blocks to allow reusing + * curve-processing algorithms for multiple Blender data-block types. + */ +typedef struct CurvesGeometry { + /** + * A runtime pointer to the "position" attribute data. + * \note This data is owned by #point_data. + */ + float (*position)[3]; + /** + * A runtime pointer to the "radius" attribute data. + * \note This data is owned by #point_data. + */ + float *radius; + + /** + * The start index of each curve in the point data. The size of each curve can be calculated by + * subtracting the offset from the next offset. That is valid even for the last curve because + * this array is allocated with a length one larger than the number of splines. + * + * \note This is *not* stored in #CustomData because its size is one larger than #curve_data. + */ + int *offsets; + + /** + * All attributes stored on control points (#ATTR_DOMAIN_POINT). + */ + CustomData point_data; + + /** + * All attributes stored on curves (#ATTR_DOMAIN_CURVE). + */ + CustomData curve_data; + + /** + * The total number of control points in all curves. + */ + int point_size; + /** + * The number of curves in the data-block. + */ + int curve_size; +} CurvesGeometry; + +typedef struct Curves { + ID id; + /* Animation data (must be immediately after id). */ + struct AnimData *adt; + + CurvesGeometry geometry; + + int flag; + int attributes_active_index; + + /* Materials. */ + struct Material **mat; + short totcol; + short _pad2[3]; + + /* Draw Cache. */ + void *batch_cache; +} Curves; + +/* Curves.flag */ +enum { + HA_DS_EXPAND = (1 << 0), +}; + +/* Only one material supported currently. */ +#define CURVES_MATERIAL_NR 1 + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 629a5e88de7..9c34d78c944 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -162,8 +162,8 @@ typedef enum CustomDataType { /* CD_LOCATION = 43, */ /* UNUSED */ /* CD_RADIUS = 44, */ /* UNUSED */ - CD_HAIRCURVE = 45, - CD_HAIRMAPPING = 46, + CD_PROP_INT8 = 45, + /* CD_HAIRMAPPING = 46, */ /* UNUSED, can be reused. */ CD_PROP_COLOR = 47, CD_PROP_FLOAT3 = 48, @@ -223,6 +223,7 @@ typedef enum CustomDataType { #define CD_MASK_PROP_FLOAT3 (1ULL << CD_PROP_FLOAT3) #define CD_MASK_PROP_FLOAT2 (1ULL << CD_PROP_FLOAT2) #define CD_MASK_PROP_BOOL (1ULL << CD_PROP_BOOL) +#define CD_MASK_PROP_INT8 (1ULL << CD_PROP_INT8) #define CD_MASK_HAIRLENGTH (1ULL << CD_HAIRLENGTH) @@ -235,7 +236,8 @@ typedef enum CustomDataType { /* All generic attributes. */ #define CD_MASK_PROP_ALL \ (CD_MASK_PROP_FLOAT | CD_MASK_PROP_FLOAT2 | CD_MASK_PROP_FLOAT3 | CD_MASK_PROP_INT32 | \ - CD_MASK_PROP_COLOR | CD_MASK_PROP_STRING | CD_MASK_MLOOPCOL | CD_MASK_PROP_BOOL) + CD_MASK_PROP_COLOR | CD_MASK_PROP_STRING | CD_MASK_MLOOPCOL | CD_MASK_PROP_BOOL | \ + CD_MASK_PROP_INT8) typedef struct CustomData_MeshMasks { uint64_t vmask; diff --git a/source/blender/makesdna/DNA_hair_types.h b/source/blender/makesdna/DNA_hair_types.h deleted file mode 100644 index 2e819b32033..00000000000 --- a/source/blender/makesdna/DNA_hair_types.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -/** \file - * \ingroup DNA - */ - -#pragma once - -#include "DNA_ID.h" -#include "DNA_customdata_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct HairCurve { - /* Index of first point of hair curve. */ - int firstpoint; - /* Number of points in hair curve, must be 2 or higher. */ - int numpoints; -} HairCurve; - -/* Hair attachment to a mesh. - * TODO: attach to tessellated triangles or polygons? - * TODO: what type of interpolation to use for uv? */ -typedef struct HairMapping { - float uv[2]; - int poly; -} HairMapping; - -typedef struct Hair { - ID id; - struct AnimData *adt; /* animation data (must be immediately after id) */ - - int flag; - int _pad1[1]; - - /* Geometry */ - float (*co)[3]; - float *radius; - struct HairCurve *curves; - struct HairMaping *mapping; - int totpoint; - int totcurve; - - /* Custom Data */ - struct CustomData pdata; - struct CustomData cdata; - int attributes_active_index; - int _pad3; - - /* Material */ - struct Material **mat; - short totcol; - short _pad2[3]; - - /* Draw Cache */ - void *batch_cache; -} Hair; - -/* Hair.flag */ -enum { - HA_DS_EXPAND = (1 << 0), -}; - -/* Only one material supported currently. */ -#define HAIR_MATERIAL_NR 1 - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index 64c8fd3e3a9..7a789227128 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -142,10 +142,20 @@ typedef enum eImageTextureResolution { IMA_TEXTURE_RESOLUTION_LEN } eImageTextureResolution; +/* Defined in BKE_image.h. */ +struct PartialUpdateRegister; +struct PartialUpdateUser; + typedef struct Image_Runtime { /* Mutex used to guarantee thread-safe access to the cached ImBuf of the corresponding image ID. */ void *cache_mutex; + + /** \brief Register containing partial updates. */ + struct PartialUpdateRegister *partial_update_register; + /** \brief Partial update user for GPUTextures stored inside the Image. */ + struct PartialUpdateUser *partial_update_user; + } Image_Runtime; typedef struct Image { @@ -171,8 +181,6 @@ typedef struct Image { int lastframe; /* GPU texture flag. */ - /* Contains `ImagePartialRefresh`. */ - ListBase gpu_refresh_areas; int gpuframenr; short gpuflag; short gpu_pass; @@ -247,15 +255,13 @@ enum { enum { /** GPU texture needs to be refreshed. */ IMA_GPU_REFRESH = (1 << 0), - /** GPU texture needs to be partially refreshed. */ - IMA_GPU_PARTIAL_REFRESH = (1 << 1), /** All mipmap levels in OpenGL texture set? */ - IMA_GPU_MIPMAP_COMPLETE = (1 << 2), + IMA_GPU_MIPMAP_COMPLETE = (1 << 1), /* Reuse the max resolution textures as they fit in the limited scale. */ - IMA_GPU_REUSE_MAX_RESOLUTION = (1 << 3), + IMA_GPU_REUSE_MAX_RESOLUTION = (1 << 2), /* Has any limited scale textures been allocated. * Adds additional checks to reuse max resolution images when they fit inside limited scale. */ - IMA_GPU_HAS_LIMITED_SCALE_TEXTURES = (1 << 4), + IMA_GPU_HAS_LIMITED_SCALE_TEXTURES = (1 << 3), }; /* Image.source, where the image comes from */ diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 22c523901c0..f2493bd5b85 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -48,7 +48,6 @@ typedef struct MVert { /** #MVert.flag */ enum { /* SELECT = (1 << 0), */ - ME_VERT_TMP_TAG = (1 << 2), ME_HIDE = (1 << 4), ME_VERT_FACEDOT = (1 << 5), /* ME_VERT_MERGED = (1 << 6), */ @@ -266,6 +265,9 @@ typedef struct MStringProperty { typedef struct MBoolProperty { uint8_t b; } MBoolProperty; +typedef struct MInt8Property { + int8_t i; +} MInt8Property; /** \} */ diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 1d0796bda8b..8e38d52a4d7 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -128,15 +128,11 @@ typedef struct ModifierData { char *error; - /** Pointer to a #ModifierData in the original domain. */ - struct ModifierData *orig_modifier_data; - /** Runtime field which contains unique identifier of the modifier. */ SessionUUID session_uuid; /** Runtime field which contains runtime data which is specific to a modifier type. */ void *runtime; - void *_pad1; } ModifierData; typedef enum { @@ -1012,7 +1008,8 @@ typedef struct MeshDeformModifierData { float *bindcos; /* runtime */ - void (*bindfunc)(struct MeshDeformModifierData *mmd, + void (*bindfunc)(struct Object *object, + struct MeshDeformModifierData *mmd, struct Mesh *cagemesh, float *vertexcos, int totvert, diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 13f332f83fd..fd77e8b9f1d 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -514,8 +514,10 @@ typedef struct bNodeTree { /** Information about how inputs and outputs of the node group interact with fields. */ FieldInferencingInterfaceHandle *field_inferencing_interface; - /** Set init on fileread. */ - int type, init; + int type; + + char _pad1[4]; + /** * Sockets in groups have unique identifiers, adding new sockets always * will increase this counter. @@ -599,9 +601,6 @@ typedef struct bNodeTree { #define NTREE_TEXTURE 2 #define NTREE_GEOMETRY 3 -/** #NodeTree.init, flag */ -#define NTREE_TYPE_INIT 1 - /** #NodeTree.flag */ #define NTREE_DS_EXPAND (1 << 0) /* for animation editors */ #define NTREE_COM_OPENCL (1 << 1) /* use opencl */ @@ -1616,7 +1615,8 @@ typedef struct NodeGeometryStringToCurves { uint8_t align_x; /* GeometryNodeStringToCurvesAlignYMode */ uint8_t align_y; - char _pad[1]; + /* GeometryNodeStringToCurvesPivotMode */ + uint8_t pivot_mode; } NodeGeometryStringToCurves; typedef struct NodeGeometryDeleteGeometry { @@ -1848,7 +1848,6 @@ enum { /* math node clamp */ #define SHD_MATH_CLAMP 1 -/** Math node operations. */ typedef enum NodeMathOperation { NODE_MATH_ADD = 0, NODE_MATH_SUBTRACT = 1, @@ -1892,7 +1891,6 @@ typedef enum NodeMathOperation { NODE_MATH_SMOOTH_MAX = 39, } NodeMathOperation; -/** Vector Math node operations. */ typedef enum NodeVectorMathOperation { NODE_VECTOR_MATH_ADD = 0, NODE_VECTOR_MATH_SUBTRACT = 1, @@ -1926,14 +1924,20 @@ typedef enum NodeVectorMathOperation { NODE_VECTOR_MATH_MULTIPLY_ADD = 26, } NodeVectorMathOperation; -/** Boolean math node operations. */ -enum { +typedef enum NodeBooleanMathOperation { NODE_BOOLEAN_MATH_AND = 0, NODE_BOOLEAN_MATH_OR = 1, NODE_BOOLEAN_MATH_NOT = 2, -}; -/** Float compare node operations. */ + NODE_BOOLEAN_MATH_NAND = 3, + NODE_BOOLEAN_MATH_NOR = 4, + NODE_BOOLEAN_MATH_XNOR = 5, + NODE_BOOLEAN_MATH_XOR = 6, + + NODE_BOOLEAN_MATH_IMPLY = 7, + NODE_BOOLEAN_MATH_NIMPLY = 8, +} NodeBooleanMathOperation; + typedef enum NodeCompareMode { NODE_COMPARE_MODE_ELEMENT = 0, NODE_COMPARE_MODE_LENGTH = 1, @@ -1951,10 +1955,8 @@ typedef enum NodeCompareOperation { NODE_COMPARE_NOT_EQUAL = 5, NODE_COMPARE_COLOR_BRIGHTER = 6, NODE_COMPARE_COLOR_DARKER = 7, - } NodeCompareOperation; -/** Float to Int node operations. */ typedef enum FloatToIntRoundingMode { FN_NODE_FLOAT_TO_INT_ROUND = 0, FN_NODE_FLOAT_TO_INT_FLOOR = 1, @@ -2342,6 +2344,16 @@ typedef enum GeometryNodeStringToCurvesAlignYMode { GEO_NODE_STRING_TO_CURVES_ALIGN_Y_BOTTOM = 4, } GeometryNodeStringToCurvesAlignYMode; +typedef enum GeometryNodeStringToCurvesPivotMode { + GEO_NODE_STRING_TO_CURVES_PIVOT_MODE_MIDPOINT = 0, + GEO_NODE_STRING_TO_CURVES_PIVOT_MODE_TOP_LEFT = 1, + GEO_NODE_STRING_TO_CURVES_PIVOT_MODE_TOP_CENTER = 2, + GEO_NODE_STRING_TO_CURVES_PIVOT_MODE_TOP_RIGHT = 3, + GEO_NODE_STRING_TO_CURVES_PIVOT_MODE_BOTTOM_LEFT = 4, + GEO_NODE_STRING_TO_CURVES_PIVOT_MODE_BOTTOM_CENTER = 5, + GEO_NODE_STRING_TO_CURVES_PIVOT_MODE_BOTTOM_RIGHT = 6, +} GeometryNodeStringToCurvesPivotMode; + typedef enum GeometryNodeDeleteGeometryMode { GEO_NODE_DELETE_GEOMETRY_MODE_ALL = 0, GEO_NODE_DELETE_GEOMETRY_MODE_EDGE_FACE = 1, diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 5cce7ec5f67..ca8696d1326 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -181,6 +181,12 @@ typedef struct Object_Runtime { */ struct Mesh *mesh_deform_eval; + /* Evaluated mesh cage in edit mode. */ + struct Mesh *editmesh_eval_cage; + + /** Cached cage bounding box of `editmesh_eval_cage` for selection. */ + struct BoundBox *editmesh_bb_cage; + /** * Original grease pencil bGPdata pointer, before object->data was changed to point * to gpd_eval. @@ -210,6 +216,12 @@ typedef struct Object_Runtime { unsigned short local_collections_bits; short _pad2[3]; + + float (*crazyspace_deform_imats)[3][3]; + float (*crazyspace_deform_cos)[3]; + int crazyspace_num_verts; + + int _pad3[3]; } Object_Runtime; typedef struct ObjectLineArt { @@ -251,9 +263,10 @@ typedef struct Object { /** String describing subobject info, MAX_ID_NAME-2. */ char parsubstr[64]; struct Object *parent, *track; - /* If `ob->proxy` (or proxy_group), this object is proxy for object `ob->proxy`. */ - /* proxy_from is set in target back to the proxy. */ - struct Object *proxy, *proxy_group, *proxy_from; + /* Proxy pointer are deprecated, only kept for conversion to liboverrides. */ + struct Object *proxy DNA_DEPRECATED; + struct Object *proxy_group DNA_DEPRECATED; + struct Object *proxy_from DNA_DEPRECATED; /** Old animation system, deprecated for 2.5. */ struct Ipo *ipo DNA_DEPRECATED; /* struct Path *path; */ @@ -492,7 +505,7 @@ enum { /** Grease Pencil object used in 3D view but not used for annotation in 2D. */ OB_GPENCIL = 26, - OB_HAIR = 27, + OB_CURVES = 27, OB_POINTCLOUD = 28, @@ -507,7 +520,15 @@ enum { (((_type) >= OB_MESH && (_type) <= OB_MBALL) || ((_type) >= OB_GPENCIL && (_type) <= OB_VOLUME)) /** Does the object have some render-able geometry (unlike empties, cameras, etc.). */ #define OB_TYPE_IS_GEOMETRY(_type) \ - (ELEM(_type, OB_MESH, OB_SURF, OB_FONT, OB_MBALL, OB_GPENCIL, OB_HAIR, OB_POINTCLOUD, OB_VOLUME)) + (ELEM(_type, \ + OB_MESH, \ + OB_SURF, \ + OB_FONT, \ + OB_MBALL, \ + OB_GPENCIL, \ + OB_CURVES, \ + OB_POINTCLOUD, \ + OB_VOLUME)) #define OB_TYPE_SUPPORT_VGROUP(_type) (ELEM(_type, OB_MESH, OB_LATTICE, OB_GPENCIL)) #define OB_TYPE_SUPPORT_EDITMODE(_type) \ (ELEM(_type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE)) @@ -529,7 +550,7 @@ enum { ID_LT, \ ID_GD, \ ID_AR, \ - ID_HA, \ + ID_CV, \ ID_PT, \ ID_VO)) @@ -544,7 +565,7 @@ enum { case ID_LT: \ case ID_GD: \ case ID_AR: \ - case ID_HA: \ + case ID_CV: \ case ID_PT: \ case ID_VO diff --git a/source/blender/makesdna/DNA_outliner_types.h b/source/blender/makesdna/DNA_outliner_types.h index a50d0524998..71a5c0eb2e5 100644 --- a/source/blender/makesdna/DNA_outliner_types.h +++ b/source/blender/makesdna/DNA_outliner_types.h @@ -101,7 +101,7 @@ typedef enum eTreeStoreElemType { TSE_DRIVER_BASE = 16, /* NO ID */ /* TSE_DRIVER = 17, */ /* UNUSED */ - TSE_PROXY = 18, + /* TSE_PROXY = 18, */ /* UNUSED */ TSE_R_LAYER_BASE = 19, TSE_R_LAYER = 20, /* TSE_R_PASS = 21, */ /* UNUSED */ diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 5fe67a34dae..70f0dc3f5de 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -80,6 +80,7 @@ typedef struct StripTransform { float rotation; /** 0-1 range, use SEQ_image_transform_origin_offset_pixelspace_get to convert to pixel space. */ float origin[2]; + int filter; } StripTransform; typedef struct StripColorBalance { @@ -788,6 +789,12 @@ typedef enum SequenceColorTag { SEQUENCE_COLOR_TOT, } SequenceColorTag; +/* Sequence->StripTransform->filter */ +enum { + SEQ_TRANSFORM_FILTER_NEAREST = 0, + SEQ_TRANSFORM_FILTER_BILINEAR = 1, +}; + #ifdef __cplusplus } #endif diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 15bb1ef920d..d1b015485c9 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -651,7 +651,6 @@ typedef struct UserDef_Experimental { /* Debug options, always available. */ char use_undo_legacy; char no_override_auto_resync; - char no_proxy_to_override_conversion; char use_cycles_debug; char use_geometry_nodes_legacy; char show_asset_debug_info; @@ -659,14 +658,14 @@ typedef struct UserDef_Experimental { char SANITIZE_AFTER_HERE; /* The following options are automatically sanitized (set to 0) * when the release cycle is not alpha. */ - char use_new_hair_type; + char use_new_curves_type; char use_new_point_cloud_type; char use_full_frame_compositor; char use_sculpt_vertex_colors; char use_sculpt_tools_tilt; char use_extended_asset_browser; char use_override_templates; - char _pad[1]; + char _pad[2]; /** `makesdna` does not allow empty structs. */ } UserDef_Experimental; @@ -1253,7 +1252,7 @@ typedef enum eDupli_ID_Flags { USER_DUP_PSYS = (1 << 11), USER_DUP_LIGHTPROBE = (1 << 12), USER_DUP_GPENCIL = (1 << 13), - USER_DUP_HAIR = (1 << 14), + USER_DUP_CURVES = (1 << 14), USER_DUP_POINTCLOUD = (1 << 15), USER_DUP_VOLUME = (1 << 16), USER_DUP_LATTICE = (1 << 17), diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt index a3c54e91780..af30fa5cc9e 100644 --- a/source/blender/makesdna/intern/CMakeLists.txt +++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -142,7 +142,7 @@ set(SRC ../DNA_defaults.h ../DNA_fluid_defaults.h ../DNA_gpencil_modifier_defaults.h - ../DNA_hair_defaults.h + ../DNA_curves_defaults.h ../DNA_image_defaults.h ../DNA_lattice_defaults.h ../DNA_light_defaults.h diff --git a/source/blender/makesdna/intern/dna_defaults.c b/source/blender/makesdna/intern/dna_defaults.c index 5bc5de7a20b..fd23c5c618f 100644 --- a/source/blender/makesdna/intern/dna_defaults.c +++ b/source/blender/makesdna/intern/dna_defaults.c @@ -94,9 +94,9 @@ #include "DNA_cloth_types.h" #include "DNA_collection_types.h" #include "DNA_curve_types.h" +#include "DNA_curves_types.h" #include "DNA_fluid_types.h" #include "DNA_gpencil_modifier_types.h" -#include "DNA_hair_types.h" #include "DNA_image_types.h" #include "DNA_key_types.h" #include "DNA_lattice_types.h" @@ -127,9 +127,9 @@ #include "DNA_camera_defaults.h" #include "DNA_collection_defaults.h" #include "DNA_curve_defaults.h" +#include "DNA_curves_defaults.h" #include "DNA_fluid_defaults.h" #include "DNA_gpencil_modifier_defaults.h" -#include "DNA_hair_defaults.h" #include "DNA_image_defaults.h" #include "DNA_lattice_defaults.h" #include "DNA_light_defaults.h" @@ -184,8 +184,8 @@ SDNA_DEFAULT_DECL_STRUCT(FluidEffectorSettings); /* DNA_image_defaults.h */ SDNA_DEFAULT_DECL_STRUCT(Image); -/* DNA_hair_defaults.h */ -SDNA_DEFAULT_DECL_STRUCT(Hair); +/* DNA_curves_defaults.h */ +SDNA_DEFAULT_DECL_STRUCT(Curves); /* DNA_lattice_defaults.h */ SDNA_DEFAULT_DECL_STRUCT(Lattice); @@ -392,8 +392,8 @@ const void *DNA_default_table[SDNA_TYPE_MAX] = { /* DNA_image_defaults.h */ SDNA_DEFAULT_DECL(Image), - /* DNA_hair_defaults.h */ - SDNA_DEFAULT_DECL(Hair), + /* DNA_curves_defaults.h */ + SDNA_DEFAULT_DECL(Curves), /* DNA_lattice_defaults.h */ SDNA_DEFAULT_DECL(Lattice), diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 114c0b40407..b61f5315020 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -134,7 +134,7 @@ static const char *includefiles[] = { "DNA_lightprobe_types.h", "DNA_curveprofile_types.h", "DNA_xr_types.h", - "DNA_hair_types.h", + "DNA_curves_types.h", "DNA_pointcloud_types.h", "DNA_volume_types.h", "DNA_simulation_types.h", @@ -1555,8 +1555,18 @@ int main(int argc, char **argv) base_directory = BASE_HEADER; } + /* NOTE: #init_structDNA() in dna_genfile.c expects `sdna->data` is 4-bytes aligned. + * `DNAstr[]` buffer written by `makesdna` is used for this data, so make `DNAstr` forcefully + * 4-bytes aligned. */ +#ifdef __GNUC__ +# define FORCE_ALIGN_4 " __attribute__((aligned(4))) " +#else +# define FORCE_ALIGN_4 " " +#endif fprintf(file_dna, "extern const unsigned char DNAstr[];\n"); - fprintf(file_dna, "const unsigned char DNAstr[] = {\n"); + fprintf(file_dna, "const unsigned char" FORCE_ALIGN_4 "DNAstr[] = {\n"); +#undef FORCE_ALIGN_4 + if (make_structDNA(base_directory, file_dna, file_dna_offsets, file_dna_verify)) { /* error */ fclose(file_dna); @@ -1634,7 +1644,7 @@ int main(int argc, char **argv) #include "DNA_freestyle_types.h" #include "DNA_gpencil_modifier_types.h" #include "DNA_gpencil_types.h" -#include "DNA_hair_types.h" +#include "DNA_curves_types.h" #include "DNA_image_types.h" #include "DNA_ipo_types.h" #include "DNA_key_types.h" |