Returning to the built-in templates, Patrick goes over a couple example panel setups and how to use them to quickly create your custom panels without having to rewrite a lot of code each time it is needed. He shows how you can peek into the code of existing panels to explore how they are setup and learn how to use other UI elements like enum properties and lists. Sometimes it is easier to copy the layout structure from a panel you like than building it from scratch on your own.
- [Instructor] Now that we have explored how to use…operators in properties inside of panel, you can now…look at a more advanced example file that's included…inside of Blender using a template.…Let's open up the script editor, and then from Templates…go to Python, and then this time we're gonna use…the UI Panel example.…Enable word numbers, word wrapping, and syntax highlighting.…I'm gonna increase the size of the script,…and then I'm gonna press Run Script.…You'll notice nothing happened at first,…but again, we can figure out where this panel exists…by going to the space type.…
This tells us it is under the Property window,…under the main window drawing area,…and then under the scene tab.…The scene tab would be this one over here,…so we can expect our panel to be at the bottom, as it is.…Layout Demo as available here.…Increasing the size of this panel but you can see…this is a more advanced example of ways we can…lay out operators as well as properties in a window.…You can see things like columns, rows,…and different sizes of elements.…
AuthorPatrick W. Crawford
- Controlling Blender with code
- Exploring the bpy library
- Creating Blender operators and properties
- Writing scripts
- Auto running scripts
- Drawing interface elements such as panels and menus
- Building a custom add-on
Skill Level Intermediate
1. Controlling Blender through Code
2. Create Blender Scripts
3. Customize Blender Interfaces
4. Build Your Own Add-On
Next steps1m 15s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.