diff options
Diffstat (limited to 'source/blender/nodes/shader/node_shader_util.c')
-rw-r--r-- | source/blender/nodes/shader/node_shader_util.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c index 93d03720058..4464a61c48c 100644 --- a/source/blender/nodes/shader/node_shader_util.c +++ b/source/blender/nodes/shader/node_shader_util.c @@ -32,6 +32,11 @@ bool sh_node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree) return STREQ(ntree->idname, "ShaderNodeTree"); } +static bool sh_fn_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree) +{ + return STREQ(ntree->idname, "ShaderNodeTree") || STREQ(ntree->idname, "SimulationNodeTree"); +} + void sh_node_type_base( struct bNodeType *ntype, int type, const char *name, short nclass, short flag) { @@ -42,6 +47,12 @@ void sh_node_type_base( ntype->update_internal_links = node_update_internal_links_default; } +void sh_fn_node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag) +{ + sh_node_type_base(ntype, type, name, nclass, flag); + ntype->poll = sh_fn_poll_default; +} + /* ****** */ void nodestack_get_vec(float *in, short type_in, bNodeStack *ns) |