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:
authorHans Goudey <h.goudey@me.com>2021-03-17 00:35:12 +0300
committerHans Goudey <h.goudey@me.com>2021-03-17 00:35:36 +0300
commit9a56a3865c06b472ac54c0351e270dcf738add07 (patch)
tree375bfcdabd2bb184be581ebb95f249938952ad19 /release/scripts/startup/nodeitems_builtins.py
parent3e87d8a4315d794efff659e40f0bb9e34e2aec8a (diff)
Geometry Nodes: Add initial version of mesh primitives
This commit includes nodes to build the following primitives: - Cone - Cylinder - Circle - Cube - UV Sphere - Ico Sphere - Line - Plane/Grid In general the inputs are the same as the corresponding operators in the 3D view. **Line Primitive** The line primitive has two modes-- adding vertices between two end points, or adding vertices each at an offset from the start point. For the former mode, there is a choice between a vertex count and a distance between each point. **Plane Primitive** This commit includes the "Plane" and "Grid" primitives as one node. Generally primitives are named after the simpler form of the shape they create (i.e. "Cone" can make some more complex shapes). Also, generally you want to tweak the number of subdivisions anyway, so defaulting to plane is not an inconvenience. And generally having fewer redundant base primitives is better. **Future Improvements** A following patch proposes to improve the speed of the cylinder, cone, and sphere primitives: D10730. Additional possible future improvements would be adding subdivisions to the cube node and rings to the cone and cylinder nodes. Differential Revision: https://developer.blender.org/D10715
Diffstat (limited to 'release/scripts/startup/nodeitems_builtins.py')
-rw-r--r--release/scripts/startup/nodeitems_builtins.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py
index fefb266e591..e8f2d7db683 100644
--- a/release/scripts/startup/nodeitems_builtins.py
+++ b/release/scripts/startup/nodeitems_builtins.py
@@ -520,6 +520,16 @@ geometry_node_categories = [
NodeItem("GeometryNodeEdgeSplit"),
NodeItem("GeometryNodeSubdivideSmooth"),
NodeItem("GeometryNodeSubdivide"),
+
+ # These should be in a sub-menu, but that requires a refactor to build the add menu manually.
+ NodeItem("GeometryNodeMeshCube"),
+ NodeItem("GeometryNodeMeshCircle"),
+ NodeItem("GeometryNodeMeshUVSphere"),
+ NodeItem("GeometryNodeMeshIcoSphere"),
+ NodeItem("GeometryNodeMeshCylinder"),
+ NodeItem("GeometryNodeMeshCone"),
+ NodeItem("GeometryNodeMeshLine"),
+ NodeItem("GeometryNodeMeshPlane"),
]),
GeometryNodeCategory("GEO_POINT", "Point", items=[
NodeItem("GeometryNodePointDistribute"),