Cleanup: extract function to show missing openvdb error message
This commit is contained in:
@@ -93,6 +93,13 @@ const EnumPropertyItem *domain_without_corner_experimental_grease_pencil_version
|
||||
|
||||
} // namespace enums
|
||||
|
||||
void node_geo_exec_with_missing_openvdb(GeoNodeExecParams ¶ms)
|
||||
{
|
||||
params.set_default_remaining_outputs();
|
||||
params.error_message_add(NodeWarningType::Error,
|
||||
TIP_("Disabled, Blender was compiled without OpenVDB"));
|
||||
}
|
||||
|
||||
} // namespace blender::nodes
|
||||
|
||||
bool geo_node_poll_default(const bNodeType * /*ntype*/,
|
||||
|
||||
@@ -157,4 +157,6 @@ const EnumPropertyItem *domain_without_corner_experimental_grease_pencil_version
|
||||
|
||||
} // namespace enums
|
||||
|
||||
void node_geo_exec_with_missing_openvdb(GeoNodeExecParams ¶ms);
|
||||
|
||||
} // namespace blender::nodes
|
||||
|
||||
@@ -260,9 +260,7 @@ static void node_geo_exec(GeoNodeExecParams params)
|
||||
params.set_output("Points", std::move(geometry_set));
|
||||
|
||||
#else
|
||||
params.set_default_remaining_outputs();
|
||||
params.error_message_add(NodeWarningType::Error,
|
||||
TIP_("Disabled, Blender was compiled without OpenVDB"));
|
||||
node_geo_exec_with_missing_openvdb(params);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -140,9 +140,7 @@ static void node_geo_exec(GeoNodeExecParams params)
|
||||
});
|
||||
params.set_output("Volume", std::move(geometry_set));
|
||||
#else
|
||||
params.set_default_remaining_outputs();
|
||||
params.error_message_add(NodeWarningType::Error,
|
||||
TIP_("Disabled, Blender was compiled without OpenVDB"));
|
||||
node_geo_exec_with_missing_openvdb(params);
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -209,9 +209,7 @@ static void node_geo_exec(GeoNodeExecParams params)
|
||||
});
|
||||
params.set_output("Volume", std::move(geometry_set));
|
||||
#else
|
||||
params.set_default_remaining_outputs();
|
||||
params.error_message_add(NodeWarningType::Error,
|
||||
TIP_("Disabled, Blender was compiled without OpenVDB"));
|
||||
node_geo_exec_with_missing_openvdb(params);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -177,9 +177,7 @@ static void node_geo_exec(GeoNodeExecParams params)
|
||||
r_geometry_set.replace_volume(volume);
|
||||
params.set_output("Volume", r_geometry_set);
|
||||
#else
|
||||
params.set_default_remaining_outputs();
|
||||
params.error_message_add(NodeWarningType::Error,
|
||||
TIP_("Disabled, Blender was compiled without OpenVDB"));
|
||||
node_geo_exec_with_missing_openvdb(params);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -214,9 +214,7 @@ static void node_geo_exec(GeoNodeExecParams params)
|
||||
});
|
||||
params.set_output("Mesh", std::move(geometry_set));
|
||||
#else
|
||||
params.set_default_remaining_outputs();
|
||||
params.error_message_add(NodeWarningType::Error,
|
||||
TIP_("Disabled, Blender was compiled without OpenVDB"));
|
||||
node_geo_exec_with_missing_openvdb(params);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user