4
$\begingroup$

I want to create a menu item in the left side pane with a text box and file browser included in it. I know how to create a simple addon. But couldnt understand how to create a menu item.

$\endgroup$
8
$\begingroup$

Open Text Editor then choose Templates->Python you will find templates for simple menus and panels (Ui Menu, Ui Simple Menu, Ui Panel, Ui Simple Panel), run them and see how it goes, they should give you a very good understanding of what you can do.

enter image description here

Running the UI Simple Panel will show it under the object properties as shown below, the location of the panel is specified using these three class parameters:

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

enter image description here

To put in the left side you change the values as shown below:

enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks. When running that where will it show up? I was trying to run Ui Panel Simple. But couldn't find it anywhere $\endgroup$ – user5507 Feb 13 '17 at 7:32
  • $\begingroup$ @user5507 answer updated showing where it is located $\endgroup$ – Tak Feb 13 '17 at 7:40
  • $\begingroup$ How to do that in the left side panel? $\endgroup$ – user5507 Feb 13 '17 at 8:02
  • $\begingroup$ @user5507 answer updated to put it on the left side. Don't forget to accept and upvote the answer if it solved your problem. $\endgroup$ – Tak Feb 13 '17 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.