Customizing Blender UI by enabling Fullscreen Icon
The following post was the motivation for me to write this article.
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.
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.
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.
The previous action will create a Text data block in Blender and notify the user (As can be seen in the illustration below)
Step 4So, without any delay, switch the Editor from 3D-View to Text Editor.
You will promptly notice that Blender positions the cursor on the line where the Help Menu was laid out!!!! (Green box below)
- You will notice that the full file path of the user interface definition script is displayed.
- Press CTRL+F to display the Properties Panel.
- In the Properties Panel, Check the Highlight Line feature.
- 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 8With the operator copied from the previous step, we now have to perform the following steps
- Paste the copied operator and comment it out. This is for our reference only (#1)
- Layout the operator in the header by typing the python statement (#2)
- Check if the indentation is proper (Refer to the alignment of the vertical red line #3)
- Hover the mouse over the Fullscreen icon to the right of Help Menu. Click it to Fullscreen the application.
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 10And 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!