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

Improving Latte Express options

Some objects might not have enough polygons for the lattice deformation to work properly. We encountered a similar condition at the beginning of this chapter, in the Understanding object modifiers section, where we applied a Subdivision Surface modifier to our Cube shape before we could reshape it into a cylinder using a Cast modifier.

The resolution of lattice objects can also be increased to get more control over the deformation.

For those reasons, we will add object subdivision and lattice resolution options to our operator.

Adding object subdivisions

We add a subdivide option to Latte Express using BoolProperty. Since we will also set a SUBSURF modifier, we add IntProperty for the subdivision levels.

We add bl_options = {'REGISTER', 'UNDO'} to display the operator panel. The declaration of LatteExpress becomes as follows:

class LatteExpress(bpy.types.Operator):
    """Set up...
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