Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesdna/DNA_modifier_types.h')
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h130
1 files changed, 118 insertions, 12 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index a9f1d5bcfc4..232fca062fa 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -95,6 +95,9 @@ typedef enum ModifierType {
eModifierType_Weld = 55,
eModifierType_Fluid = 56,
eModifierType_Simulation = 57,
+ eModifierType_MeshToVolume = 58,
+ eModifierType_VolumeDisplace = 59,
+ eModifierType_VolumeToMesh = 60,
NUM_MODIFIER_TYPES,
} ModifierType;
@@ -103,8 +106,10 @@ typedef enum ModifierMode {
eModifierMode_Render = (1 << 1),
eModifierMode_Editmode = (1 << 2),
eModifierMode_OnCage = (1 << 3),
- /* Old modifier box expansion, just for versioning. */
+#ifdef DNA_DEPRECATED_ALLOW
+ /** Old modifier box expansion, just for versioning. */
eModifierMode_Expanded_DEPRECATED = (1 << 4),
+#endif
eModifierMode_Virtual = (1 << 5),
eModifierMode_ApplyOnSpline = (1 << 6),
eModifierMode_DisableTemporary = (1u << 31),
@@ -114,9 +119,9 @@ typedef struct ModifierData {
struct ModifierData *next, *prev;
int type, mode;
- int stackindex;
+ char _pad0[4];
short flag;
- /* An "expand" bit for each of the modifier's (sub)panels. */
+ /* An "expand" bit for each of the modifier's (sub)panels (uiPanelDataExpansion). */
short ui_expand_flag;
/** MAX_NAME. */
char name[64];
@@ -161,6 +166,7 @@ typedef enum {
eSubsurfModifierFlag_SubsurfUv_DEPRECATED = (1 << 3),
eSubsurfModifierFlag_UseCrease = (1 << 4),
eSubsurfModifierFlag_UseCustomNormals = (1 << 5),
+ eSubsurfModifierFlag_UseRecursiveSubdivision = (1 << 6),
} SubsurfModifierFlag;
typedef enum {
@@ -177,13 +183,19 @@ typedef enum {
SUBSURF_UV_SMOOTH_ALL = 5,
} eSubsurfUVSmooth;
+typedef enum {
+ SUBSURF_BOUNDARY_SMOOTH_ALL = 0,
+ SUBSURF_BOUNDARY_SMOOTH_PRESERVE_CORNERS = 1,
+} eSubsurfBoundarySmooth;
+
typedef struct SubsurfModifierData {
ModifierData modifier;
short subdivType, levels, renderLevels, flags;
short uv_smooth;
short quality;
- char _pad[4];
+ short boundary_smooth;
+ char _pad[2];
/* TODO(sergey): Get rid of those with the old CCG subdivision code. */
void *emCache, *mCache;
@@ -861,26 +873,32 @@ typedef struct BooleanModifierData {
ModifierData modifier;
struct Object *object;
+ struct Collection *collection;
+ float double_threshold;
char operation;
char solver;
char flag;
char bm_flag;
- float double_threshold;
} BooleanModifierData;
+/* BooleanModifierData->operation */
typedef enum {
eBooleanModifierOp_Intersect = 0,
eBooleanModifierOp_Union = 1,
eBooleanModifierOp_Difference = 2,
} BooleanModifierOp;
+/* BooleanModifierData->solver */
typedef enum {
eBooleanModifierSolver_Fast = 0,
eBooleanModifierSolver_Exact = 1,
} BooleanModifierSolver;
+/* BooleanModifierData->flag */
enum {
eBooleanModifierFlag_Self = (1 << 0),
+ eBooleanModifierFlag_Object = (1 << 1),
+ eBooleanModifierFlag_Collection = (1 << 2),
};
/* bm_flag only used when G_DEBUG. */
@@ -1031,10 +1049,12 @@ typedef struct MultiresModifierData {
ModifierData modifier;
char lvl, sculptlvl, renderlvl, totlvl;
- char simple, flags, _pad[2];
+ char simple DNA_DEPRECATED;
+ char flags, _pad[2];
short quality;
short uv_smooth;
- char _pad2[4];
+ short boundary_smooth;
+ char _pad2[2];
} MultiresModifierData;
typedef enum {
@@ -1972,12 +1992,11 @@ typedef struct WeldModifierData {
/* The limit below which to merge vertices. */
float merge_dist;
- unsigned int max_interactions;
/* Name of vertex group to use to mask, MAX_VGROUP_NAME. */
char defgrp_name[64];
short flag;
- char _pad[6];
+ char _pad[2];
} WeldModifierData;
/* WeldModifierData->flag */
@@ -2115,6 +2134,11 @@ enum {
MOD_MESHSEQ_READ_POLY = (1 << 1),
MOD_MESHSEQ_READ_UV = (1 << 2),
MOD_MESHSEQ_READ_COLOR = (1 << 3),
+
+ /* Allow interpolation of mesh vertex positions. There is a heuristic to avoid interpolation when
+ * the mesh topology changes, but this heuristic sometimes fails. In these cases, users can
+ * disable interpolation with this flag. */
+ MOD_MESHSEQ_INTERPOLATE_VERTICES = (1 << 4),
};
typedef struct SDefBind {
@@ -2198,11 +2222,93 @@ enum {
typedef struct SimulationModifierData {
ModifierData modifier;
-
- struct Simulation *simulation;
- char *data_path;
} SimulationModifierData;
+typedef struct MeshToVolumeModifierData {
+ ModifierData modifier;
+
+ /** This is the object that is supposed to be converted to a volume. */
+ struct Object *object;
+
+ /** MeshToVolumeModifierResolutionMode */
+ int resolution_mode;
+ /** Size of a voxel in object space. */
+ float voxel_size;
+ /** The desired amount of voxels along one axis. The actual amount of voxels might be slightly
+ * different. */
+ int voxel_amount;
+
+ /** If true, every cell in the enclosed volume gets a density. Otherwise, the interior_band_width
+ * is used. */
+ char fill_volume;
+ char _pad1[3];
+
+ /** Band widths are in object space. */
+ float interior_band_width;
+ float exterior_band_width;
+
+ float density;
+ char _pad2[4];
+} MeshToVolumeModifierData;
+
+/* MeshToVolumeModifierData->resolution_mode */
+typedef enum MeshToVolumeModifierResolutionMode {
+ MESH_TO_VOLUME_RESOLUTION_MODE_VOXEL_AMOUNT = 0,
+ MESH_TO_VOLUME_RESOLUTION_MODE_VOXEL_SIZE = 1,
+} MeshToVolumeModifierResolutionMode;
+
+typedef struct VolumeDisplaceModifierData {
+ ModifierData modifier;
+
+ struct Tex *texture;
+ struct Object *texture_map_object;
+ int texture_map_mode;
+
+ float strength;
+ float texture_mid_level[3];
+ float texture_sample_radius;
+} VolumeDisplaceModifierData;
+
+/* VolumeDisplaceModifierData->texture_map_mode */
+enum {
+ MOD_VOLUME_DISPLACE_MAP_LOCAL = 0,
+ MOD_VOLUME_DISPLACE_MAP_GLOBAL = 1,
+ MOD_VOLUME_DISPLACE_MAP_OBJECT = 2,
+};
+
+typedef struct VolumeToMeshModifierData {
+ ModifierData modifier;
+
+ /** This is the volume object that is supposed to be converted to a mesh. */
+ struct Object *object;
+
+ float threshold;
+ float adaptivity;
+
+ /** VolumeToMeshFlag */
+ uint32_t flag;
+
+ /** VolumeToMeshResolutionMode */
+ int resolution_mode;
+ float voxel_size;
+ int voxel_amount;
+
+ /** MAX_NAME */
+ char grid_name[64];
+} VolumeToMeshModifierData;
+
+/** VolumeToMeshModifierData->resolution_mode */
+typedef enum VolumeToMeshResolutionMode {
+ VOLUME_TO_MESH_RESOLUTION_MODE_GRID = 0,
+ VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_AMOUNT = 1,
+ VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_SIZE = 2,
+} VolumeToMeshResolutionMode;
+
+/** VolumeToMeshModifierData->flag */
+typedef enum VolumeToMeshFlag {
+ VOLUME_TO_MESH_USE_SMOOTH_SHADE = 1 << 0,
+} VolumeToMeshFlag;
+
#ifdef __cplusplus
}
#endif