diff options
author | Hans Goudey <h.goudey@me.com> | 2020-06-05 18:34:10 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-06-05 18:34:10 +0300 |
commit | 76e9cdc90a43458ab0bb5d66883631f9dc5fe53b (patch) | |
tree | af531a8989c7bad0bc8d3020a5ef61ac0096c315 /source/blender/makesdna | |
parent | 8a971c9d91fafaa77fcb320bfd1f25e7e905dce2 (diff) | |
parent | 9b099c86123fc828a194c59ce5b8bbf5a56f9cdb (diff) |
Merge branch 'master' into modifier-panels-ui
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_brush_types.h | 9 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_curve_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_customdata_types.h | 8 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_mesh_types.h | 29 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_meshdata_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_modifier_types.h | 6 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 7 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view3d_defaults.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 17 |
12 files changed, 74 insertions, 20 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 39f22fb9555..4f2bbc4ee73 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -327,7 +327,7 @@ typedef struct Library { /* Temp data needed by read/write code. */ int temp_index; - /** See BLENDER_VERSION, BLENDER_SUBVERSION, needed for do_versions. */ + /** See BLENDER_FILE_VERSION, BLENDER_FILE_SUBVERSION, needed for do_versions. */ short versionfile, subversionfile; } Library; diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index c143c2a442a..be7c894b4e4 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -331,9 +331,15 @@ typedef enum eBrushClothForceFalloffType { BRUSH_CLOTH_FORCE_FALLOFF_PLANE = 1, } eBrushClothForceFalloffType; +typedef enum eBrushPoseDeformType { + BRUSH_POSE_DEFORM_ROTATE_TWIST = 0, + BRUSH_POSE_DEFORM_SCALE_TRASLATE = 1, +} eBrushPoseDeformType; + typedef enum eBrushPoseOriginType { BRUSH_POSE_ORIGIN_TOPOLOGY = 0, BRUSH_POSE_ORIGIN_FACE_SETS = 1, + BRUSH_POSE_ORIGIN_FACE_SETS_FK = 2, } eBrushPoseOriginType; /* Gpencilsettings.Vertex_mode */ @@ -478,7 +484,7 @@ typedef struct Brush { char gpencil_sculpt_tool; /** Active grease pencil weight tool. */ char gpencil_weight_tool; - char _pad1[6]; + char _pad1[2]; float autosmooth_factor; @@ -510,6 +516,7 @@ typedef struct Brush { float elastic_deform_volume_preservation; /* pose */ + int pose_deform_type; float pose_offset; int pose_smooth_iterations; int pose_ik_segments; diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 6a081a7f5a7..b2902407a15 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -496,11 +496,11 @@ typedef enum eBezTriple_KeyframeType { #define BEZT_ISSEL_ALL(bezt) \ (((bezt)->f2 & SELECT) && ((bezt)->f1 & SELECT) && ((bezt)->f3 & SELECT)) #define BEZT_ISSEL_ALL_HIDDENHANDLES(v3d, bezt) \ - ((((v3d) != NULL) && ((v3d)->overlay.edit_flag & V3D_OVERLAY_EDIT_CU_HANDLES) == 0) ? \ + ((((v3d) != NULL) && ((v3d)->overlay.handle_display == CURVE_HANDLE_NONE)) ? \ (bezt)->f2 & SELECT : \ BEZT_ISSEL_ALL(bezt)) #define BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, bezt) \ - ((((v3d) != NULL) && ((v3d)->overlay.edit_flag & V3D_OVERLAY_EDIT_CU_HANDLES) == 0) ? \ + ((((v3d) != NULL) && ((v3d)->overlay.handle_display == CURVE_HANDLE_NONE)) ? \ (bezt)->f2 & SELECT : \ BEZT_ISSEL_ANY(bezt)) diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index e99d7fd5609..ef3b2015758 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -76,7 +76,8 @@ typedef struct CustomData { * MUST be >= CD_NUMTYPES, but we cant use a define here. * Correct size is ensured in CustomData_update_typemap assert(). */ - int typemap[47]; + int typemap[48]; + char _pad[4]; /** Number of layers, size of layers array. */ int totlayer, maxlayer; /** In editmode, total size of all data layers. */ @@ -153,7 +154,9 @@ typedef enum CustomDataType { CD_HAIRCURVE = 45, CD_HAIRMAPPING = 46, - CD_NUMTYPES = 47, + CD_PROP_COLOR = 47, + + CD_NUMTYPES = 48, } CustomDataType; /* Bits for CustomDataMask */ @@ -202,6 +205,7 @@ typedef enum CustomDataType { #define CD_MASK_TESSLOOPNORMAL (1LL << CD_TESSLOOPNORMAL) #define CD_MASK_CUSTOMLOOPNORMAL (1LL << CD_CUSTOMLOOPNORMAL) #define CD_MASK_SCULPT_FACE_SETS (1LL << CD_SCULPT_FACE_SETS) +#define CD_MASK_PROP_COLOR (1LL << CD_PROP_COLOR) /** Data types that may be defined for all mesh elements types. */ #define CD_MASK_GENERIC_DATA (CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR) diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index dc1a2b5ff1d..acc020ec710 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -33,6 +33,7 @@ extern "C" { #endif struct AnimData; +struct BVHCache; struct Ipo; struct Key; struct LinkNode; @@ -99,8 +100,8 @@ typedef struct Mesh_Runtime { struct MLoopTri_Store looptris; - /** 'BVHCache', for 'BKE_bvhutil.c' */ - struct LinkNode *bvh_cache; + /** `BVHCache` defined in 'BKE_bvhutil.c' */ + struct BVHCache *bvh_cache; /** Non-manifold boundary data for Shrinkwrap Target Project. */ struct ShrinkwrapBoundaryData *shrinkwrap_data; @@ -112,7 +113,20 @@ typedef struct Mesh_Runtime { * In the future we may leave the mesh-data empty * since its not needed if we can use edit-mesh data. */ char is_original; - char _pad[6]; + + /** #eMeshWrapperType and others. */ + char wrapper_type; + /** + * A type mask from wrapper_type, + * in case there are differences in finalizing logic between types. + */ + char wrapper_type_finalize; + + char _pad[4]; + + /** Needed in case we need to lazily initialize the mesh. */ + CustomData_MeshMasks cd_mask_extra; + } Mesh_Runtime; typedef struct Mesh { @@ -228,6 +242,15 @@ typedef struct TFace { /* **************** MESH ********************* */ +/** #Mesh_Runtime.wrapper_type */ +typedef enum eMeshWrapperType { + /** Use mesh data (#Mesh.mvert,#Mesh.medge, #Mesh.mloop, #Mesh.mpoly). */ + ME_WRAPPER_TYPE_MDATA = 0, + /** Use edit-mesh data (#Mesh.#edit_mesh, #Mesh_Runtime.edit_data). */ + ME_WRAPPER_TYPE_BMESH = 1, + /* ME_WRAPPER_TYPE_SUBD = 2, */ /* TODO */ +} eMeshWrapperType; + /* texflag */ enum { ME_AUTOSPACE = 1, diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index f48024cd55a..04deecde43e 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -344,6 +344,10 @@ typedef struct MLoopCol { unsigned char r, g, b, a; } MLoopCol; +typedef struct MPropCol { + float col[4]; +} MPropCol; + /** Multi-Resolution loop data. */ typedef struct MDisps { /* Strange bug in SDNA: if disps pointer comes first, it fails to see totdisp */ diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 609d3782997..a2b96ac2772 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -1418,7 +1418,7 @@ typedef struct WeightVGEditModifierData { /* WeightVGEdit flags. */ enum { - /* (1 << 0) is free for future use! */ + MOD_WVG_EDIT_WEIGHTS_NORMALIZE = (1 << 0), MOD_WVG_INVERT_FALLOFF = (1 << 1), MOD_WVG_EDIT_INVERT_VGROUP_MASK = (1 << 2), /** Add vertices with higher weight than threshold to vgroup. */ @@ -1506,6 +1506,9 @@ enum { /* WeightVGMix->flag */ enum { MOD_WVG_MIX_INVERT_VGROUP_MASK = (1 << 0), + MOD_WVG_MIX_WEIGHTS_NORMALIZE = (1 << 1), + MOD_WVG_MIX_INVERT_VGROUP_A = (1 << 2), + MOD_WVG_MIX_INVERT_VGROUP_B = (1 << 3), }; typedef struct WeightVGProximityModifierData { @@ -1568,6 +1571,7 @@ enum { MOD_WVG_PROXIMITY_GEOM_FACES = (1 << 2), MOD_WVG_PROXIMITY_INVERT_VGROUP_MASK = (1 << 3), MOD_WVG_PROXIMITY_INVERT_FALLOFF = (1 << 4), + MOD_WVG_PROXIMITY_WEIGHTS_NORMALIZE = (1 << 3), }; /* Defines common to all WeightVG modifiers. */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 8c34a7cb0a1..c50e48982b3 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -908,8 +908,6 @@ typedef struct ImagePaintSettings { /** Mode used for texture painting. */ int mode; - /** Wm handle. */ - void *paintcursor; /** Workaround until we support true layer masks. */ struct Image *stencil; /** Clone layer for image mode for projective texture painting. */ diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 8f4f066efbb..31a8d967ccf 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -833,9 +833,10 @@ typedef enum eFileSel_Params_RenameFlag { FILE_PARAMS_RENAME_POSTSCROLL_ACTIVE = 1 << 3, } eFileSel_Params_RenameFlag; -/* files in filesel list: file types - * Note we could use mere values (instead of bitflags) for file types themselves, - * but since we do not lack of bytes currently... +/** + * Files in the file selector list: file types + * Note we could use mere values (instead of bit-flags) for file types themselves, + * but since we do not lack of bytes currently. */ typedef enum eFileSel_File_Types { FILE_TYPE_BLENDER = (1 << 2), diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 019e4c9ea9e..63e7a90547e 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -1189,7 +1189,7 @@ typedef enum eColorPicker_Types { } eColorPicker_Types; /** - * Timecode display styles + * Time-code display styles. * #UserDef.timecode_style */ typedef enum eTimecodeStyles { diff --git a/source/blender/makesdna/DNA_view3d_defaults.h b/source/blender/makesdna/DNA_view3d_defaults.h index 20b491c47f2..10eadf368ef 100644 --- a/source/blender/makesdna/DNA_view3d_defaults.h +++ b/source/blender/makesdna/DNA_view3d_defaults.h @@ -64,8 +64,8 @@ .edit_flag = V3D_OVERLAY_EDIT_FACES | V3D_OVERLAY_EDIT_SEAMS | \ V3D_OVERLAY_EDIT_SHARP | V3D_OVERLAY_EDIT_FREESTYLE_EDGE | \ V3D_OVERLAY_EDIT_FREESTYLE_FACE | V3D_OVERLAY_EDIT_EDGES | \ - V3D_OVERLAY_EDIT_CREASES | V3D_OVERLAY_EDIT_BWEIGHTS | \ - V3D_OVERLAY_EDIT_CU_HANDLES, \ + V3D_OVERLAY_EDIT_CREASES | V3D_OVERLAY_EDIT_BWEIGHTS, \ + .handle_display = CURVE_HANDLE_SELECTED, \ \ .gpencil_paper_opacity = 0.5f, \ .gpencil_grid_opacity = 0.9f, \ diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 6d8d16c4313..ef174f5858f 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -228,9 +228,20 @@ typedef struct View3DOverlay { /** Factor for mixing vertex paint with original color */ float gpencil_vertex_paint_opacity; - char _pad4[4]; + /** Handles display type for curves. */ + int handle_display; } View3DOverlay; +/* View3DOverlay->handle_display */ +typedef enum eHandleDisplay { + /* Display only selected points. */ + CURVE_HANDLE_SELECTED = 0, + /* Display all handles. */ + CURVE_HANDLE_ALL = 1, + /* No display handles. */ + CURVE_HANDLE_NONE = 2, +} eHandleDisplay; + typedef struct View3D_Runtime { /** Nkey panel stores stuff here. */ void *properties_storage; @@ -522,7 +533,9 @@ enum { V3D_OVERLAY_EDIT_FACE_AREA = (1 << 18), V3D_OVERLAY_EDIT_INDICES = (1 << 19), - V3D_OVERLAY_EDIT_CU_HANDLES = (1 << 20), + /* Deprecated. */ + /* V3D_OVERLAY_EDIT_CU_HANDLES = (1 << 20), */ + V3D_OVERLAY_EDIT_CU_NORMALS = (1 << 21), }; |