Sorry, this one slipped past while I was distracted by mince pies and suchlike. We don't have documentation for writing new Scene nodes right now, and it's still not as straightforward as I'd like it to be, but hopefully one of the existing nodes provides
a good starting point. Depending on what you want to do exactly, different nodes will be relevant.
If you want to generate a new object from scratch, but without needing to generate a hierarchy, deriving from the ObjectSource node is the way to go. The Sphere, Cube and Plane nodes are good examples - you just need to implement affects(), hashSource()
and computeSource() and the rest will be done for you :
If you want to generate a whole hierarchy from scratch, the AlembicSource is probably the simplest example at the moment. Because you're generating a whole hierarchy you now have additional responsibilities - computing the transform, bound, attributes
and child names at each location in the hierarchy :
If you want to modify an existing scene by adding on a new branch containing your geometry (because your procedural process requires some input geometry), then the BranchCreator base class is your friend. The Seeds node is probably the simplest example
of that :
It might also be worth checking out the scene query API documentation - although this is written from the point of view of someone querying a scene rather than generating one, it should give you some understanding of how Gaffer represents scenes and therefore
what is going on in the nodes themselves :
Please do get back to us with questions if you hit problems with any of this - I'll be less tardy with my response next time.
Cheers...
John