Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Porces <cmporces>2019-03-16 20:48:22 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-16 22:36:35 +0300
commit9e152f919f2f86cbe3530c6adc34373ebc703904 (patch)
treee3434b83601c03e659b4a1bfd4ae5027f58fa3f5 /source/blender/editors/space_node/node_relationships.c
parent5797a5fc65c87b69460d910a82d219b5e3ea12ad (diff)
Python API: add Python-defined node groups for shaders and compositing.
This was already supported for Cycles shader nodes, but now also works for Eevee and compositing nodes. Instead of a generic NodeCustomGroup, now there is ShaderNodeCustomGroup and CompositorNodeCustomGroup that can be subclassed and registered. Differential Revision: https://developer.blender.org/D4370
Diffstat (limited to 'source/blender/editors/space_node/node_relationships.c')
-rw-r--r--source/blender/editors/space_node/node_relationships.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index e0fce2a5367..d81c764af81 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -124,7 +124,7 @@ static bool node_group_has_output_dfs(bNode *node)
static bool node_group_has_output(Main *bmain, bNode *node)
{
- BLI_assert(node->type == NODE_GROUP);
+ BLI_assert(ELEM(node->type, NODE_GROUP, NODE_CUSTOM_GROUP));
bNodeTree *ntree = (bNodeTree *)node->id;
if (ntree == NULL) {
return false;
@@ -153,7 +153,7 @@ bool node_connected_to_output(Main *bmain, bNodeTree *ntree, bNode *node)
* We could make check more grained here by taking which socket the node
* is connected to and so eventually.
*/
- if (current_node->type == NODE_GROUP) {
+ if (ELEM(current_node->type, NODE_GROUP, NODE_CUSTOM_GROUP)) {
if (current_node->id != NULL &&
ntree_has_drivers((bNodeTree *)current_node->id))
{