Customizing Blender UI by enabling Fullscreen Icon


The following post was the motivation for me to write this article.

http://blenderartists.org/forum/showthread.php?268692-Who-deleted-the-quot-Fullscreen-quot-Button

Most of the User Interface in Blender is setup using Python and thus its very easy to customize it to our needs.

The following illustrations and text explains how to add a Fullscreen icon to the Information Header in Blender 2.64.

Step 1

Launch a fresh instance of Blender and take a look at the Toggle Fullscreen menu item. If you hover the mouse over the menu item you will notice the Python operator that will get executed when the menu item is clicked.

Step 2

Now to solve the problem at hand, we are going to make use of one of the best features I have ever seen in a software application: Its the ability of Blender to allow the user to investigate the Python source code that resulted in the interface element (Menu, Button, Checkbox, Dropdown, etc).

Right click on the Help Menu and click on the Edit Source menu item.

Step 3

The previous action will create a Text data block in Blender and notify the user (As can be seen in the illustration below)

Step 4

So, without any delay, switch the Editor from 3D-View to Text Editor.

Step 5

You will promptly notice that Blender positions the cursor on the line where the Help Menu was laid out!!!! (Green box below)

Step 6

  1. You will notice that the full file path of the user interface definition script is displayed.
  2. Press CTRL+F to display the Properties Panel.

Step 7

  1. In the Properties Panel,  Check the Highlight Line feature.
  2. Click Window Menu and with the mouse over the Toggle Fullscreen menu item, press CTRL+C, to copy the Python operator that performs the action of making the application window fullscreen.

Step 8

With the operator copied from the previous step, we now have to perform the following steps
  1. Paste the copied operator and comment it out. This is for our reference only (#1)
  2. Layout the operator in the header by typing the python statement (#2)
  3. Check if the indentation is proper (Refer to the alignment of the vertical red line #3)
  4. Hover the mouse over the Fullscreen icon to the right of Help Menu. Click it to Fullscreen the application.

Step 9

Its time to save the changes we have made to the python script (remember, which comes bundled with Blender). Refer to the illustration below.

Step 10

And that is how its done.

I have also recorded a video covering all the steps above and an extra trick as well. There is no dialogue though.

Until next time!

Comments

Popular Posts