Add custom spaces in python API

Blender’s Python API could benefit from a function that could create a new editor/space. I want to make an addon that needs this functionality. Somewhat like adding a new button here:

It’s possible to add a custom space. For example, the Animation Nodes add-on does it:

image

1 Like

I think that comes free with the node add-ons.

Hmmm, not sure what you’re trying to say here?

The custom nodes Python template lets you add a custom spaces already which is part of writing node add-ons. You get to create that menu item anytime you create a node tree add-on.

That was probably how the Animation Nodes started.

Right, but I’m not sure OP wants to create a new node editor.

In my plugin i also needed a special editor/place to put all my stuff so i hijacked the preferences interface

New

There’s two ways of doing this

either you replace and restore the draw function of the class

or you register a new class with the same name and restore by importing and registering the real class back from the blender python gui code

2 Likes

ROFL “hijacked”… Nice solution, very helpful.

I’ve had to do this as well in the past, it’s not an ideal solution but it works in a pinch. It would be great if we could build custom editors for addons- I can think of plenty of uses for it right off the top of my head. Unfortunately these would be specific examples for my studio pipeline and would probably not make sense to most people- but I guess that’s the point. Having more flexibility opens up Blender to more widespread use as a central pipeline DCC rather than a component in a larger software ecosystem. more time spent in a single tool == more efficiency.

I think we may be hitting the intentional API limitation with such requests
Hope not

Not sure what fit in the intentional limitation range and what’s not