Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_nodetree.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 2,029 Lines • ▼ Show 20 Lines | |||||
| static bNodeSocket *rna_Node_inputs_new(ID *id, | static bNodeSocket *rna_Node_inputs_new(ID *id, | ||||
| bNode *node, | bNode *node, | ||||
| Main *bmain, | Main *bmain, | ||||
| ReportList *reports, | ReportList *reports, | ||||
| const char *type, | const char *type, | ||||
| const char *name, | const char *name, | ||||
| const char *identifier) | const char *identifier) | ||||
| { | { | ||||
| if (ELEM(node->type, NODE_GROUP_INPUT, NODE_FRAME)) { | |||||
| BKE_report(reports, RPT_ERROR, "Unable to create socket"); | |||||
| return NULL; | |||||
| } | |||||
| /* Adding an input to a group node is not working, | /* Adding an input to a group node is not working, | ||||
| * simpler to add it to its underlying nodetree. */ | * simpler to add it to its underlying nodetree. */ | ||||
| if (ELEM(node->type, NODE_GROUP, NODE_CUSTOM_GROUP) && node->id != NULL) { | if (ELEM(node->type, NODE_GROUP, NODE_CUSTOM_GROUP) && node->id != NULL) { | ||||
| return rna_NodeTree_inputs_new((bNodeTree *)node->id, bmain, reports, type, name); | return rna_NodeTree_inputs_new((bNodeTree *)node->id, bmain, reports, type, name); | ||||
| } | } | ||||
| bNodeTree *ntree = (bNodeTree *)id; | bNodeTree *ntree = (bNodeTree *)id; | ||||
| bNodeSocket *sock; | bNodeSocket *sock; | ||||
| Show All 14 Lines | |||||
| static bNodeSocket *rna_Node_outputs_new(ID *id, | static bNodeSocket *rna_Node_outputs_new(ID *id, | ||||
| bNode *node, | bNode *node, | ||||
| Main *bmain, | Main *bmain, | ||||
| ReportList *reports, | ReportList *reports, | ||||
| const char *type, | const char *type, | ||||
| const char *name, | const char *name, | ||||
| const char *identifier) | const char *identifier) | ||||
| { | { | ||||
| if (ELEM(node->type, NODE_GROUP_OUTPUT, NODE_FRAME)) { | |||||
| BKE_report(reports, RPT_ERROR, "Unable to create socket"); | |||||
| return NULL; | |||||
| } | |||||
| /* Adding an output to a group node is not working, | /* Adding an output to a group node is not working, | ||||
| * simpler to add it to its underlying nodetree. */ | * simpler to add it to its underlying nodetree. */ | ||||
| if (ELEM(node->type, NODE_GROUP, NODE_CUSTOM_GROUP) && node->id != NULL) { | if (ELEM(node->type, NODE_GROUP, NODE_CUSTOM_GROUP) && node->id != NULL) { | ||||
| return rna_NodeTree_outputs_new((bNodeTree *)node->id, bmain, reports, type, name); | return rna_NodeTree_outputs_new((bNodeTree *)node->id, bmain, reports, type, name); | ||||
| } | } | ||||
| bNodeTree *ntree = (bNodeTree *)id; | bNodeTree *ntree = (bNodeTree *)id; | ||||
| bNodeSocket *sock; | bNodeSocket *sock; | ||||
| ▲ Show 20 Lines • Show All 7,961 Lines • Show Last 20 Lines | |||||