This chapter goes over creating an add-on that has one operator and defines one menu. Before jumping into code, it is a good idea to prototype what your operators will do. While sometimes this is not possible, it's often worthwhile trying to do to help clarify the functionality desired. In this example, Patrick explains the features of this "rounded cube" add-on.
- Now that we have the add smooth monkey addon installed…let's take a look at the different pieces it defines.…First closing out the user preference panel,…let's go into the 3D view,…open up the T, tool menu,…go to the create tab and scroll down.…We should see the first element that this addon creates,…that is the smooth monkey panel.…Open this up a little bit larger,…you see that there is a label that says…add smooth monkey named.…Then we have the text property field,…pre-populated with the text Suzanne,…with an icon of a monkey.…
Then we have the add smooth monkey button.…If I delete the default queue,…and then press this button,…you see that the smooth monkey has an adj in 3DC.…If I zoom in and re-position the view on this monkey,…you can see it as similar to the smooth monkey…we created in a previous script.…Note that the second piece that this addon defines…is the smooth monkey operator itself.…That is the button we just pressed.…And as a part of this operator,…it has defined some redo last properties,…namely smoothness, size and name.…
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.