Developing a New Editor

Ok, I found my mistake :slight_smile:

Basically, the “connection” between the python code and the c++ code is in the rna_space.c file, in the rna_enum_space_type_items structure!

The mistake I made was to name in the python file the space type as:

while in the rna_space.c file:

{SPACE_ACTOR, "ACTOR_EDITOR", ICON_INFO, "...", "..." }

I had to use ACTOR_EDITOR in the python file as well :slight_smile: shame on me because it was pretty easy to identify.

By the way, @kilon thank you for the support :slight_smile:

1 Like

Yeah that is coding , forever hunted by Dr Obvious :smiley:

I wish I could more help, glad you found out what was wrong :slight_smile:

1 Like

I am curious, what kind of editor are you developing? If it is a code editor, are you looking to incorporate more of the “modern” features from popular ones like Sublime, Atom or VS Code, such as multi-select, etc.?

Just curious…

Is there any new documentation or release notes about creating a new python editor in Blender 2.80 ?

There is no support for creating editors in Python in 2.8. There was some work towards it, but nothing finished.

3 Likes

@brecht we dont need anyting fancy, being able to add our own tabs to the properties editor is good enough in my opinion.

Are there still plans to implement custom editors for the final 2.8 release? Without it and without the ability to use the T-Shelf for Addons GUI (which admittedly was a mess), I fear Addon developers will have a hard time finding a place for their GUI and will instead clutter the N-Menu, which will result in a mess too.

Maybe in the meantime, a simple new tabbed Editor Type could be introduced that appers in the Editors-List as soon as at least one Addon that uses it is installed. It probably just use the code from the old T-Shelf, but without the vanilla Blender stuff and only Addons.

1 Like

I don’t think there will be custom editor support in 2.80, it would be for a later release. The support for tabs in the N-key sidebar is new in 2.8, and I think the result then will be quite similar to the T-key toolbar in 2.7.

I don’t see how custom editors provide much of a solution to that problem though. For most of the add-ons it would not be convenient to have to open an editor rather than access them from the side of the 3D viewport. There are only a few add-ons where a new editor helps.

Some add-ons can be converted to active tools, which can help clean up the UI by only showing the relevant settings and tools in the topbar when the tool is active.

5 Likes

Indeed, but like you said, some addons really need custom editors.
The N-Panel is narrow, that limits the possibilitiesand UI experience.

1 Like

I will not only have to agree with Brecht , I will take it one step further by saying that Blender has too many editors already.

On the matters of space limitation that’s easily handled by moving settings to properties panel which now has a special tab for addons if I understand it correctly. If you need more flexibility bgl and gpu modules can provide you with means to make your own custom gui anywhere you want. Most complex addons heavily rely on those modules already anyway.

For me the only justification for the introduction of a new editor would be if the addon offered at least 100 (a random big number used as example) new features. If not then an existing editor should be used. However even if it did I still will not find it a good option to introduce a new editor.

1 Like

What if it is a new editor for a rig picker ? A bit like AnimSchool Picker, where you can create and save your own pickers, I think that could be really useful :slight_smile: It doesn’t really fit in the sidebar :confused:

3 Likes

YESSS PLEASE, to add selection, sets, scripts that you can easily run, and buttons that you can rearrange however you feel like, that would be amazing.

1 Like

Well, it depends on the type of addon.

Some addons are entire asset managers, or entire scripting editors, and those kinds of things would be appropriate for an editor.

I was under the impression that Campbell already did the custom Python editors during the code quest?

1 Like

Yes, it really depends on the type of addon,
for example, I want to implement a node-based procedural texture generator for Blender 2.8,
so having its own editor is a must to be able to work with a node graph comfortably.

1 Like

And I can’t wait to see that!
By the way, why wouldn’t the node-editor be already the editor you need?

There was some work on it, but the code is unfinished.

Is the custom editor support done? (in Python I mean)

4 Likes

[2.82] No, you still have to build your own blender and implement the custom editor in C.

1 Like

Some people pointed LuxCoreRenderer already achieved this

Now they have support for both 2.93 and on-going project for v3.0+

Hi… From my own experience with custom node editors I can say that it is better (although not perfect…) to integrate the own nodes into the existing editor than to create and maintain a custom editor, which is of course possible. I spent quite some time using my own editor, but in the end I decided to integrate my nodes into the default editor, and I don’t think I’ll ever use a custom editor again. Only my two cents…
Cheers…