Geometry Nodes: Points to Volume Fields fixes

A few items when OpenVDB is not enabled.
  - Cleanup a compiler warning
  - Add a node warning message
  - Return an empty geometry set
This commit is contained in:
Johnny Matthews 2021-10-03 13:43:51 -05:00
parent 98fe05fb5b
commit ae86584404
1 changed files with 6 additions and 3 deletions

View File

@ -241,13 +241,16 @@ static void geo_node_points_to_volume_exec(GeoNodeExecParams params)
{
GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry");
geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) {
#ifdef WITH_OPENVDB
geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) {
initialize_volume_component_from_points(params, geometry_set);
#endif
});
params.set_output("Geometry", std::move(geometry_set));
#else
params.error_message_add(NodeWarningType::Error,
TIP_("Disabled, Blender was compiled without OpenVDB"));
params.set_output("Geometry", GeometrySet());
#endif
}
} // namespace blender::nodes