Summary
In this chapter, we learned how to create and populate a custom UIPanel
via Python and how to integrate that into our add-on. That gave us insight into how the Blender interface works in general and which steps we must take to add our widgets to it.
We also nested layouts together for a more complex appearance and displayed both native and external icons.
Lastly, we learned how to change our panel’s look according to the context without too much increase in complexity, as well as how to add functions to the UI.
This closes the first part of this book, where we gained an overall understanding of how Blender and Python work together and what Python scripts can do.
The add-on we have written relies on an external file called icon_smile_64.png
. If we were to distribute it to the public, we would have to package it as a ZIP file. This is something we are going to do in Chapter 6, which marks the beginning of Part 2, Interactive Tools and Animation.