Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/node_shader_util.cc
| Show All 20 Lines | bool sh_node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree, const char **r_disabled_hint) | ||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| static bool sh_fn_poll_default(bNodeType *UNUSED(ntype), | static bool sh_fn_poll_default(bNodeType *UNUSED(ntype), | ||||
| bNodeTree *ntree, | bNodeTree *ntree, | ||||
| const char **r_disabled_hint) | const char **r_disabled_hint) | ||||
| { | { | ||||
| if (!STR_ELEM(ntree->idname, "ShaderNodeTree", "GeometryNodeTree")) { | if (!STR_ELEM(ntree->idname, "ShaderNodeTree", "GeometryNodeTree", "TextureNodeTree")) { | ||||
| *r_disabled_hint = TIP_("Not a shader or geometry node tree"); | *r_disabled_hint = TIP_("Not a shader, texture or geometry node tree"); | ||||
| return false; | return false; | ||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| void sh_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass) | void sh_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass) | ||||
| { | { | ||||
| node_type_base(ntype, type, name, nclass); | node_type_base(ntype, type, name, nclass); | ||||
| ▲ Show 20 Lines • Show All 304 Lines • Show Last 20 Lines | |||||