Coding a new geometry node

Hello blender artists,

Long story short, I need functionnality (basic I might add) which is not available in geometry nodes. So I want to code a new geometry node. My understanding is that bpy does not offer such functionnality. So I have to make it in C++. But can I code an addon in C++ or do I necessarily have to fork blender to add my tiny feature (getting the physical size of instances) ?

Thanks.

What kind of new functionality do you want to implement? if it’s only ‘getting the physical size of instances’… isn’t the Bounding Box node sufficient?
There are things that you can build with the current API, and things you can’t (and you need to jump into C++).

The bounding box node would be perfect for this, but it doesn’t work on instances for some reason (a bug ?..). I found this workaround, but it doesn’t quite work in my project and I don’t really understand it.

From my understanding, the main use of the bpy API is to automate features of blender, not make new ones, right ? Especially modifiers I think are completely untouchable. I don’t mind delving into C++, I’ve done it before, but I don’t really want to have to fork blender just to do this one simple thing.

In 4.2, you could use this instead…
instance_size

But that gives the scale of the instance, not its physical size. And I’m using instanced objects that are not created in geometry nodes, so their scale is always 1,1,1…

Then I believe you need to implement this in the source code…
The documentation says:

https://docs.blender.org/manual/en/latest/modeling/geometry_nodes/geometry/operations/bounding_box.html