Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/intern/geometry_nodes_log.cc
| Show First 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | auto log_generic_value = [&](const CPPType &type, const void *value) { | ||||
| type.copy_construct(value, buffer); | type.copy_construct(value, buffer); | ||||
| store_logged_value(this->allocator->construct<GenericValueLog>(GMutablePointer{type, buffer})); | store_logged_value(this->allocator->construct<GenericValueLog>(GMutablePointer{type, buffer})); | ||||
| }; | }; | ||||
| if (type.is<GeometrySet>()) { | if (type.is<GeometrySet>()) { | ||||
| const GeometrySet &geometry = *value.get<GeometrySet>(); | const GeometrySet &geometry = *value.get<GeometrySet>(); | ||||
| store_logged_value(this->allocator->construct<GeometryInfoLog>(geometry)); | store_logged_value(this->allocator->construct<GeometryInfoLog>(geometry)); | ||||
| } | } | ||||
| else if (const auto *value_or_field_type = dynamic_cast<const fn::ValueOrFieldCPPType *>( | else if (const auto *value_or_field_type = fn::ValueOrFieldCPPType::get_from_self(type)) { | ||||
| &type)) { | |||||
| const void *value_or_field = value.get(); | const void *value_or_field = value.get(); | ||||
| const CPPType &base_type = value_or_field_type->base_type(); | const CPPType &base_type = value_or_field_type->value; | ||||
| if (value_or_field_type->is_field(value_or_field)) { | if (value_or_field_type->is_field(value_or_field)) { | ||||
| const GField *field = value_or_field_type->get_field_ptr(value_or_field); | const GField *field = value_or_field_type->get_field_ptr(value_or_field); | ||||
| if (field->node().depends_on_input()) { | if (field->node().depends_on_input()) { | ||||
| store_logged_value(this->allocator->construct<FieldInfoLog>(*field)); | store_logged_value(this->allocator->construct<FieldInfoLog>(*field)); | ||||
| } | } | ||||
| else { | else { | ||||
| BUFFER_FOR_CPP_TYPE_VALUE(base_type, value); | BUFFER_FOR_CPP_TYPE_VALUE(base_type, value); | ||||
| fn::evaluate_constant_field(*field, value); | fn::evaluate_constant_field(*field, value); | ||||
| ▲ Show 20 Lines • Show All 407 Lines • Show Last 20 Lines | |||||