|
Blender V4.3
|
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 71 of file clipboard.cc.
|
inline |
Completely empty the current clipboard content.
Definition at line 82 of file clipboard.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear_and_shrink(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear_and_shrink(), blender::bke::node_free_node(), and nodes.
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 222 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::NodeClipboardItem::draw_rect, Library_Runtime::filepath_abs, ID_IS_LINKED, blender::ed::space_node::NodeClipboardItemIDInfo::id_name, 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, ID::name, blender::bke::node_copy_with_mapping(), blender::bke::node_node_foreach_id(), 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 182 of file clipboard.cc.
References BKE_library_foreach_subdata_id(), BLI_assert_msg, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), 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 101 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_msg, BLI_findstring(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), GS, blender::ed::space_node::NodeClipboardItemIDInfo::id_name, IDWALK_READONLY, IDWALK_RET_NOP, is_valid, Main::libraries, 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(), nodes, offsetof, 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 73 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 72 of file clipboard.cc.
Referenced by clear(), blender::ed::space_node::node_clipboard_paste_exec(), and paste_validate_id_references().
| Map<ID *, NodeClipboardItemIDInfo> blender::ed::space_node::NodeClipboard::old_ids_to_idinfo |
Definition at line 79 of file clipboard.cc.