diff options
author | Jacques Lucke <jacques@blender.org> | 2020-09-29 17:02:40 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-09-29 17:03:30 +0300 |
commit | 5845c06a63a6b96f038f5a46d538b0f9737102e9 (patch) | |
tree | 9a2bf0a1e90e6e37c60fcbf357c64874f258ab86 /source/blender/makesdna | |
parent | e12767a0352a9e113892b4a07c6c8446d3ff361f (diff) |
Volumes: new Mesh to Volume modifier
This modifier can only be added to Volume objects. It takes a mesh
as input and generates a "density" grid near the surface or in
the enclosed volume.
Ref T73201.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D9032
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_modifier_types.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index c0716388f28..7218e75a404 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -95,6 +95,7 @@ typedef enum ModifierType { eModifierType_Weld = 55, eModifierType_Fluid = 56, eModifierType_Simulation = 57, + eModifierType_MeshToVolume = 58, NUM_MODIFIER_TYPES, } ModifierType; @@ -2208,6 +2209,39 @@ typedef struct SimulationModifierData { 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; + #ifdef __cplusplus } #endif |