Almost all areas of blender's user interface is accessible by a python file, and blender provides easy access to these files. If you see a panel display something or do something you want your own script to do, then it is a simple right-click away to view the source code. This is particularly useful for developing UI panel layouts.
- [Instructor] One interesting initial thing to know…about Blender is that, while most of its code…is written and complied in C++,…most of the user interface you actually see now…is written and run using Python,…and you're actually able to see and edit…most of the code simply by hovering over…one of the panels, right clicking any user interface item…and then using the Edit Source button.…After doing so, you should see the info window saying…that a new text block has been created in the text editor.…If I convert the 3D view here into a text editor…and then select the new data block that was created,…you can see by scrolling up a little bit…that I have the code here that draws and defines that panel.…
You see here the line of code is what I actually…right clicked and chose Edit Source from,…it's the actual button that renders…in this panel on the right.…And this entire class is what defines…the entirety of this panel over here.…While in chapter three we're gonna go into more…of the details of what a panel is and how to create it,…
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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.