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:
authorDalai Felinto <dalai@blender.org>2020-12-16 18:59:30 +0300
committerDalai Felinto <dalai@blender.org>2020-12-16 19:13:46 +0300
commita7628ec22abca8d1aaada75a8227638947168a3a (patch)
treeaa2c28a1647bdcb39f1a8690dfee3b455355b986 /source/blender/editors
parentd23894d3ef3f019eeb88ef3da77e8416c6f70f29 (diff)
Geometry Nodes: Poisson disk point distribution node/method
This patch does two things: * Introduce a Seed to the random distribution method * Bring in a new distribution method for the point scattering node Patch Review: https://developer.blender.org/D9787 Note: This commit doesn't not handle doversion. Which means that users need to manually update their files that were using the Point Distribute node and reconnect inputs to the "Maximum Density" socket. Original patch by Sebastian Parborg, with changes to not rely on the cy libraries and overall cleanup. Patch review by Jacques Lucke, besides help with the new "heap" system that was required for this algorithm. Based on Cem Yuksel. 2015. Sample Elimination for Generating Poisson Disk Sample. Sets. Computer Graphics Forum 34, 2 (May 2015), 25-32 http://www.cemyuksel.com/research/sampleelimination/
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_node/drawnode.c10
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 421d645d7bd..2857c08cad6 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -3208,6 +3208,13 @@ static void node_geometry_buts_attribute_mix(uiLayout *layout,
uiItemR(col, ptr, "input_type_b", DEFAULT_FLAGS, IFACE_("B"), ICON_NONE);
}
+static void node_geometry_buts_attribute_point_distribute(uiLayout *layout,
+ bContext *UNUSED(C),
+ PointerRNA *ptr)
+{
+ uiItemR(layout, ptr, "distribute_method", DEFAULT_FLAGS, "", ICON_NONE);
+}
+
static void node_geometry_set_butfunc(bNodeType *ntype)
{
switch (ntype->type) {
@@ -3235,6 +3242,9 @@ static void node_geometry_set_butfunc(bNodeType *ntype)
case GEO_NODE_ATTRIBUTE_MIX:
ntype->draw_buttons = node_geometry_buts_attribute_mix;
break;
+ case GEO_NODE_POINT_DISTRIBUTE:
+ ntype->draw_buttons = node_geometry_buts_attribute_point_distribute;
+ break;
}
}