Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/intern/derived_node_tree.cc
| Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | DNode &DerivedNodeTree::create_node(const NodeRef &node_ref, | ||||
| node.inputs_ = allocator_.construct_elements_and_pointer_array<DInputSocket>( | node.inputs_ = allocator_.construct_elements_and_pointer_array<DInputSocket>( | ||||
| node_ref.inputs().size()); | node_ref.inputs().size()); | ||||
| node.outputs_ = allocator_.construct_elements_and_pointer_array<DOutputSocket>( | node.outputs_ = allocator_.construct_elements_and_pointer_array<DOutputSocket>( | ||||
| node_ref.outputs().size()); | node_ref.outputs().size()); | ||||
| for (int i : node.inputs_.index_range()) { | for (int i : node.inputs_.index_range()) { | ||||
| const InputSocketRef &socket_ref = node_ref.input(i); | const InputSocketRef &socket_ref = node_ref.input(i); | ||||
| DInputSocket &socket = *node.inputs_[i]; | DInputSocket &socket = *node.inputs_[i]; | ||||
| socket.is_multi_input_socket_ = socket_ref.bsocket()->flag & SOCK_MULTI_INPUT; | |||||
| socket.id_ = UNINITIALIZED_ID; | socket.id_ = UNINITIALIZED_ID; | ||||
| socket.node_ = &node; | socket.node_ = &node; | ||||
| socket.socket_ref_ = &socket_ref; | socket.socket_ref_ = &socket_ref; | ||||
| r_sockets_map[socket_ref.id()] = &socket; | r_sockets_map[socket_ref.id()] = &socket; | ||||
| } | } | ||||
| for (int i : node.outputs_.index_range()) { | for (int i : node.outputs_.index_range()) { | ||||
| ▲ Show 20 Lines • Show All 436 Lines • Show Last 20 Lines | |||||