diff options
-rw-r--r-- | source/blender/editors/space_node/node_group.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_view.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c index 26eeaa91dd0..914f8ffbe10 100644 --- a/source/blender/editors/space_node/node_group.c +++ b/source/blender/editors/space_node/node_group.c @@ -92,9 +92,9 @@ static int node_group_operator_editable(bContext *C) * Disabled otherwise to allow pynodes define their own operators * with same keymap. */ - if (STREQ(snode->tree_idname, "ShaderNodeTree") || - STREQ(snode->tree_idname, "CompositorNodeTree") || - STREQ(snode->tree_idname, "TextureNodeTree")) + if (ED_node_is_shader(snode) || + ED_node_is_compositor(snode) || + ED_node_is_texture(snode)) { return true; } @@ -112,11 +112,11 @@ static const char *group_node_idname(bContext *C) { SpaceNode *snode = CTX_wm_space_node(C); - if (STREQ(snode->tree_idname, "ShaderNodeTree")) + if (ED_node_is_shader(snode)) return "ShaderNodeGroup"; - else if (STREQ(snode->tree_idname, "CompositorNodeTree")) + else if (ED_node_is_compositor(snode)) return "CompositorNodeGroup"; - else if (STREQ(snode->tree_idname, "TextureNodeTree")) + else if (ED_node_is_texture(snode)) return "TextureNodeGroup"; return ""; diff --git a/source/blender/editors/space_node/node_view.c b/source/blender/editors/space_node/node_view.c index 8c5d2d82468..80934e7d0a0 100644 --- a/source/blender/editors/space_node/node_view.c +++ b/source/blender/editors/space_node/node_view.c @@ -430,7 +430,7 @@ bool ED_space_node_color_sample(Scene *scene, SpaceNode *snode, ARegion *ar, int float fx, fy, bufx, bufy; bool ret = false; - if (STREQ(snode->tree_idname, ntreeType_Composite->idname) || (snode->flag & SNODE_BACKDRAW) == 0) { + if (!ED_node_is_compositor(snode) || (snode->flag & SNODE_BACKDRAW) == 0) { /* use viewer image for color sampling only if we're in compositor tree * with backdrop enabled */ |