|
Blender V5.0
|
Public Member Functions | |
| void | clear () |
| bool | paste_validate_id_references (Main &bmain) |
| void | paste_update_node_id_references (bNode &node) |
| void | copy_add_node (const bNode &node, Map< const bNode *, bNode * > &node_map, Map< const bNodeSocket *, bNodeSocket * > &socket_map) |
Public Attributes | |
| Vector< NodeClipboardItem > | nodes |
| Vector< ClipboardLink > | links |
| Map< ID *, NodeClipboardItemIDInfo > | old_ids_to_idinfo |
Definition at line 83 of file clipboard.cc.
|
inline |
Completely empty the current clipboard content.
Definition at line 94 of file clipboard.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear_and_shrink(), and blender::bke::node_free_node().
Referenced by ED_node_clipboard_free(), and blender::ed::space_node::node_clipboard_copy_exec().
|
inline |
Add a new node to the clipboard.
Definition at line 255 of file clipboard.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_library_foreach_subdata_id(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::ed::space_node::data, ID::deep_hash, blender::ed::space_node::NodeClipboardItem::draw_rect, bNode::flag, ID_IS_LINKED, ID_IS_PACKED, blender::ed::space_node::NodeClipboardItemIDInfo::id_name, bNode::identifier, IDWALK_READONLY, IDWALK_RET_NOP, ID::lib, LIB_ID_CREATE_NO_MAIN, LIB_ID_CREATE_NO_USER_REFCOUNT, blender::ed::space_node::NodeClipboardItemIDInfo::library_path, bNode::name, ID::name, NODE_ACTIVE, blender::bke::node_copy_with_mapping(), blender::bke::node_node_foreach_id(), blender::ed::space_node::NodeClipboardItemIDInfo::packed_id_hash, bNode::runtime, and Library::runtime.
Referenced by blender::ed::space_node::node_clipboard_copy_exec().
|
inline |
Ensure that a newly pasted copy of a node from the clipboard has valid ID references, as ensured by paste_validate_id_references.
Definition at line 215 of file clipboard.cc.
References BKE_library_foreach_subdata_id(), BLI_assert_msg, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::ed::space_node::data, id_us_plus(), IDWALK_CB_USER, IDWALK_NOP, IDWALK_RET_NOP, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), blender::ed::space_node::NodeClipboardItemIDInfo::new_id, and blender::bke::node_node_foreach_id().
Referenced by blender::ed::space_node::node_clipboard_paste_exec().
|
inline |
Find valid current pointers for all IDs used by the nodes in the clipboard.
DO NOT update the nodes' pointers here though, as this would affect the clipboard content, which is no desired here. It should remain as in original state, such that e.g. one can copy nodes in file A.blend, open file B.blend, paste nodes (and lose some of the invalid ID references in file B.blend), and then open again file A.blend, paste nodes, and lose no ID references.
Definition at line 113 of file clipboard.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), BKE_library_foreach_subdata_id(), BKE_main_idmap_create(), BKE_main_idmap_destroy(), BKE_main_idmap_lookup_name(), BLI_assert, BLI_assert_msg, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::ed::space_node::data, ID::deep_hash, Library::flag, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, GS, ID_IS_PACKED, blender::ed::space_node::NodeClipboardItemIDInfo::id_name, IDWALK_READONLY, IDWALK_RET_NOP, Main::libraries, LIBRARY_FLAG_IS_ARCHIVE, blender::ed::space_node::NodeClipboardItemIDInfo::library_path, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), MAIN_IDMAP_TYPE_NAME, blender::ed::space_node::NodeClipboardItemIDInfo::new_id, blender::bke::node_node_foreach_id(), blender::ed::space_node::NodeClipboardItemIDInfo::packed_id_hash, blender::bke::library::search_filepath_abs(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values().
Referenced by blender::ed::space_node::node_clipboard_paste_exec().
| Vector<ClipboardLink> blender::ed::space_node::NodeClipboard::links |
Definition at line 85 of file clipboard.cc.
Referenced by blender::ed::space_node::node_clipboard_copy_exec(), and blender::ed::space_node::node_clipboard_paste_exec().
| Vector<NodeClipboardItem> blender::ed::space_node::NodeClipboard::nodes |
Definition at line 84 of file clipboard.cc.
Referenced by blender::ed::space_node::node_clipboard_paste_exec().
| Map<ID *, NodeClipboardItemIDInfo> blender::ed::space_node::NodeClipboard::old_ids_to_idinfo |
Definition at line 91 of file clipboard.cc.