|
Blender V5.3
|
#include <NOD_geometry_nodes_bundle.hh>
Inherits blender::blender::ImplicitSharingMixin.
Public Types | |
| using | BundleItemMap = Map<BundleKey, BundleItemValue> |
Public Member Functions | |
| bool | add (BundleKey key, const BundleItemValue &value) |
| bool | add (BundleKey key, BundleItemValue &&value) |
| void | add_new (BundleKey key, const BundleItemValue &value) |
| void | add_new (BundleKey key, BundleItemValue &&value) |
| void | add_override (BundleKey key, const BundleItemValue &value) |
| bool | add_path (StringRef path, const BundleItemValue &value) |
| void | add_path_new (StringRef path, const BundleItemValue &value) |
| void | add_path_override (StringRef path, const BundleItemValue &value) |
| void | add_path_override (Span< BundleKey > path, const BundleItemValue &value) |
| template<typename T> requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>) | |
| void | add (BundleKey key, T &&value) |
| template<typename T> requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>) | |
| void | add_new (BundleKey key, T &&value) |
| template<typename T> requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>) | |
| void | add_override (BundleKey key, T &&value) |
| template<typename T> requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>) | |
| void | add_path (StringRef path, T &&value) |
| template<typename T> requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>) | |
| void | add_path_override (Span< BundleKey > path, T &&value) |
| template<typename T> requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>) | |
| void | add_path_override (StringRef path, T &&value) |
| bool | remove (BundleKey key) |
| bool | remove_path (StringRef path) |
| bool | remove_path (Span< BundleKey > path) |
| bool | contains (BundleKey key) const |
| bool | contains_path (StringRef path) const |
| bool | contains_path (Span< BundleKey > path) const |
| const BundleItemValue * | lookup (BundleKey key) const |
| BundleItemValue * | lookup (BundleKey key) |
| const BundleItemValue * | lookup_path (Span< BundleKey > path) const |
| const BundleItemValue * | lookup_path (StringRef path) const |
| BundleItemValue * | lookup_path_for_write (Span< BundleKey > path) |
| BundleItemValue * | lookup_path_for_write (StringRef path) |
| template<typename T> | |
| std::optional< T > | lookup (BundleKey key) const |
| template<typename T> | |
| std::optional< T > | lookup_path (Span< BundleKey > path) const |
| template<typename T> | |
| std::optional< T > | lookup_path (StringRef path) const |
| template<typename T> | |
| T * | lookup_ptr (BundleKey key) |
| template<typename T> | |
| const T * | lookup_ptr (BundleKey key) const |
| template<typename T> | |
| const T * | lookup_path_ptr (StringRef path) const |
| template<typename T> | |
| const T * | lookup_path_ptr (Span< BundleKey > path) const |
| template<typename T> | |
| T * | lookup_path_for_write_ptr (StringRef path) |
| template<typename T> | |
| T * | lookup_path_for_write_ptr (Span< BundleKey > path) |
| Bundle & | ensure_nested_bundle (StringRef path) |
| void | merge (const Bundle &other) |
| void | merge_override (const Bundle &other) |
| bool | is_empty () const |
| int64_t | size () const |
| void | clear () |
| std::optional< StringRef > | type () const |
| void | ensure_owns_direct_data () |
| bool | owns_direct_data () const |
| BundleItemMap::ItemIterator | items () const |
| BundleItemMap::MutableItemIterator | items () |
| BundlePtr | copy () const |
| void | delete_self () override |
| void | count_memory (MemoryCounter &memory) const |
| Vector< std::string > | gather_paths (FunctionRef< bool(const Bundle &bundle)> fn) 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 |
Static Public Member Functions | |
| static BundlePtr | create () |
| static std::string | combine_path (Span< StringRef > path) |
| static std::string | combine_path (Span< BundleKey > path) |
| static bool | is_valid_path (StringRef path) |
| static std::optional< Vector< BundleKey > > | split_path (StringRef path) |
Static Public Attributes | |
| static BundleKey | type_item_name = *BundleKey::from_str("Type") |
A bundle is a map containing keys and their corresponding values.
The API also supports working with paths in nested bundles like root/child/data.
Definition at line 90 of file NOD_geometry_nodes_bundle.hh.
Definition at line 92 of file NOD_geometry_nodes_bundle.hh.
| bool blender::nodes::Bundle::add | ( | BundleKey | key, |
| BundleItemValue && | value ) |
Definition at line 118 of file geometry_nodes_bundle.cc.
References add_new(), and contains().
| bool blender::nodes::Bundle::add | ( | BundleKey | key, |
| const BundleItemValue & | value ) |
Definition at line 109 of file geometry_nodes_bundle.cc.
References add_new(), and contains().
Referenced by add(), blender::bke::curves_store_surface_in_geometry_bundle(), blender::bke::bake::deserialize_bundle_items(), blender::nodes::node_geo_combine_bundle_cc::CombineBundleOperation::execute(), merge(), blender::nodes::node_geo_combine_bundle_cc::node_geo_exec(), blender::nodes::node_geo_join_bundle::node_geo_exec(), blender::nodes::node_geo_xpbd_solver_cc::node_geo_exec(), blender::bke::bake::tests::TEST_F(), blender::bke::socket_value_visitor::tests::TEST_F(), blender::nodes::tests::TEST_F(), and blender::nodes::tests::TEST_F().
Definition at line 422 of file NOD_geometry_nodes_bundle.hh.
References add(), T, blender::nodes::to_stored_type(), and blender::U.
| void blender::nodes::Bundle::add_new | ( | BundleKey | key, |
| BundleItemValue && | value ) |
Definition at line 98 of file geometry_nodes_bundle.cc.
| void blender::nodes::Bundle::add_new | ( | BundleKey | key, |
| const BundleItemValue & | value ) |
Definition at line 93 of file geometry_nodes_bundle.cc.
Referenced by add(), add(), add_new(), and add_override().
Definition at line 430 of file NOD_geometry_nodes_bundle.hh.
References add_new(), T, blender::nodes::to_stored_type(), and blender::U.
| void blender::nodes::Bundle::add_override | ( | BundleKey | key, |
| const BundleItemValue & | value ) |
Definition at line 103 of file geometry_nodes_bundle.cc.
References add_new(), and remove().
Referenced by add_override(), and merge_override().
Definition at line 448 of file NOD_geometry_nodes_bundle.hh.
References add_override(), T, blender::nodes::to_stored_type(), and blender::U.
| bool blender::nodes::Bundle::add_path | ( | StringRef | path, |
| const BundleItemValue & | value ) |
Definition at line 159 of file geometry_nodes_bundle.cc.
References add_path_new(), and contains_path().
Referenced by add_path(), blender::nodes::node_geo_xpbd_solver_cc::node_geo_exec(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), and blender::nodes::tests::TEST_F().
Definition at line 439 of file NOD_geometry_nodes_bundle.hh.
References add_path(), T, blender::nodes::to_stored_type(), and blender::U.
| void blender::nodes::Bundle::add_path_new | ( | StringRef | path, |
| const BundleItemValue & | value ) |
Definition at line 168 of file geometry_nodes_bundle.cc.
References add_path_override(), blender::BLI_assert(), and contains_path().
Referenced by add_path().
| void blender::nodes::Bundle::add_path_override | ( | Span< BundleKey > | path, |
| const BundleItemValue & | value ) |
Definition at line 135 of file geometry_nodes_bundle.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite_as(), blender::nodes::BundleItemValue::as_pointer(), blender::nodes::create_nested_bundle_item(), blender::Span< T >::drop_back(), blender::Span< T >::last(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_cb_as().
Definition at line 466 of file NOD_geometry_nodes_bundle.hh.
References add_path_override(), T, blender::nodes::to_stored_type(), and blender::U.
| void blender::nodes::Bundle::add_path_override | ( | StringRef | path, |
| const BundleItemValue & | value ) |
Definition at line 152 of file geometry_nodes_bundle.cc.
References add_path_override(), blender::BLI_assert(), is_valid_path(), and split_path().
Referenced by add_path_new(), add_path_override(), add_path_override(), add_path_override(), ensure_nested_bundle(), blender::nodes::node_geo_store_bundle_item_cc::node_geo_exec(), blender::nodes::node_geo_xpbd_solver_cc::node_geo_exec(), blender::nodes::tests::TEST_F(), and blender::nodes::tests::TEST_F().
Definition at line 457 of file NOD_geometry_nodes_bundle.hh.
References add_path_override(), T, blender::nodes::to_stored_type(), and blender::U.
| void blender::nodes::Bundle::clear | ( | ) |
Definition at line 352 of file geometry_nodes_bundle.cc.
Referenced by blender::nodes::tests::TEST_F().
Definition at line 342 of file geometry_nodes_bundle.cc.
Create the combined path by inserting '/' between each element.
Definition at line 337 of file geometry_nodes_bundle.cc.
Referenced by blender::nodes::gather_bundle_paths_by_bundle_type(), blender::nodes::gather_bundle_paths_by_data_type(), gather_paths(), and blender::nodes::node_geo_get_nested_bundle_paths_cc::node_geo_exec().
| bool blender::nodes::Bundle::contains | ( | BundleKey | key | ) | const |
Definition at line 322 of file geometry_nodes_bundle.cc.
Referenced by add(), add(), and blender::nodes::tests::TEST_F().
Definition at line 332 of file geometry_nodes_bundle.cc.
References lookup_path().
| bool blender::nodes::Bundle::contains_path | ( | StringRef | path | ) | const |
Definition at line 327 of file geometry_nodes_bundle.cc.
References lookup_path().
Referenced by add_path(), add_path_new(), and remove_path().
| BundlePtr blender::nodes::Bundle::copy | ( | ) | const |
Definition at line 285 of file geometry_nodes_bundle.cc.
References copy(), and create().
Referenced by copy().
| void blender::nodes::Bundle::count_memory | ( | MemoryCounter & | memory | ) | const |
Definition at line 363 of file geometry_nodes_bundle.cc.
|
static |
Definition at line 88 of file geometry_nodes_bundle.cc.
Referenced by blender::compositor::Result::allocate_single_value(), blender::bke::GeometrySet::bundle_for_write(), copy(), blender::nodes::create_nested_bundle_item(), ensure_nested_bundle(), blender::compositor::SingleValueNodeInputOperation::execute(), blender::nodes::node_geo_combine_bundle_cc::CombineBundleOperation::execute(), blender::nodes::node_geo_combine_bundle_cc::node_geo_exec(), blender::nodes::node_geo_join_bundle::node_geo_exec(), blender::nodes::node_geo_store_bundle_item_cc::node_geo_exec(), blender::nodes::node_geo_xpbd_solver_cc::node_geo_exec(), blender::bke::bake::tests::TEST_F(), blender::bke::socket_value_visitor::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), and blender::bke::bake::try_load_geometry_bundle().
|
overridevirtual |
Implements blender::blender::ImplicitSharingMixin.
Definition at line 347 of file geometry_nodes_bundle.cc.
Definition at line 174 of file geometry_nodes_bundle.cc.
References add_path_override(), create(), blender::ImplicitSharingPtr< T, IsStrong >::ensure_mutable_inplace(), and lookup_path_for_write_ptr().
Referenced by blender::nodes::tests::TEST_F().
| void blender::nodes::Bundle::ensure_owns_direct_data | ( | ) |
Also see #GeometrySet.ensure_owns_direct_data.
Definition at line 264 of file geometry_nodes_bundle.cc.
Referenced by blender::bke::SocketValueVariant::ensure_owns_direct_data(), blender::nodes::GList::ensure_owns_direct_data(), and blender::nodes::execute_geometry_nodes_on_geometry().
| Vector< std::string > blender::nodes::Bundle::gather_paths | ( | FunctionRef< bool(const Bundle &bundle)> | fn | ) | const |
References combine_path(), is_valid_path(), and split_path().
|
inline |
Definition at line 483 of file NOD_geometry_nodes_bundle.hh.
Referenced by blender::ed::spreadsheet::GeometryDataSetTreeView::build_tree_for_bundle(), blender::nodes::tests::TEST_F(), and blender::nodes::tests::TEST_F().
|
static |
Definition at line 52 of file geometry_nodes_bundle.cc.
References split_path().
Referenced by add_path_override(), gather_paths(), lookup_path(), lookup_path_for_write(), blender::nodes::node_geo_get_bundle_item_cc::node_geo_exec(), and remove_path().
|
inline |
Definition at line 478 of file NOD_geometry_nodes_bundle.hh.
|
inline |
Definition at line 473 of file NOD_geometry_nodes_bundle.hh.
Referenced by blender::ed::spreadsheet::GeometryDataSetTreeView::build_bundle_children(), blender::ed::spreadsheet::ViewerDataTreeView::build_bundle_children(), blender::bke::socket_value_visitor::RecursiveVisitor::check_Bundle(), blender::bke::socket_value_visitor::RecursiveVisitor::edit_Bundle(), blender::nodes::foreach_nested_bundle_item_recursive(), blender::geometry::mix_bundles(), blender::nodes::node_geo_join_bundle::node_geo_exec(), and blender::bke::bake::serialize_bundle_items().
| BundleItemValue * blender::nodes::Bundle::lookup | ( | BundleKey | key | ) |
Definition at line 191 of file geometry_nodes_bundle.cc.
|
inline |
Definition at line 303 of file NOD_geometry_nodes_bundle.hh.
References blender::nodes::BundleItemValue::as(), lookup(), and T.
| const BundleItemValue * blender::nodes::Bundle::lookup | ( | BundleKey | key | ) | const |
Definition at line 186 of file geometry_nodes_bundle.cc.
Referenced by blender::nodes::node_geo_separate_bundle_cc::SeparateBundleOperation::execute(), lookup(), lookup_path(), lookup_path_for_write(), lookup_ptr(), lookup_ptr(), blender::nodes::node_geo_separate_bundle_cc::node_geo_exec(), blender::bke::bake::tests::TEST_F(), and blender::nodes::tests::TEST_F().
|
inline |
Definition at line 348 of file NOD_geometry_nodes_bundle.hh.
References blender::nodes::BundleItemValue::as(), lookup_path(), and T.
| const BundleItemValue * blender::nodes::Bundle::lookup_path | ( | Span< BundleKey > | path | ) | const |
Definition at line 196 of file geometry_nodes_bundle.cc.
References blender::nodes::BundleItemValue::as(), blender::BLI_assert(), blender::Span< T >::drop_front(), blender::Span< T >::is_empty(), lookup(), lookup_path(), and blender::Span< T >::size().
Referenced by contains_path(), contains_path(), blender::nodes::node_geo_get_bundle_item_cc::GetBundleItemOperation::execute(), blender::ed::spreadsheet::lookup_bundle_path(), lookup_path(), lookup_path(), lookup_path_ptr(), lookup_path_ptr(), blender::nodes::node_geo_get_bundle_item_cc::node_geo_exec(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), and blender::nodes::tests::TEST_F().
|
inline |
Definition at line 357 of file NOD_geometry_nodes_bundle.hh.
References blender::nodes::BundleItemValue::as(), lookup_path(), and T.
| const BundleItemValue * blender::nodes::Bundle::lookup_path | ( | StringRef | path | ) | const |
Definition at line 214 of file geometry_nodes_bundle.cc.
References blender::BLI_assert(), is_valid_path(), lookup_path(), and split_path().
| BundleItemValue * blender::nodes::Bundle::lookup_path_for_write | ( | Span< BundleKey > | path | ) |
Definition at line 221 of file geometry_nodes_bundle.cc.
References blender::nodes::BundleItemValue::as_pointer(), blender::BLI_assert(), blender::Span< T >::drop_front(), blender::Span< T >::is_empty(), lookup(), lookup_path_for_write(), and blender::Span< T >::size().
Referenced by lookup_path_for_write(), lookup_path_for_write(), lookup_path_for_write_ptr(), and lookup_path_for_write_ptr().
| BundleItemValue * blender::nodes::Bundle::lookup_path_for_write | ( | StringRef | path | ) |
Definition at line 243 of file geometry_nodes_bundle.cc.
References blender::BLI_assert(), is_valid_path(), lookup_path_for_write(), and split_path().
|
inline |
Definition at line 336 of file NOD_geometry_nodes_bundle.hh.
References blender::nodes::BundleItemValue::as_pointer(), lookup_path_for_write(), and T.
Definition at line 342 of file NOD_geometry_nodes_bundle.hh.
References blender::nodes::BundleItemValue::as_pointer(), lookup_path_for_write(), and T.
Referenced by ensure_nested_bundle(), and blender::nodes::tests::TEST_F().
|
inline |
Definition at line 324 of file NOD_geometry_nodes_bundle.hh.
References blender::nodes::BundleItemValue::as_pointer(), lookup_path(), and T.
|
inline |
Definition at line 318 of file NOD_geometry_nodes_bundle.hh.
References blender::nodes::BundleItemValue::as_pointer(), lookup_path(), and T.
Referenced by blender::nodes::tests::TEST_F().
Definition at line 312 of file NOD_geometry_nodes_bundle.hh.
References blender::nodes::BundleItemValue::as_pointer(), lookup(), and T.
Referenced by type().
Definition at line 330 of file NOD_geometry_nodes_bundle.hh.
References blender::nodes::BundleItemValue::as_pointer(), lookup(), and T.
| void blender::nodes::Bundle::merge | ( | const Bundle & | other | ) |
Definition at line 250 of file geometry_nodes_bundle.cc.
References add(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items().
Referenced by blender::bke::GeometrySet::merge_bundle_from().
| void blender::nodes::Bundle::merge_override | ( | const Bundle & | other | ) |
Definition at line 257 of file geometry_nodes_bundle.cc.
References add_override(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items().
| bool blender::nodes::Bundle::owns_direct_data | ( | ) | const |
Definition at line 273 of file geometry_nodes_bundle.cc.
Referenced by blender::nodes::GList::owns_direct_data().
| bool blender::nodes::Bundle::remove | ( | BundleKey | key | ) |
Definition at line 293 of file geometry_nodes_bundle.cc.
Referenced by add_override().
Definition at line 305 of file geometry_nodes_bundle.cc.
References blender::nodes::BundleItemValue::as_pointer(), blender::BLI_assert(), contains_path(), blender::Span< T >::drop_back(), blender::Span< T >::is_empty(), blender::blender::ImplicitSharingInfo::is_mutable(), blender::Span< T >::last(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_as(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_contained_as().
| bool blender::nodes::Bundle::remove_path | ( | StringRef | path | ) |
Definition at line 298 of file geometry_nodes_bundle.cc.
References blender::BLI_assert(), is_valid_path(), remove_path(), and split_path().
Referenced by blender::nodes::node_geo_get_bundle_item_cc::GetBundleItemOperation::execute(), blender::nodes::node_geo_get_bundle_item_cc::node_geo_exec(), remove_path(), and blender::nodes::tests::TEST_F().
|
inline |
Definition at line 488 of file NOD_geometry_nodes_bundle.hh.
Referenced by blender::nodes::tests::TEST_F(), and blender::nodes::tests::TEST_F().
Definition at line 57 of file geometry_nodes_bundle.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::blender::StringRefBase::find_first_of(), blender::nodes::BundleKey::from_str(), blender::blender::StringRefBase::is_empty(), blender::blender::StringRefBase::not_found, and blender::blender::StringRefBase::substr().
Referenced by add_path_override(), blender::nodes::node_geo_get_bundle_item_cc::GetBundleItemOperation::execute(), blender::nodes::node_geo_store_bundle_item_cc::StoreBundleItemOperation::execute(), gather_paths(), is_valid_path(), lookup_path(), lookup_path_for_write(), blender::nodes::node_geo_store_bundle_item_cc::node_geo_exec(), and remove_path().
| std::optional< StringRef > blender::nodes::Bundle::type | ( | ) | const |
Definition at line 357 of file geometry_nodes_bundle.cc.
References lookup_ptr(), type(), and type_item_name.
Referenced by blender::nodes::foreach_nested_bundle_item_recursive(), and type().
|
inlinestatic |
Definition at line 98 of file NOD_geometry_nodes_bundle.hh.
Referenced by blender::ed::space_node::bundle_type_string_search_exec(), blender::nodes::combine_bundle_node_type(), blender::nodes::node_geo_combine_bundle_cc::node_declare(), blender::nodes::node_geo_xpbd_solver_cc::node_geo_exec(), blender::ed::space_node::socket_needs_bundle_type_search(), blender::nodes::FlatBundleType::to_bundle_signature(), and type().