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:
authorLéo Depoix <PiloeGAO>2020-10-31 12:51:09 +0300
committerJacques Lucke <jacques@blender.org>2020-10-31 12:51:09 +0300
commitf8c52590c0f928a31d005942508b446358057794 (patch)
treeb7d1aa54568a695ada5fc119f109b264a7291a4f /source/blender/editors/space_node/drawnode.c
parent0b897e0308e5ab461d33ee12ef3542b82a8544c3 (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.c14
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;
}
}