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

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...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Python Scripting in Blender
Published in: Jun 2023Publisher: PacktISBN-13: 9781803234229

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