This patch includes nodes to build the following primitives:
[x] Cone
[x] Cylinder
[x] Circle
[x] Cube
[x] UV Sphere
[x] Ico Sphere
[x] Line
[ ] Plane/Grid
In general the inputs are the same as the corresponding operators in the 3D view.
Most primitives are re-implimented to produce meshes directly instead of `BMesh`
for speed. Often this can make a noticeable difference, at least for larger shapes.
Even small speedups can matter in the nodes system especially since it's non-destructive.
| {F9889711} | {F9889712}
| {F9889715} | {F9889716}
| {F9889717} | {F9889720}
| {F9889722} | {F9889724}
| {F9889725} | {F9889728}
| {F9889729} | {F9889730}
The new implementations don't add a default UV map right now, but that would
be simple to add.
The cylinder primitive is a special case of the cone primitive, so they share the same
implementation. In general, there may be some simplifications possible in this code.
One that I'm considering making is a function to fill a fan of corners and polygons
given some parameters. Another improvement might be adding the ability to
use a different fill type for the top and bottom. I structured it so that would be
easy to add at some point.
For the line primitive there are two options-- 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.