Reader small image

You're reading from  Python Scripting in Blender

Product typeBook
Published inJun 2023
PublisherPackt
ISBN-139781803234229
Edition1st Edition
Right arrow
Author (1)
Paolo Acampora
Paolo Acampora
author image
Paolo Acampora

Paolo Acampora is a 3D artist and programmer, with experience in Animation, Visual Effects, and Real Time computer graphics. He provides tools that streamline the production workflow and let artists focus on the creative aspects of their craft. He has worked with several studios for more than a decade. He contributes to the blender development and releases his tools for the community.
Read more about Paolo Acampora

Right arrow

Appendix

Blender and Python are so vast that even writing scripts for a shortlist of use cases encompasses a wide range of skills and disciplines. This book contains elements of animation, rigging, and shading and introduces programming techniques while exploring those processes.

This appendix contains a comprehensive summary that can be useful as a recap to help with the retention of the concepts explored in this book and help the reader navigate through the chapters.

Part 1: An Introduction to Python

This section covers the fundamentals of scripting and helps you become familiar with Blender’s Python utilities. Besides providing a solid base for the chapters ahead, it contains all the information required for writing fully working tools.

Chapter 1, Python’s Integration with Blender

This chapter introduces the tools used for scripting, internal and external text editors, and version control.

Here’s a summary of the topics discussed in the chapter.

Installing multiple versions of Blender on the main operating systems

Blender 3.3 is the long-term support release used in the writing process. Although the content of this book is valid for all the 3. x series of blender, if you want to install version 3.3 alongside other versions, the following instructions are provided:

  • Using Windows Installer
  • Using the Microsoft Store
  • Downloading a portable archive
  • Installing on macOS

Using Python in Blender...

Part 2: Interactive Tools and Animation

This section explains how to write add-ons as folders rather than single files, interact with the animation system, and write modal operators that wait for user input. By the end of this section, you will be able to write advanced, interactive tools.

Chapter 6, Structuring Our Code and Add-Ons

This chapter explains how to write and distribute addons containing multiple files in a folder.

Here’s a summary of the topics discussed in the chapter.

The relationship between modules, packages, and add-ons

While a single .py file is a Python module, a folder containing .py files is a Python package. Packages contain a file named __init__.py. If our package is an add-on, this file must contain the bl_info dictionary.

Guidelines for partitioning code

Some criteria for separating the code through different .py files are as follows:

  • Media loaders
  • Generic code versus specific code
  • Interface code
  • Operator modules...

Part 3: Delivering Output

This section covers the final stages of the 3D pipeline: deformation and rendering.

Chapter 11, Object Modifiers

This chapter covers object modifiers and their use in animation.

Here’s a summary of the topics discussed in the chapter.

Adding object modifiers

Modifiers are grouped into four categories: Modify, Generate, Deform, and Physics. They are created by clicking the Add Modifier button in the Modifiers property.

Adding modifiers in Python

The new() method of the object.modifiers collection requires the type modifier as an argument. A list of the possible type keywords can be found by accessing the bpy.types.ObjectModifiers.bl_rna.functions["new"] function and querying its parameters["type"].enum_items.

Writing the Latte Express add-on

This add-on sets up a Lattice modifier to deform an object using a three-dimensional grid cage. It finds the center of the model by querying its bounding box and has...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Python Scripting in Blender
Published in: Jun 2023Publisher: PacktISBN-13: 9781803234229
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Author (1)

author image
Paolo Acampora

Paolo Acampora is a 3D artist and programmer, with experience in Animation, Visual Effects, and Real Time computer graphics. He provides tools that streamline the production workflow and let artists focus on the creative aspects of their craft. He has worked with several studios for more than a decade. He contributes to the blender development and releases his tools for the community.
Read more about Paolo Acampora