39 tree_logger->node_warnings.append(
40 *tree_logger->allocator,
41 {node_.identifier, {type, tree_logger->allocator->copy_string(message)}});
49 tree_logger->used_named_attributes.append(
50 *tree_logger->allocator,
51 {node_.identifier, tree_logger->allocator->copy_string(attribute_name), usage});
60 if (geo_decl ==
nullptr) {
68 if (only_realized_data) {
71 TIP_(
"Instances in input geometry are ignored"));
77 TIP_(
"Realized data in input geometry is ignored"));
87 if (type == GeometryComponent::Type::Instance) {
90 if (supported_types.
contains(type)) {
93 std::string message =
RPT_(
"Input geometry has unsupported type: ");
95 case GeometryComponent::Type::Mesh: {
97 if (mesh->verts_num == 0) {
101 message +=
RPT_(
"Mesh");
104 case GeometryComponent::Type::PointCloud: {
106 if (pointcloud->totpoint == 0) {
110 message +=
RPT_(
"Point Cloud");
113 case GeometryComponent::Type::Instance: {
117 case GeometryComponent::Type::Volume: {
121 case GeometryComponent::Type::Curve: {
123 if (curves->geometry.point_num == 0) {
127 message +=
RPT_(
"Curve");
130 case GeometryComponent::Type::Edit: {
133 case GeometryComponent::Type::GreasePencil: {
135 if (grease_pencil->drawing_array_num == 0) {
139 message +=
RPT_(
"Grease Pencil");
161 for (
const bNodeSocket *socket : node_.input_sockets()) {
162 if (socket->is_available() && socket->name == name) {
175void GeoNodeExecParams::check_input_access(
StringRef identifier,
176 const CPPType *requested_type)
const
179 for (
const bNodeSocket *socket : node_.input_sockets()) {
180 if (socket->identifier == identifier) {
181 found_socket = socket;
186 if (found_socket ==
nullptr) {
187 std::cout <<
"Did not find an input socket with the identifier '" << identifier <<
"'.\n";
188 std::cout <<
"Possible identifiers are: ";
189 for (
const bNodeSocket *socket : node_.input_sockets()) {
190 if (socket->is_available()) {
191 std::cout <<
"'" << socket->identifier <<
"', ";
198 std::cout <<
"The socket corresponding to the identifier '" << identifier
199 <<
"' is disabled.\n";
203 const CPPType &expected_type = *found_socket->
typeinfo->geometry_nodes_cpp_type;
204 if (*requested_type != expected_type) {
205 std::cout <<
"The requested type '" << requested_type->
name() <<
"' is incorrect. Expected '"
206 << expected_type.
name() <<
"'.\n";
212void GeoNodeExecParams::check_output_access(
StringRef identifier,
const CPPType &value_type)
const
215 for (
const bNodeSocket *socket : node_.output_sockets()) {
216 if (socket->identifier == identifier) {
217 found_socket = socket;
222 if (found_socket ==
nullptr) {
223 std::cout <<
"Did not find an output socket with the identifier '" << identifier <<
"'.\n";
224 std::cout <<
"Possible identifiers are: ";
225 for (
const bNodeSocket *socket : node_.output_sockets()) {
226 if (socket->is_available()) {
227 std::cout <<
"'" << socket->identifier <<
"', ";
234 std::cout <<
"The socket corresponding to the identifier '" << identifier
235 <<
"' is disabled.\n";
238 else if (params_.output_was_set(
this->get_output_index(identifier))) {
239 std::cout <<
"The identifier '" << identifier <<
"' has been set already.\n";
243 const CPPType &expected_type = *found_socket->
typeinfo->geometry_nodes_cpp_type;
244 if (value_type != expected_type) {
245 std::cout <<
"The value type '" << value_type.
name() <<
"' is incorrect. Expected '"
246 << expected_type.
name() <<
"'.\n";
255 return AttributeFilter::Result::Process;
258 return AttributeFilter::Result::AllowSkip;
260 if (set_.names->contains(attribute_name)) {
261 return AttributeFilter::Result::Process;
263 return AttributeFilter::Result::AllowSkip;
277 if (!base_path || base_path[0] ==
'\0') {
283 return absolute_path;
Low-level operations for curves.
#define BLI_assert_unreachable()
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
bool BLI_path_is_rel(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
char * STRNCPY(char(&dst)[N], const char *src)
#define UNUSED_VARS_NDEBUG(...)
#define BLT_I18NCONTEXT_ID_ID
#define CTX_RPT_(context, msgid)
Main * DEG_get_bmain(const Depsgraph *graph)
struct bNodeSocket bNodeSocket
StringRefNull name() const
StringRefNull name() const
constexpr bool is_empty() const
constexpr bool contains(const T &value) const
constexpr bool is_empty() const
constexpr const char * c_str() const
geo_eval_log::GeoTreeLogger * get_local_tree_logger() const
void error_message_add(const NodeWarningType type, StringRef message) const
void check_output_geometry_set(const GeometrySet &geometry_set) const
void check_input_geometry_set(StringRef identifier, const GeometrySet &geometry_set) const
std::optional< std::string > ensure_absolute_path(StringRefNull path) const
void used_named_attribute(StringRef attribute_name, NamedAttributeUsage usage)
void set_default_remaining_outputs()
const Depsgraph * depsgraph() const
Result filter(StringRef attribute_name) const override
bool only_realized_data() const
Span< bke::GeometryComponent::Type > supported_types() const
bool only_instances() const
#define ID_BLEND_PATH(_bmain, _id)
bool attribute_name_is_anonymous(const StringRef name)
void set_default_remaining_node_outputs(lf::Params ¶ms, const bNode &node)
bNodeSocketTypeHandle * typeinfo
const CurvesEditHints * get_curve_edit_hints() const
const GreasePencil * get_grease_pencil() const
bool has_realized_data() const
const Curves * get_curves() const
bool has_instances() const
const PointCloud * get_pointcloud() const
const Mesh * get_mesh() const
Vector< GeometryComponent::Type > gather_component_types(bool include_instances, bool ignore_empty) const