Blender V4.3
blender::ed::space_node::NodeClipboard Struct Reference

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< NodeClipboardItemnodes
 
Vector< ClipboardLinklinks
 
Map< ID *, NodeClipboardItemIDInfoold_ids_to_idinfo
 

Detailed Description

Definition at line 71 of file clipboard.cc.

Member Function Documentation

◆ clear()

◆ copy_add_node()

◆ paste_update_node_id_references()

◆ paste_validate_id_references()

bool blender::ed::space_node::NodeClipboard::paste_validate_id_references ( Main & bmain)
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().

Member Data Documentation

◆ links

Vector<ClipboardLink> blender::ed::space_node::NodeClipboard::links

◆ nodes

Vector<NodeClipboardItem> blender::ed::space_node::NodeClipboard::nodes

◆ old_ids_to_idinfo

Map<ID *, NodeClipboardItemIDInfo> blender::ed::space_node::NodeClipboard::old_ids_to_idinfo

Definition at line 79 of file clipboard.cc.


The documentation for this struct was generated from the following file: