|
Blender V5.3
|
#include <FN_field.hh>
Inherits blender::blender::ImplicitSharingMixin.
Inherited by blender::bke::CurvesFieldInput, blender::bke::GeometryFieldInput, blender::bke::InstancesFieldInput, blender::bke::MeshFieldInput, blender::bke::PointCloudFieldInput, blender::bke::bake::DeferredTypeAttributeFieldInput, blender::fn::IndexFieldInput, and blender::fn::tests::IndexFieldInput.
Public Member Functions | |
| FieldInput (const CPPType &type, std::string debug_name="") | |
| ~FieldInput () override | |
| const FieldInputsPtr & | field_inputs () const |
| uint64_t | hash () const |
| virtual void | hash_unique (UniqueHashBytes &hash, FieldHashDeep &deep_hash_cache) const |
| virtual void | foreach_recursive_field (FunctionRef< void(const GField &)> fn) const |
| virtual GVArray | get_varray_for_context (const FieldContext &context, const IndexMask &mask, ResourceScope &scope) const =0 |
| void | delete_self () override |
Inline Methods | |
| StringRefNull | debug_name () const |
| virtual std::string | socket_inspection_name () const |
| const CPPType & | cpp_type () const |
| Public Member Functions inherited from blender::blender::ImplicitSharingInfo | |
| virtual | ~ImplicitSharingInfo () |
| bool | is_mutable () const |
| bool | is_expired () const |
| void | add_user () const |
| void | add_weak_user () const |
| void | tag_ensured_mutable () const |
| int64_t | version () const |
| int | strong_users () const |
| void | remove_user_and_delete_if_last () const |
| void | remove_weak_user_and_delete_if_last () const |
Protected Attributes | |
| const CPPType * | type_ |
| std::string | debug_name_ |
| CacheMutex | field_inputs_mutex_ |
| FieldInputsPtr | field_inputs_ |
This is an abstract class which concrete field inputs have to derive from. When a field is evaluated, this can provide values based on the provided context.
Since there is no better way yet, FieldInput is also often used to process the output of intermediate fields, in which case this is not technically an "input".
Definition at line 339 of file FN_field.hh.
| blender::fn::FieldInput::FieldInput | ( | const CPPType & | type, |
| std::string | debug_name = "" ) |
Definition at line 19 of file field.cc.
References debug_name(), debug_name_, and type_.
Referenced by blender::bke::bake::DeferredTypeAttributeFieldInput::DeferredTypeAttributeFieldInput(), blender::fn::IndexFieldInput::IndexFieldInput(), and blender::fn::tests::IndexFieldInput::IndexFieldInput().
|
overridedefault |
References cpp_type(), debug_name(), field_inputs(), foreach_recursive_field(), hash(), hash_unique(), and socket_inspection_name().
|
inline |
Definition at line 559 of file FN_field.hh.
Referenced by blender::nodes::node_geo_accumulate_field_cc::AccumulateFieldInput::AccumulateFieldInput(), blender::nodes::node_geo_blur_attribute_cc::BlurAttributeFieldInput::BlurAttributeFieldInput(), blender::fn::build_multi_function_procedure_for_fields(), blender::bke::EvaluateAtIndexInput::EvaluateAtIndexInput(), blender::bke::EvaluateOnDomainInput::EvaluateOnDomainInput(), blender::nodes::node_geo_field_average_cc::FieldAverageInput::FieldAverageInput(), blender::nodes::node_geo_field_min_and_max_cc::FieldMinMaxInput::FieldMinMaxInput(), blender::nodes::node_geo_field_variance_cc::FieldVarianceInput::FieldVarianceInput(), blender::fn::get_field_context_inputs(), blender::bke::AttributeFieldInput::get_varray_for_context(), blender::bke::EvaluateOnDomainInput::get_varray_for_context(), blender::nodes::node_geo_accumulate_field_cc::TotalFieldInput::TotalFieldInput(), and ~FieldInput().
|
inline |
Definition at line 569 of file FN_field.hh.
References debug_name_.
Referenced by blender::fn::build_multi_function_procedure_for_fields(), FieldInput(), and ~FieldInput().
|
overridevirtual |
Implements blender::blender::ImplicitSharingMixin.
Definition at line 211 of file field.cc.
Referenced by get_varray_for_context().
| const FieldInputsPtr & blender::fn::FieldInput::field_inputs | ( | ) | const |
Definition at line 175 of file field.cc.
References blender::CacheMutex::ensure(), field_inputs_, field_inputs_mutex_, and blender::fn::FieldInputs::inputs.
Referenced by ~FieldInput().
|
virtual |
If this FieldInput depends on other fields, this function should be overridden.
Reimplemented in blender::bke::EvaluateOnDomainInput, blender::nodes::node_geo_accumulate_field_cc::AccumulateFieldInput, blender::nodes::node_geo_accumulate_field_cc::TotalFieldInput, blender::nodes::node_geo_blur_attribute_cc::BlurAttributeFieldInput, blender::nodes::node_geo_cluster_by_distance_cc::ClusterByDistanceFieldInput, blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput, blender::nodes::node_geo_curve_topology_points_of_curve_cc::PointsOfCurveInput, blender::nodes::node_geo_edge_paths_to_selection_cc::PathToEdgeSelectionFieldInput, blender::nodes::node_geo_field_average_cc::FieldAverageInput, blender::nodes::node_geo_field_min_and_max_cc::FieldMinMaxInput, blender::nodes::node_geo_field_variance_cc::FieldVarianceInput, blender::nodes::node_geo_index_of_nearest_cc::HasNeighborFieldInput, blender::nodes::node_geo_index_of_nearest_cc::IndexOfNearestFieldInput, blender::nodes::node_geo_input_cluster_by_connected_cc::ClusterByConnectedFieldInput, blender::nodes::node_geo_input_curve_handles_cc::HandlePositionFieldInput, blender::nodes::node_geo_input_mesh_face_is_planar_cc::PlanarFieldInput, blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsCostFieldInput, blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsNextVertFieldInput, blender::nodes::node_geo_mesh_face_group_boundaries_cc::BoundaryFieldInput, blender::nodes::node_geo_mesh_topology_corners_of_edge_cc::CornersOfEdgeInput, blender::nodes::node_geo_mesh_topology_corners_of_face_cc::CornersOfFaceInput, blender::nodes::node_geo_mesh_topology_corners_of_vertex_cc::CornersOfVertInput, blender::nodes::node_geo_mesh_topology_edges_of_vertex_cc::EdgesOfVertInput, blender::nodes::node_geo_mesh_topology_offset_corner_in_face_cc::OffsetCornerInFaceFieldInput, blender::nodes::node_geo_offset_point_in_curve_cc::ControlPointNeighborFieldInput, blender::nodes::node_geo_offset_point_in_curve_cc::OffsetValidFieldInput, blender::nodes::node_geo_uv_pack_islands_cc::PackIslandsFieldInput, blender::nodes::node_geo_uv_tangent_cc::TangentFieldInput, and blender::nodes::node_geo_uv_unwrap_cc::UnwrapFieldInput.
Definition at line 195 of file field.cc.
Referenced by blender::nodes::LazyFunctionForExtractingReferenceSet::gather_references_from_field(), and ~FieldInput().
|
pure virtual |
Output a virtual array for the given index mask in the given context.
Implemented in blender::bke::bake::DeferredTypeAttributeFieldInput, blender::bke::CurvesFieldInput, blender::bke::GeometryFieldInput, blender::bke::InstancesFieldInput, blender::bke::MeshFieldInput, blender::bke::PointCloudFieldInput, blender::fn::IndexFieldInput, and blender::fn::tests::IndexFieldInput.
References delete_self().
Referenced by blender::bke::GreasePencilLayerFieldContext::get_varray_for_input(), and blender::fn::FieldContext::get_varray_for_input().
| uint64_t blender::fn::FieldInput::hash | ( | ) | const |
Definition at line 185 of file field.cc.
References blender::UniqueHashBytes::data, blender::get_default_hash(), and hash_unique().
Referenced by blender::bke::AttributeExistsFieldInput::hash_unique(), blender::bke::AttributeFieldInput::hash_unique(), blender::bke::CurveLengthFieldInput::hash_unique(), blender::bke::EvaluateAtIndexInput::hash_unique(), blender::bke::EvaluateOnDomainInput::hash_unique(), blender::bke::IDAttributeFieldInput::hash_unique(), blender::bke::NamedLayerSelectionFieldInput::hash_unique(), blender::bke::NormalFieldInput::hash_unique(), hash_unique(), blender::fn::IndexFieldInput::hash_unique(), blender::nodes::node_geo_accumulate_field_cc::AccumulateFieldInput::hash_unique(), blender::nodes::node_geo_accumulate_field_cc::TotalFieldInput::hash_unique(), blender::nodes::node_geo_blur_attribute_cc::BlurAttributeFieldInput::hash_unique(), blender::nodes::node_geo_cluster_by_distance_cc::ClusterByDistanceFieldInput::hash_unique(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::hash_unique(), blender::nodes::node_geo_curve_handle_type_selection_cc::HandleTypeFieldInput::hash_unique(), blender::nodes::node_geo_curve_spline_parameter_cc::CurveLengthParameterFieldInput::hash_unique(), blender::nodes::node_geo_curve_spline_parameter_cc::CurveParameterFieldInput::hash_unique(), blender::nodes::node_geo_curve_spline_parameter_cc::IndexOnSplineFieldInput::hash_unique(), blender::nodes::node_geo_curve_topology_curve_of_point_cc::CurveOfPointInput::hash_unique(), blender::nodes::node_geo_curve_topology_curve_of_point_cc::PointIndexInCurveInput::hash_unique(), blender::nodes::node_geo_curve_topology_points_of_curve_cc::CurvePointCountInput::hash_unique(), blender::nodes::node_geo_curve_topology_points_of_curve_cc::PointsOfCurveInput::hash_unique(), blender::nodes::node_geo_edge_paths_to_selection_cc::PathToEdgeSelectionFieldInput::hash_unique(), blender::nodes::node_geo_edges_to_face_groups_cc::FaceSetFromBoundariesInput::hash_unique(), blender::nodes::node_geo_field_average_cc::FieldAverageInput::hash_unique(), blender::nodes::node_geo_field_min_and_max_cc::FieldMinMaxInput::hash_unique(), blender::nodes::node_geo_field_variance_cc::FieldVarianceInput::hash_unique(), blender::nodes::node_geo_index_of_nearest_cc::HasNeighborFieldInput::hash_unique(), blender::nodes::node_geo_index_of_nearest_cc::IndexOfNearestFieldInput::hash_unique(), blender::nodes::node_geo_input_cluster_by_connected_cc::ClusterByConnectedFieldInput::hash_unique(), blender::nodes::node_geo_input_curve_handles_cc::HandlePositionFieldInput::hash_unique(), blender::nodes::node_geo_input_instance_bounds_cc::InstanceBoundsField::hash_unique(), blender::nodes::node_geo_input_instance_rotation_cc::InstanceRotationFieldInput::hash_unique(), blender::nodes::node_geo_input_instance_scale_cc::InstanceScaleFieldInput::hash_unique(), blender::nodes::node_geo_input_mesh_edge_angle_cc::AngleFieldInput::hash_unique(), blender::nodes::node_geo_input_mesh_edge_angle_cc::SignedAngleFieldInput::hash_unique(), blender::nodes::node_geo_input_mesh_edge_neighbors_cc::EdgeNeighborCountFieldInput::hash_unique(), blender::nodes::node_geo_input_mesh_edge_vertices_cc::EdgePositionFieldInput::hash_unique(), blender::nodes::node_geo_input_mesh_edge_vertices_cc::EdgeVertsInput::hash_unique(), blender::nodes::node_geo_input_mesh_face_area_cc::FaceAreaFieldInput::hash_unique(), blender::nodes::node_geo_input_mesh_face_is_planar_cc::PlanarFieldInput::hash_unique(), blender::nodes::node_geo_input_mesh_face_neighbors_cc::FaceNeighborCountFieldInput::hash_unique(), blender::nodes::node_geo_input_mesh_face_neighbors_cc::FaceVertexCountFieldInput::hash_unique(), blender::nodes::node_geo_input_mesh_island_cc::IslandCountFieldInput::hash_unique(), blender::nodes::node_geo_input_mesh_island_cc::IslandFieldInput::hash_unique(), blender::nodes::node_geo_input_mesh_vertex_neighbors_cc::VertexCountFieldInput::hash_unique(), blender::nodes::node_geo_input_mesh_vertex_neighbors_cc::VertexFaceCountFieldInput::hash_unique(), blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsCostFieldInput::hash_unique(), blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsNextVertFieldInput::hash_unique(), blender::nodes::node_geo_input_spline_length_cc::SplineCountFieldInput::hash_unique(), blender::nodes::node_geo_input_tangent_cc::TangentFieldInput::hash_unique(), blender::nodes::node_geo_material_selection_cc::MaterialSelectionFieldInput::hash_unique(), blender::nodes::node_geo_mesh_topology_corners_of_edge_cc::CornersOfEdgeCountInput::hash_unique(), blender::nodes::node_geo_mesh_topology_corners_of_edge_cc::CornersOfEdgeInput::hash_unique(), blender::nodes::node_geo_mesh_topology_corners_of_face_cc::CornersOfFaceCountInput::hash_unique(), blender::nodes::node_geo_mesh_topology_corners_of_face_cc::CornersOfFaceInput::hash_unique(), blender::nodes::node_geo_mesh_topology_corners_of_vertex_cc::CornersOfVertCountInput::hash_unique(), blender::nodes::node_geo_mesh_topology_corners_of_vertex_cc::CornersOfVertInput::hash_unique(), blender::nodes::node_geo_mesh_topology_edges_of_corner_cc::CornerNextEdgeFieldInput::hash_unique(), blender::nodes::node_geo_mesh_topology_edges_of_corner_cc::CornerPreviousEdgeFieldInput::hash_unique(), blender::nodes::node_geo_mesh_topology_edges_of_vertex_cc::EdgesOfVertCountInput::hash_unique(), blender::nodes::node_geo_mesh_topology_edges_of_vertex_cc::EdgesOfVertInput::hash_unique(), blender::nodes::node_geo_mesh_topology_face_of_corner_cc::CornerFaceIndexInput::hash_unique(), blender::nodes::node_geo_mesh_topology_face_of_corner_cc::CornerIndexInFaceInput::hash_unique(), blender::nodes::node_geo_mesh_topology_offset_corner_in_face_cc::OffsetCornerInFaceFieldInput::hash_unique(), blender::nodes::node_geo_mesh_topology_vertex_of_corner_cc::CornerVertFieldInput::hash_unique(), blender::nodes::node_geo_uv_tangent_cc::TangentFieldInput::hash_unique(), and ~FieldInput().
|
virtual |
Reimplemented in blender::bke::AttributeExistsFieldInput, blender::bke::AttributeFieldInput, blender::bke::CurveLengthFieldInput, blender::bke::EvaluateAtIndexInput, blender::bke::EvaluateOnDomainInput, blender::bke::IDAttributeFieldInput, blender::bke::NamedLayerSelectionFieldInput, blender::bke::NormalFieldInput, blender::fn::IndexFieldInput, blender::nodes::AttributeFieldInput, blender::nodes::node_geo_accumulate_field_cc::AccumulateFieldInput, blender::nodes::node_geo_accumulate_field_cc::TotalFieldInput, blender::nodes::node_geo_blur_attribute_cc::BlurAttributeFieldInput, blender::nodes::node_geo_cluster_by_distance_cc::ClusterByDistanceFieldInput, blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput, blender::nodes::node_geo_curve_handle_type_selection_cc::HandleTypeFieldInput, blender::nodes::node_geo_curve_spline_parameter_cc::CurveLengthParameterFieldInput, blender::nodes::node_geo_curve_spline_parameter_cc::CurveParameterFieldInput, blender::nodes::node_geo_curve_spline_parameter_cc::IndexOnSplineFieldInput, blender::nodes::node_geo_curve_topology_curve_of_point_cc::CurveOfPointInput, blender::nodes::node_geo_curve_topology_curve_of_point_cc::PointIndexInCurveInput, blender::nodes::node_geo_curve_topology_points_of_curve_cc::CurvePointCountInput, blender::nodes::node_geo_curve_topology_points_of_curve_cc::PointsOfCurveInput, blender::nodes::node_geo_edge_paths_to_selection_cc::PathToEdgeSelectionFieldInput, blender::nodes::node_geo_edges_to_face_groups_cc::FaceSetFromBoundariesInput, blender::nodes::node_geo_field_average_cc::FieldAverageInput, blender::nodes::node_geo_field_min_and_max_cc::FieldMinMaxInput, blender::nodes::node_geo_field_variance_cc::FieldVarianceInput, blender::nodes::node_geo_index_of_nearest_cc::HasNeighborFieldInput, blender::nodes::node_geo_index_of_nearest_cc::IndexOfNearestFieldInput, blender::nodes::node_geo_input_cluster_by_connected_cc::ClusterByConnectedFieldInput, blender::nodes::node_geo_input_curve_handles_cc::HandlePositionFieldInput, blender::nodes::node_geo_input_instance_bounds_cc::InstanceBoundsField, blender::nodes::node_geo_input_instance_rotation_cc::InstanceRotationFieldInput, blender::nodes::node_geo_input_instance_scale_cc::InstanceScaleFieldInput, blender::nodes::node_geo_input_mesh_edge_angle_cc::AngleFieldInput, blender::nodes::node_geo_input_mesh_edge_angle_cc::SignedAngleFieldInput, blender::nodes::node_geo_input_mesh_edge_neighbors_cc::EdgeNeighborCountFieldInput, blender::nodes::node_geo_input_mesh_edge_vertices_cc::EdgePositionFieldInput, blender::nodes::node_geo_input_mesh_edge_vertices_cc::EdgeVertsInput, blender::nodes::node_geo_input_mesh_face_area_cc::FaceAreaFieldInput, blender::nodes::node_geo_input_mesh_face_is_planar_cc::PlanarFieldInput, blender::nodes::node_geo_input_mesh_face_neighbors_cc::FaceNeighborCountFieldInput, blender::nodes::node_geo_input_mesh_face_neighbors_cc::FaceVertexCountFieldInput, blender::nodes::node_geo_input_mesh_island_cc::IslandCountFieldInput, blender::nodes::node_geo_input_mesh_island_cc::IslandFieldInput, blender::nodes::node_geo_input_mesh_vertex_neighbors_cc::VertexCountFieldInput, blender::nodes::node_geo_input_mesh_vertex_neighbors_cc::VertexFaceCountFieldInput, blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsCostFieldInput, blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsNextVertFieldInput, blender::nodes::node_geo_input_spline_length_cc::SplineCountFieldInput, blender::nodes::node_geo_input_tangent_cc::TangentFieldInput, blender::nodes::node_geo_material_selection_cc::MaterialSelectionFieldInput, blender::nodes::node_geo_mesh_topology_corners_of_edge_cc::CornersOfEdgeCountInput, blender::nodes::node_geo_mesh_topology_corners_of_edge_cc::CornersOfEdgeInput, blender::nodes::node_geo_mesh_topology_corners_of_face_cc::CornersOfFaceCountInput, blender::nodes::node_geo_mesh_topology_corners_of_face_cc::CornersOfFaceInput, blender::nodes::node_geo_mesh_topology_corners_of_vertex_cc::CornersOfVertCountInput, blender::nodes::node_geo_mesh_topology_corners_of_vertex_cc::CornersOfVertInput, blender::nodes::node_geo_mesh_topology_edges_of_corner_cc::CornerNextEdgeFieldInput, blender::nodes::node_geo_mesh_topology_edges_of_corner_cc::CornerPreviousEdgeFieldInput, blender::nodes::node_geo_mesh_topology_edges_of_vertex_cc::EdgesOfVertCountInput, blender::nodes::node_geo_mesh_topology_edges_of_vertex_cc::EdgesOfVertInput, blender::nodes::node_geo_mesh_topology_face_of_corner_cc::CornerFaceIndexInput, blender::nodes::node_geo_mesh_topology_face_of_corner_cc::CornerIndexInFaceInput, blender::nodes::node_geo_mesh_topology_offset_corner_in_face_cc::OffsetCornerInFaceFieldInput, blender::nodes::node_geo_mesh_topology_vertex_of_corner_cc::CornerVertFieldInput, and blender::nodes::node_geo_uv_tangent_cc::TangentFieldInput.
Definition at line 197 of file field.cc.
References hash().
Referenced by hash(), and ~FieldInput().
|
inlinevirtual |
Reimplemented in blender::bke::AttributeFieldInput, blender::bke::IDAttributeFieldInput, blender::bke::NormalFieldInput, and blender::nodes::AttributeFieldInput.
Definition at line 574 of file FN_field.hh.
References debug_name_.
Referenced by ~FieldInput().
|
protected |
Definition at line 342 of file FN_field.hh.
Referenced by debug_name(), FieldInput(), and socket_inspection_name().
|
mutableprotected |
Definition at line 349 of file FN_field.hh.
Referenced by field_inputs().
|
mutableprotected |
Field inputs are initialized lazily because it can't be done in the constructor because the derived class constructor has not run yet.
Definition at line 348 of file FN_field.hh.
Referenced by field_inputs().
|
protected |
Definition at line 341 of file FN_field.hh.
Referenced by FieldInput(), blender::bke::AttributeFieldInput::get_varray_for_context(), blender::nodes::node_geo_blur_attribute_cc::BlurAttributeFieldInput::get_varray_for_context(), blender::nodes::node_geo_tool_selection_cc::EditSelectionFieldInput::get_varray_for_context(), blender::nodes::node_geo_tool_selection_cc::SculptSelectionFieldInput::get_varray_for_context(), blender::bke::AttributeFieldInput::hash_unique(), blender::bke::EvaluateAtIndexInput::hash_unique(), and blender::bke::NamedLayerSelectionFieldInput::hash_unique().