[Bsod-mentors] BSOD Proposal
Stephen Swaney
sswaney at centurytel.net
Fri Jun 9 10:50:56 CEST 2006
Proposal for Blender Python Scripting Boot Camp
by Stephen Swaney
Synopsis:
BPy Boot Camp is an introduction to basic Python scripting in Blender.
The target audience is beginning scripters who have a basic knowledge
of Blender. Only minimal knowledge of Python is assumed. The beginning
Python tutorial at www.python.org is used as a reference.
At the end of the course, readers will have an understanding of
Blender's database structure and will be able to write simple scripts
to query and manipulate Blender objects and to import and export
Blender data via Python. The Blender API documentation will be
introduced.
Simple example programs, suitable for cutting and pasting, will given.
These can form the start of a personal library of utility routines for
common scripting tasks.
References will be given to the Blender Wiki documentation where
appropriate.
Proposed Outline and Topics Covered:
1 INTRO
1.1 TARGET AUDIENCE
Basic Blender User
New Scripters
1.2 PREREQUISITES
Blender installed.
A full install of Python can be done later if desired.
Basic Blender concepts needed:
Changing Window types
Creating, Editing and Selecting Objects
Loading and Saving files
1.3 GOALS
Understand Blender Data Structures.
Create scripts for common tasks.
Start building a personal library of code for common tasks
1.4 BPY DOCS
Overview of BPy API documentation.
Details will be discussed in the following topics.
2 THE TEXT EDITOR
Using the Blender Text Editor
New
Save
Open
Reload
Tabs vs Spaces
Cut & Paste
Comment / Uncomment
Indent / Un-indent
3 FIRST SCRIPT: HELLO WORLD
We write and run our first program.
3.1 PROGRAM: HELLO WORLD
4 OBJECTS AND THEIR PROPERTIES
Discuss Object Oriented nature of Python and Blender. Like everyday
objects, Blender Objects have unique properties depending on their
type.
3D Coordinates
4.1 ACCESSING OBJECTS
By Name
By Selection
4.1.1 PROGRAM: PRINT PROPERTIES
Get an Object and print its attributes
4.2 SETTING PROPERTIES
Set the attribute values of an Object
4.2.1 PROGRAM: MOVE
Example of moving an Object. Lead-in to scriptlink discussion.
5 SCRIPTLINKS
Discussion of Scriptlinks and their uses.
5.1 OBJECT SCRIPTLINKS
Frame Change
Render
Redraw
5.2 SCENE SCRIPTLINKS
OnLoad
OnSave
Render
Redraw
FrameChange
5.3 PROGRAM: CONTINUOUS MOTION
Animate an Object using a FrameChange scriptlink.
6 THE REGISTRY
Discussion of storing and retrieving persistent data in scripts.
6.1 PROGRAM: USING PERSISTENT DATA
Example of Registry module use.
7 MATH
Mention useful Python math functions.
Brief introduction to MathUtils module via Vector math
for Object positions.
8 APPLICATION:FLOCKING
Simple Flocking.
An application using what we have learned so far.
8.1 PROGRAM: FOLLOW THE LEADER
Animating Multiple objects using Frame Change scriptlinks.
9 BLENDER DATABASE STRUCTURE
Discussion of Blender data structures
Scenes
Objects
ObData
Materials
Use of Outliner to examine data relationships
9.1 Diagram: Blender Object Relationships
Relationships between Scenes, Objects, ObData and Materials
10 CREATING OBJECTS
10.1 OBJECTS 101
We create a basic scene with Camera and Lights
10.1.1 SCENES
10.1.2 LAMP
10.1.3 CAMERA
10.1.4 PROGRAM:NEW SCENE
New Scene with Camera & Lamp
10.2 MESH
Discussion of verts, edges, faces
10.2.1 PROGRAM:NEW MESH
Create a Mesh
10.3 CURVES
Discussion of Blender Curve types
10.3.1 NURB
10.3.2 BEZIER
10.3.3 PROGRAM: NEW CURVES
Create Bezier and NURB Curves.
10.4 IPOs
Discussion of IPOs
10.4.1 PROGRAM: CREATE IPO
Create IPOs.
11 Materials
Discuss creating basic Materials and linking them to Objects
11.1 PROGRAM: MATERIALS
Create and link Material to an Object
12 IMPORTERS/EXPORTERS
Discussion of basic Python I/O in the context of moving data in and
out of Blender.
12.1 PYTHON FILE I/O
Brief introduction to Python I/O.
12.1.1 PROGRAM: READ/WRITE
Simple text file I/O
12.2 PROGRAM:EXPORT
Write Blender objects to an external file.
12.3 PROGRAM: IMPORT
Create an object from an external file.
Deliverables:
Deliverables will consist of Wiki pages necessary to implement the
above outline, including the fourteen mentioned small, commented
programs and a simple diagram basic Blender data relationships.
Addition diagrams may be added as necessary to clarify points made in
the text.
Qualifications:
A programmer by trade, I have been a victim of Blender since at
version 1.8. I am familiar with Blender Python by virtue of working
on the project and have at least moderate fluency in English.
Note: Additional details or examples can be provided as needed.
Suggestions are welcomed.
--
Stephen Swaney
sswaney at centurytel.net
231-228-7370
More information about the Bsod-mentors
mailing list