Join Patrick W. Crawford for an in-depth discussion in this video ✓Solution: Create another operator, part of Blender: Python Scripting.
(chiming)…- [Instructor] Now let's look into completing or add-on.…Note that I have freshly opened the challenge.blend file,…and first I'm going to run script.…Again we have our panel and our Add Spotlamps created.…While I'm pressing this, we should note that…switching over to the terminal,…it prints out that there is an invalid operator…called MESH_OT_add_splotlamps_per_mesh.…That is because, when we switch back to Blender…and scroll down to the definition of our operator,…then maximize the Text Editor view,…we can see that it is missing a couple…of the key parts of an operator.…
In particular, it doesn't actually have…an execution function to find.…The first step is to add in this function.…Def execute, and as always, the input is self…and context.…Finally, I'm going to uncomment the provided line,…return 'finished'.…Now at this point I could run script…and then use the operator and it would work properly,…but it still would not do anything.…What we now want to do is find how we can…add a spotlamp to our scene.…
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.