diff options
author | Léo Depoix <PiloeGAO> | 2020-10-31 12:51:09 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-10-31 12:51:09 +0300 |
commit | f8c52590c0f928a31d005942508b446358057794 (patch) | |
tree | b7d1aa54568a695ada5fc119f109b264a7291a4f /source/blender/editors/space_node/drawnode.c | |
parent | 0b897e0308e5ab461d33ee12ef3542b82a8544c3 (diff) |
Geometry Nodes: new Subdivision Surface node
This node is similar to the subdivision surface modifier. It subdivides
the mesh component of a geometry. The options have the same meaning
as in the modifier.
Differential Revision: https://developer.blender.org/D9364
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 90b873a2744..51486e398c2 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3145,12 +3145,26 @@ static void node_geometry_buts_boolean_math(uiLayout *layout, bContext *UNUSED(C uiItemR(layout, ptr, "operation", DEFAULT_FLAGS, "", ICON_NONE); } +static void node_geometry_buts_subdivision_surface(uiLayout *layout, + bContext *UNUSED(C), + PointerRNA *UNUSED(ptr)) +{ +#ifndef WITH_OPENSUBDIV + uiItemL(layout, IFACE_("Disabled, built without OpenSubdiv"), ICON_ERROR); +#else + UNUSED_VARS(layout); +#endif +} + static void node_geometry_set_butfunc(bNodeType *ntype) { switch (ntype->type) { case GEO_NODE_BOOLEAN: ntype->draw_buttons = node_geometry_buts_boolean_math; break; + case GEO_NODE_SUBDIVISION_SURFACE: + ntype->draw_buttons = node_geometry_buts_subdivision_surface; + break; } } |