[Maya] Modify Initial Lattice Points without Affecting the Deformed Object?


Is there a way to modify the initial Lattice Points without Affecting the Deformed Object?

By default, when you creating a Lattice Deformer, it will confirm to a default world-axis bounding box figure.

You can see the illustration of the problem here (15 sec video):


When creating a lattice, you can set a custom matrix. So you can input your own. You just have to make sure you set the matrix of both the lattice and its base.

import pymel.core as pm

selection = pm.selected()
for mesh in selection:
    matrix = mesh.matrix.get()

    lat = pm.lattice(divisions=[2,2,2])
    for x in lat[1:]:
        x.scale.set(x.scale.get()*100) # the scale is just the conversion to meters, since my Maya is set to meters

I found this a really long time ago, which might also be of interest to you.

And if you want to make a “custom lattice”, have a look at Maya’s wrap deformer :slight_smile:

Hope that helps!

1 Like

If you select both the lattice and the base together you can translate, rotate and/or scale them to fit as you like.

1 Like

@Faranell @kavedawg

Apologies for the late response.
Thanks for the reference link and suggestion.
Both options are viable.