Blender 2.49 Scripting

If you already know Blender and some Python, this book will help you greatly increase the power and flexibility of this tool. Learn in easy steps how to use scripting to add brand new functions and efficiencies.

Blender 2.49 Scripting

Starting
Michel J. Anders

If you already know Blender and some Python, this book will help you greatly increase the power and flexibility of this tool. Learn in easy steps how to use scripting to add brand new functions and efficiencies.
$23.99
$39.99
RRP $23.99
RRP $39.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

+ Collection
Free Sample

Book Details

ISBN 139781849510400
Paperback292 pages

About This Book

 

  • Gain control of all aspects of Blender using the powerful Python language
  • Create complex meshes programmatically and apply materials and textures
  • Automate the rendering process and extend Blender's image manipulation capabilities
  • Extend Blender's built-in editor
  • Interact with version control systems and store render results on a FTP server

Who This Book Is For

This book is for users comfortable with Blender as a modeling and rendering tool who want to expand their skills to include Blender scripting to automate laborious tasks and achieve results otherwise impossible. Blender experience is essential as is some experience in Python programming.

Table of Contents

Chapter 1: Extending Blender with Python
The Blender API
Exploring built-in modules, the help() function
Getting familiar with the built-in editor
First steps: Hello world
Don't get confused, stay objective
Adding different types of object from a script
Summary
Chapter 2: Creating and Editing Objects
Creepy crawlies—a GUI to configure objects
Transforming mesh topology
Dazzle your boss—bar charts in Blender style
Weird faces—selecting and editing faces in meshes
Selecting warped (non-planar) quads
Selecting ultra sharp faces
Selecting vertices with many edges
Selecting poles
Determining the volume of a mesh
Determining the centre of mass of a mesh
Growing sunflowers—parenting and grouping objects
Summary
Chapter 3: Vertex Groups and Materials
Vertex groups
Modifiers
Bones
Materials
Summary
Chapter 4: Pydrivers and Constraints
Getting to grips with animated properties
Difference between drivers and constraints
Programming with constraints
Programming with IPOs
PyDrivers
PyConstraints
Setting the time—one to rule them all
Internal combustion—correlating complex changes
Adding simple constraints
Defining complex constraints
Summary
Chapter 5: Acting on Frame Changes
Animating the visibility of objects
Countdown—animating a timer with script links
I'll keep an eye on you
Revisiting mesh—making an impression
Summary
Chapter 6: Shape Keys, IPOs, and Poses
A touchy subject—defining an IPO from scratch
A lot to swallow—defining poses
Get down with the beat—syncing shape keys to sound
Summary
Chapter 7: Creating Custom Shaders and Textures with Pynodes
The basics
Regular tilings
Raindrops—animated Pynodes
Wuthering heights—a slope-dependent material
Soap bubbles—a view-dependent shader
Summary
Chapter 8: Rendering and Image Manipulation
A different view—combining multiple camera angles
Now, strip—creating a film strip from an animation
Rendering billboards
Generating CAPTCHA challenges
Summary
Chapter 9: Expanding your Toolset
To the Web and beyond—publish a finished render with FTP
Spring cleaning—archive unused images
Extending the editor—searching with regular expressions
Extending the editor—interacting with Subversion
The need for speed—using Psyco
Summary

What You Will Learn

 

  • Discover what can be accomplished in Blender with the help of Python
  • Explore built-in modules and add an object to a Blender scene
  • Create configurable mesh objects and modify them
  • Define and enhance vertex group and add modifiers to an object
  • Explore scriptlinks and spacehandlers and perform activities on each frame change in an animation
  • Manipulate IPOs and act on frame changes
  • Build a web server delivering CAPTCHA challenges and archive unreferenced assets
  • Develop custom shaders and slope-dependent materials
  • Animate objects with complex constraints and relations and automate rendering
  • Extend Blender's image manipulation
  • Create simple and effective user interfaces

In Detail

Blender 3D is a popular, open source modeling package that can produce photo-realistic 3D images and animations. Automating tasks and extending the functionality of an extensive application like Blender will streamline your workflow and make the impossible possible. However, implementing scripts may be daunting.

This book takes a practical step-by-step approach to implementing Python scripts that cover almost all areas of Blender. It clearly outlines each problem and focuses on straightforward, easy-to-understand code, highlighting the common pitfalls and Blender idiosyncrasies. It guides you from the installation process and the creation of a simple object to elaborate, fully rigged models with vertex groups and materials all the way to extending Blender's built-in editor. It also teaches how to implement a simple web server inside Blender to serve rendered images. This book will take you from a clear problem description to a fully functional program. The focus is on finding your way in Blender's vast array of possibilities and getting things done without losing too much time on programming details. Each script is carefully explained to provide insight that can be reused in other projects.

Authors

Table of Contents

Chapter 1: Extending Blender with Python
The Blender API
Exploring built-in modules, the help() function
Getting familiar with the built-in editor
First steps: Hello world
Don't get confused, stay objective
Adding different types of object from a script
Summary
Chapter 2: Creating and Editing Objects
Creepy crawlies—a GUI to configure objects
Transforming mesh topology
Dazzle your boss—bar charts in Blender style
Weird faces—selecting and editing faces in meshes
Selecting warped (non-planar) quads
Selecting ultra sharp faces
Selecting vertices with many edges
Selecting poles
Determining the volume of a mesh
Determining the centre of mass of a mesh
Growing sunflowers—parenting and grouping objects
Summary
Chapter 3: Vertex Groups and Materials
Vertex groups
Modifiers
Bones
Materials
Summary
Chapter 4: Pydrivers and Constraints
Getting to grips with animated properties
Difference between drivers and constraints
Programming with constraints
Programming with IPOs
PyDrivers
PyConstraints
Setting the time—one to rule them all
Internal combustion—correlating complex changes
Adding simple constraints
Defining complex constraints
Summary
Chapter 5: Acting on Frame Changes
Animating the visibility of objects
Countdown—animating a timer with script links
I'll keep an eye on you
Revisiting mesh—making an impression
Summary
Chapter 6: Shape Keys, IPOs, and Poses
A touchy subject—defining an IPO from scratch
A lot to swallow—defining poses
Get down with the beat—syncing shape keys to sound
Summary
Chapter 7: Creating Custom Shaders and Textures with Pynodes
The basics
Regular tilings
Raindrops—animated Pynodes
Wuthering heights—a slope-dependent material
Soap bubbles—a view-dependent shader
Summary
Chapter 8: Rendering and Image Manipulation
A different view—combining multiple camera angles
Now, strip—creating a film strip from an animation
Rendering billboards
Generating CAPTCHA challenges
Summary
Chapter 9: Expanding your Toolset
To the Web and beyond—publish a finished render with FTP
Spring cleaning—archive unused images
Extending the editor—searching with regular expressions
Extending the editor—interacting with Subversion
The need for speed—using Psyco
Summary

Book Details

ISBN 139781849510400
Paperback292 pages
Read More

Recommended for You