49 if (socket->identifier == identifier) {
73 if (
node->typeinfo->poll(
node->typeinfo, nodetree, disabled_hint)) {
92 if (grouptree ==
nullptr) {
96 if (nodetree == grouptree) {
97 *r_disabled_hint =
TIP_(
"Nesting a node group inside of itself is not allowed");
102 if (
node->typeinfo->poll_instance &&
103 !
node->typeinfo->poll_instance(
node, nodetree, r_disabled_hint)) {
121 interface_socket.
name);
134 strcpy(socket_to_update.
name, interface_socket.
name);
146 &
node_tree, &interface_socket, &
node, &socket_to_update,
"interface");
161 const bool ensure_extend_socket_exists)
169 if (matching_socket) {
183 if (ensure_extend_socket_exists) {
185 if (last_socket !=
nullptr &&
STREQ(last_socket->
identifier,
"__extend__")) {
203 if (index < ordered_old_sockets.
size()) {
204 if (ordered_old_sockets[index] != new_socket) {
216 if (
node->id ==
nullptr) {
243 data->label_size = 20;
249 bNodeType *ntype = MEM_cnew<bNodeType>(
"frame node type");
279 bNodeType *ntype = MEM_cnew<bNodeType>(
"frame node type");
296 nodes_to_check.
push(link->tonode);
299 nodes_to_check.
push(link->fromnode);
303 while (!nodes_to_check.
is_empty()) {
304 bNode *reroute_node = nodes_to_check.
pop();
306 if (r_reroute_types.
add(reroute_node, current_type)) {
309 nodes_to_check.
push(link->fromnode);
314 nodes_to_check.
push(link->tonode);
329 if (link->fromsock ==
nullptr || link->tosock ==
nullptr) {
336 nodes_linked_with_reroutes.
add(link->fromnode);
339 nodes_linked_with_reroutes.
add(link->tonode);
341 links_map.
add(link->fromsock, link);
342 links_map.
add(link->tosock, link);
349 for (
bNode *start_node : nodes_linked_with_reroutes) {
357 for (
bNode *start_node : nodes_linked_with_reroutes) {
364 for (
const auto item : reroute_types.
items()) {
365 bNode *reroute_node = item.key;
370 if (input_socket->
typeinfo != socket_type) {
373 if (output_socket->typeinfo != socket_type) {
422 if (
node->id ==
id) {
468 linknext = link->
next;
474 bNodeLink *tlink = MEM_cnew<bNodeLink>(
"temporary link");
483 exposelink =
nullptr;
484 for (link = (
bNodeLink *)tmplinks.first; link; link = link->
next) {
505 for (link = (
bNodeLink *)tmplinks.first; link; link = link->
next) {
520 bNodeType *ntype = MEM_cnew<bNodeType>(
"node type");
560 linknext = link->
next;
565 if (link->
tosock == extsock) {
566 bNodeLink *tlink = MEM_cnew<bNodeLink>(
"temporary link");
575 exposelink =
nullptr;
576 for (link = (
bNodeLink *)tmplinks.first; link; link = link->
next) {
598 for (link = (
bNodeLink *)tmplinks.first; link; link = link->
next) {
610 bNodeType *ntype = MEM_cnew<bNodeType>(
"node type");
#define NODE_CLASS_OUTPUT
void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth)
bool nodeLinkIsHidden(const struct bNodeLink *link)
#define NODE_CLASS_INTERFACE
struct bNodeSocket * nodeAddSocket(struct bNodeTree *ntree, struct bNode *node, eNodeSocketInOut in_out, const char *idname, const char *identifier, const char *name)
void node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass)
void node_type_update(struct bNodeType *ntype, void(*updatefunc)(struct bNodeTree *ntree, struct bNode *node))
void nodeModifySocketType(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *sock, const char *idname)
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
void nodeRemoveAllSockets(struct bNodeTree *ntree, struct bNode *node)
void nodeRemLink(struct bNodeTree *ntree, struct bNodeLink *link)
struct bNodeSocket * nodeAddStaticSocket(struct bNodeTree *ntree, struct bNode *node, eNodeSocketInOut in_out, int type, int subtype, const char *identifier, const char *name)
struct bNodeSocket * ntreeAddSocketInterfaceFromSocket(struct bNodeTree *ntree, struct bNode *from_node, struct bNodeSocket *from_sock)
void node_type_storage(struct bNodeType *ntype, const char *storagename, void(*freefunc)(struct bNode *node), void(*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node))
struct bNodeLink * nodeAddLink(struct bNodeTree *ntree, struct bNode *fromnode, struct bNodeSocket *fromsock, struct bNode *tonode, struct bNodeSocket *tosock)
void nodeRemoveSocket(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *sock)
#define NODE_CLASS_LAYOUT
void nodeRegisterType(struct bNodeType *ntype)
void BKE_ntree_update_tag_interface(struct bNodeTree *ntree)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
#define ID_IS_LINKED(_id)
#define NODE_FRAME_SHRINK
Read Guarded memory(de)allocation.
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Map
bool add(const Key &key, const Value &value)
ItemIterator items() const
Span< Value > lookup(const Key &key) const
void add(const Key &key, const Value &value)
void push(const T &value)
SyclQueue void void size_t num_bytes void
void(* MEM_freeN)(void *vmemh)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
bNodeSocket * node_group_output_find_socket(bNode *node, const char *identifier)
void BKE_node_tree_unlink_id(ID *id, struct bNodeTree *ntree)
static void node_reroute_init(bNodeTree *ntree, bNode *node)
void node_group_update(struct bNodeTree *ntree, struct bNode *node)
bool node_group_poll_instance(bNode *node, bNodeTree *nodetree, const char **disabled_hint)
static bool node_is_connected_to_output_recursive(bNodeTree *ntree, bNode *node)
void register_node_type_group_output()
static void propagate_reroute_type_from_start_socket(bNodeSocket *start_socket, const MultiValueMap< bNodeSocket *, bNodeLink * > &links_map, Map< bNode *, const bNodeSocketType * > &r_reroute_types)
void register_node_type_group_input()
static void group_verify_socket_list(bNodeTree &node_tree, bNode &node, const ListBase &interface_sockets, ListBase &verify_lb, const eNodeSocketInOut in_out, const bool ensure_extend_socket_exists)
void ntree_update_reroute_nodes(bNodeTree *ntree)
void register_node_type_frame()
static bNodeSocket * find_matching_socket(ListBase &sockets, StringRef identifier)
void node_group_label(const bNodeTree *UNUSED(ntree), const bNode *node, char *label, int maxlen)
void node_group_input_update(bNodeTree *ntree, bNode *node)
static void node_group_output_init(bNodeTree *ntree, bNode *node)
bool BKE_node_is_connected_to_output(bNodeTree *ntree, bNode *node)
bNodeSocket * node_group_find_output_socket(bNode *groupnode, const char *identifier)
static void node_frame_init(bNodeTree *UNUSED(ntree), bNode *node)
static void update_socket_to_match_interface(bNodeTree &node_tree, bNode &node, bNodeSocket &socket_to_update, const bNodeSocket &interface_socket)
bNodeSocket * node_group_input_find_socket(bNode *node, const char *identifier)
static void node_group_input_init(bNodeTree *ntree, bNode *node)
bool nodeGroupPoll(bNodeTree *nodetree, bNodeTree *grouptree, const char **r_disabled_hint)
static void add_new_socket_from_interface(bNodeTree &node_tree, bNode &node, const bNodeSocket &interface_socket, const eNodeSocketInOut in_out)
bNodeSocket * node_group_find_input_socket(bNode *groupnode, const char *identifier)
void node_group_output_update(bNodeTree *ntree, bNode *node)
static bool is_group_extension_socket(const bNode *node, const bNodeSocket *socket)
void register_node_type_reroute()
void node_copy_standard_storage(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, const bNode *src_node)
void node_free_standard_storage(bNode *node)
int multi_input_socket_index
void(* interface_init_socket)(struct bNodeTree *ntree, const struct bNodeSocket *interface_socket, struct bNode *node, struct bNodeSocket *sock, const char *data_path)
void(* interface_verify_socket)(struct bNodeTree *ntree, const struct bNodeSocket *interface_socket, struct bNode *node, struct bNodeSocket *sock, const char *data_path)
struct bNodeSocket * next
struct bNodeSocketType * typeinfo
void(* free_self)(struct bNodeType *ntype)