Join Patrick W. Crawford for an in-depth discussion in this video ✓Solution: Create a simple script, part of Python Scripting for Blender.
(echo effect)…- [Instructor] Now let's look into the solution…to these two tasks.…The first task our goal is to change the scale…of only the selected objects.…We have already seen how to get to select objects…by using bpy.context.selected_objects.…But next we need to figure out how to change the scale…on any individual objects.…For this we can make use of our shortcut key…to autocomplete.…
Let's first do a test on one of the objects,…such bby.context.object to get the active object,…and then use the Control + Space shortcut…to look into our options.…If we scroll up in this window we should see that in fact…scale is the name of one of the properties…we're looking for.…We could also do it in the user interface to find that…more directly, such as by changing the scale object here…and then noting in the info window that we have changed…one of the channels of the scale property.…
Scrolling back down we then should be able to…create our for loop.…For ob in…bpy.context.selected_objects:…using a colon to signify the start of the for loop,…
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
Introduction to Data Analysis with Pythonwith Michele Vallisneri2h 16m 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.