Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_volume_to_mesh.cc
| Context not available. | |||||
| if (volume == nullptr) { | if (volume == nullptr) { | ||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| const bke::VolumeToMeshResolution resolution = get_resolution_param(params); | const bke::VolumeToMeshResolution resolution = get_resolution_param(params); | ||||
| if (resolution.mode == VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_SIZE && | |||||
| resolution.settings.voxel_size <= 0.0f) { | |||||
| return BKE_mesh_new_nomain(0, 0, 0, 0, 0); | |||||
| } | |||||
| if (resolution.mode == VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_AMOUNT && | |||||
| resolution.settings.voxel_amount <= 0) { | |||||
| return BKE_mesh_new_nomain(0, 0, 0, 0, 0); | |||||
| } | |||||
| const Main *bmain = DEG_get_bmain(params.depsgraph()); | const Main *bmain = DEG_get_bmain(params.depsgraph()); | ||||
| BKE_volume_load(volume, bmain); | BKE_volume_load(volume, bmain); | ||||
| Context not available. | |||||