diff options
author | Jacques Lucke <jacques@blender.org> | 2020-12-11 20:00:37 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-12-11 20:00:37 +0300 |
commit | f5dc34ec9c05cc8f1163313baafe634f4798c29b (patch) | |
tree | b3cc27fc8009fc0180f4b35c5c3646cb2527a72c /source/blender/editors | |
parent | 5ced167336d49ef42e96e205c72d3935ff302a7e (diff) |
Geometry Nodes: support instancing collections
The Point Instance node can instance entire collections now.
Before, only individual collections were supported.
Randomly selecting objects from the collection on a per point basis
is not support, yet.
Last part of D9739.
Ref T82372.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index f1ab433c639..f8c71791054 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3182,6 +3182,13 @@ static void node_geometry_buts_attribute_math(uiLayout *layout, uiItemR(layout, ptr, "input_type_b", DEFAULT_FLAGS, IFACE_("Type B"), ICON_NONE); } +static void node_geometry_buts_point_instance(uiLayout *layout, + bContext *UNUSED(C), + PointerRNA *ptr) +{ + uiItemR(layout, ptr, "instance_type", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE); +} + static void node_geometry_buts_attribute_fill(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) @@ -3219,6 +3226,9 @@ static void node_geometry_set_butfunc(bNodeType *ntype) case GEO_NODE_ATTRIBUTE_MATH: ntype->draw_buttons = node_geometry_buts_attribute_math; break; + case GEO_NODE_POINT_INSTANCE: + ntype->draw_buttons = node_geometry_buts_point_instance; + break; case GEO_NODE_ATTRIBUTE_FILL: ntype->draw_buttons = node_geometry_buts_attribute_fill; break; |