How to create simple button in properties "N" panel

Could someone show me simple script where I could understand how those types of panels are made. I am not a programmer and without a concrete full made script it’s hard for me to understand how to actually get access that panel. But if there is something simple, I’ve found addon tamplate that is ridiculously complicated for me.

Basically I would like to see how would one make a button in “N” panel to add a box.

I am not a coder but I know that Pie Menu Editor 1.15.23 allows to customize the interface (and to add new buttons wherever you want).

Hello,

In text editor, go Template --> Python --> Ui Panel .
This is a code for creating a Panel with some buttons in Properties/Scene window
Assuming that you want it in “N” Panel in 3D View, at the beginning replace thoses lines :

bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'

By :

bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'

Then you can hit Run Script to test, and here you go :

See you :slight_smile: ++
Tricotou

Thank you for your replay but I am trying to learn how to code parts of blender :slight_smile:

Yes that is exactly what I am looking for, but for blender 2.8. Have no use for blender 2.79 to be honest. And that template in blender 2.8 makes menu here:

Replace

bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "scene"

By

bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = "Tool"

Note that in 2.8 you choose the context tab with bl_category, Tool in my example


See you :slight_smile: ++
Tricotou

1 Like

works! templates should be updated