diff options
author | Hans Goudey <h.goudey@me.com> | 2021-03-17 00:35:12 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-03-17 00:35:36 +0300 |
commit | 9a56a3865c06b472ac54c0351e270dcf738add07 (patch) | |
tree | 375bfcdabd2bb184be581ebb95f249938952ad19 /source/blender/blenkernel/BKE_node.h | |
parent | 3e87d8a4315d794efff659e40f0bb9e34e2aec8a (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 'source/blender/blenkernel/BKE_node.h')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 42022cce5a5..f5c617c1d04 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -1384,6 +1384,14 @@ int ntreeTexExecTree(struct bNodeTree *ntree, #define GEO_NODE_SUBDIVIDE 1029 #define GEO_NODE_ATTRIBUTE_REMOVE 1030 #define GEO_NODE_ATTRIBUTE_CONVERT 1031 +#define GEO_NODE_MESH_PRIMITIVE_CUBE 1032 +#define GEO_NODE_MESH_PRIMITIVE_CIRCLE 1033 +#define GEO_NODE_MESH_PRIMITIVE_UV_SPHERE 1034 +#define GEO_NODE_MESH_PRIMITIVE_CYLINDER 1035 +#define GEO_NODE_MESH_PRIMITIVE_ICO_SPHERE 1036 +#define GEO_NODE_MESH_PRIMITIVE_CONE 1037 +#define GEO_NODE_MESH_PRIMITIVE_LINE 1038 +#define GEO_NODE_MESH_PRIMITIVE_PLANE 1039 /** \} */ |