# SimpleLattice - deform with pleasure

**URL:** <https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032>\
**Category:** Released Add-ons and Extensions\
**Created:** [August 9, 2021, 12:28pm UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032 "2021-08-09T12:28:28Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![APEC](https://blenderartists.org/user_avatar/blenderartists.org/apec/32/640008_2.png) [@APEC](https://blenderartists.org/u/APEC)\
**Post date:** [August 9, 2021, 12:28pm UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/1 "2021-08-09T12:28:28Z")

</div>

Quickly adds Lattice to selected objects and aligns it by the chosen orientation.

[SimpleLattice](https://github.com/BenjaminSauder/SimpleLattice)

How to use:

1. RMB on selected objects or elements - Create Lattice.
2. RMB on lattice object - Apply/Remove or tweak strength.

Examples:

1. Object mode - multiple objects  

2. Edit mode - multiple objects  

3. Single object editing  

Special thanks to:

- Benjamin Sauder who made a good base,
- @ckohl_art and @Kiellog for help in code
- [blender.stackexchange.com](http://blender.stackexchange.com) people for their help

---

<div class="post-metadata">

**Author:** ![Michael\_Knubben](https://blenderartists.org/user_avatar/blenderartists.org/michael_knubben/32/10600_2.png) [@Michael\_Knubben](https://blenderartists.org/u/Michael_Knubben)\
**Post date:** [August 12, 2021, 9:56am UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/2 "2021-08-12T09:56:24Z")

</div>

This is fantastic! Any chance you could automatically align the lattice to the selection in edit mode?  
Right now I can snap the cursor and use that, but it would save me some steps.

Thanks for developing this!

---

<div class="post-metadata">

**Author:** ![APEC](https://blenderartists.org/user_avatar/blenderartists.org/apec/32/640008_2.png) [@APEC](https://blenderartists.org/u/APEC)\
**Post date:** [August 12, 2021, 11:17am UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/3 "2021-08-12T11:17:17Z")

</div>

Hi,  
how it should behave in edit mode, what orientation it should choose with selection in Edit mode? Selection Normal?

---

<div class="post-metadata">

**Author:** ![Michael\_Knubben](https://blenderartists.org/user_avatar/blenderartists.org/michael_knubben/32/10600_2.png) [@Michael\_Knubben](https://blenderartists.org/u/Michael_Knubben)\
**Post date:** [August 12, 2021, 11:37am UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/4 "2021-08-12T11:37:00Z")

</div>

An averaged normal , yeah. Or optionally only the normal of the active vert/edge/face!

---

<div class="post-metadata">

**Author:** ![APEC](https://blenderartists.org/user_avatar/blenderartists.org/apec/32/640008_2.png) [@APEC](https://blenderartists.org/u/APEC)\
**Post date:** [August 13, 2021, 9:09am UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/5 "2021-08-13T09:09:01Z")

</div>

Hi,  
try this  
[SimpleLattice-master\_2021.08.13.zip](https://blenderartists.org/uploads/short-url/8sFYQsvc9UPc9HjiaB9uytQqmFr.zip) (22.9 KB)  
I added Normal orientation by default, it uses selection normal in Edit mode to align Lattice,  
for Object mode it’s same as Local

---

<div class="post-metadata">

**Author:** ![Michael\_Knubben](https://blenderartists.org/user_avatar/blenderartists.org/michael_knubben/32/10600_2.png) [@Michael\_Knubben](https://blenderartists.org/u/Michael_Knubben)\
**Post date:** [August 13, 2021, 9:37am UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/6 "2021-08-13T09:37:37Z")

</div>

Perfect! Very nice default to have.

---

<div class="post-metadata">

**Author:** ![APEC](https://blenderartists.org/user_avatar/blenderartists.org/apec/32/640008_2.png) [@APEC](https://blenderartists.org/u/APEC)\
**Post date:** [August 21, 2021, 7:33am UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/7 "2021-08-21T07:33:05Z")

</div>

Updated to 0.1.1:

1. Added new orientation - Normal. It simply create orientation from selection and align Lattice.  

2. Added possibility to change Lattice resolution in RMB menu, when Lattice is selected. Restricted values from 2 to 20 (for now you can change in ` __init__.py` for any you need in `class RESOLUTIONUVW_PG_main(PropertyGroup): `)

---

<div class="post-metadata">

**Author:** ![sleeplessmind](https://blenderartists.org/letter_avatar_proxy/v4/letter/s/7993a0/32.png) [@sleeplessmind](https://blenderartists.org/u/sleeplessmind)\
**Post date:** [August 22, 2021, 1:13am UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/8 "2021-08-22T01:13:32Z")

</div>

I found a little bug. tested in fresh latest 293.  
if a mesh is under " Scene Collection" and use create lattice, it has following error:

```auto
Python: Traceback (most recent call last):
  File "C:\Users\I\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\SimpleLattice-master\op_LatticeCreate.py", line 160, in execute
    lattice = self.createLattice(context)
  File "C:\Users\I\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\SimpleLattice-master\op_LatticeCreate.py", line 276, in createLattice
    bpy.data.collections[layerColl.name].objects.link(lattice_obj)
KeyError: 'bpy_prop_collection[key]: key "Master Collection" not found'

location: <unknown location>:-1

```

---

<div class="post-metadata">

**Author:** ![APEC](https://blenderartists.org/user_avatar/blenderartists.org/apec/32/640008_2.png) [@APEC](https://blenderartists.org/u/APEC)\
**Post date:** [August 22, 2021, 5:56am UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/9 "2021-08-22T05:56:03Z")

</div>

Hi.  
Thanks!  
Fixed.  
Download updated version on github.

---

<div class="post-metadata">

**Author:** ![APEC](https://blenderartists.org/user_avatar/blenderartists.org/apec/32/640008_2.png) [@APEC](https://blenderartists.org/u/APEC)\
**Post date:** [August 22, 2021, 6:24pm UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/10 "2021-08-22T18:24:17Z")

</div>

Update 0.1.2:

1. Little UI tweaks.
2. Added Addon preferences - where you can define default values for adding Lattice.

![SimpleLattice_0.1.2](https://blenderartists.org/uploads/default/original/4X/c/6/b/c6b71c72b52183bfa1bf5e8d19b72cef90a73d71.png)

 ![SimpleLattice_AddonPreferences_0.1.2](https://blenderartists.org/uploads/default/original/4X/7/5/0/75041591a5fab956921df080a4e45a41545e55cd.png)

Before creating SimpleLattice, define your defaults if needed,  
otherwise, they will take effect after restarting the Blender.

---

<div class="post-metadata">

**Author:** ![Michael\_Knubben](https://blenderartists.org/user_avatar/blenderartists.org/michael_knubben/32/10600_2.png) [@Michael\_Knubben](https://blenderartists.org/u/Michael_Knubben)\
**Post date:** [August 23, 2021, 3:09pm UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/11 "2021-08-23T15:09:23Z")

</div>

> [@APEC](#):
>
> Added possibility to change Lattice resolution in RMB menu, when Lattice is selected

You’ve read my mind! I actually set this up manually with Pie Menu Editor, nice to have it included by default in this addon.

---

<div class="post-metadata">

**Author:** ![rbx775](https://blenderartists.org/user_avatar/blenderartists.org/rbx775/32/460868_2.png) [@rbx775](https://blenderartists.org/u/rbx775)\
**Post date:** [October 6, 2021, 10:34pm UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/12 "2021-10-06T22:34:59Z")

</div>

By far the best lattice script Ive seen so far, and I worked with some over the years. 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![vrnTech](https://blenderartists.org/user_avatar/blenderartists.org/vrntech/32/949893_2.png) [@vrnTech](https://blenderartists.org/u/vrnTech)\
**Post date:** [July 15, 2022, 8:51am UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/13 "2022-07-15T08:51:26Z")

</div>

Would it be possible to make the bounding box calculation ignore hidden modifiers? For example if I use Mirror I might want to conform the lattice to the original object before Mirror is applied depending on whether or not Mirror is visible when I create the lattice.

---

<div class="post-metadata">

**Author:** ![APEC](https://blenderartists.org/user_avatar/blenderartists.org/apec/32/640008_2.png) [@APEC](https://blenderartists.org/u/APEC)\
**Post date:** [July 15, 2022, 11:59am UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/14 "2022-07-15T11:59:54Z")

</div>

Hi,  
try to replace `op_LatticeCreate.py`  
in the `c:\Users\User_Name\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\SimpleLattice-master\`  
with this test file (save the old just in case):

[op\_LatticeCreate.py](https://blenderartists.org/uploads/short-url/4jQ2Dj8yDstcGQmrygiMAxFJPtF.py) (18.2 KB)

It now when you choose “On Top” - creates lattice at the top of stack and ignores Mirrors modifiers.  
I think this is what you mean.

OR ignors all modifiers in stuck if “On Top” chosen:  
[op\_LatticeCreate.py](https://blenderartists.org/uploads/short-url/yBG314AKZX4oebv9Il30pZnP7Fj.py) (18.2 KB)

---

<div class="post-metadata">

**Author:** ![APEC](https://blenderartists.org/user_avatar/blenderartists.org/apec/32/640008_2.png) [@APEC](https://blenderartists.org/u/APEC)\
**Post date:** [July 18, 2022, 8:56am UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/15 "2022-07-18T08:56:00Z")

</div>

Hi,  
try new 0.1.3 version.

## Update 0.1.3

1. Added option “Ignore Modifiers”. For cases where you need to modify only original object. [![update 0 1 3](https://blenderartists.org/uploads/default/original/4X/d/6/5/d658b75cb5fafac1911e1f0ddf9c20f0e5269ab3.png)](https://user-images.githubusercontent.com/87300864/179476670-bf75c4bb-6f91-4d0e-a618-fe233f775600.png)

2. Added Addon preference for “Ignore Modifiers”. [![update 0 1 3 prefs](https://blenderartists.org/uploads/default/original/4X/d/3/1/d31e9de7e35ff15d924fcb8e7bb8cbe5d5a1f726.png)](https://user-images.githubusercontent.com/87300864/179476954-3f40aa49-9e0b-40e0-ab50-7fe92b8af7c5.png)

> **[GitHub - BenjaminSauder/SimpleLattice: A small blender 2.8 addon to make working with...](https://github.com/BenjaminSauder/SimpleLattice)**
>
> A small blender 2.8 addon to make working with lattices simpler.

---

<div class="post-metadata">

**Author:** ![vrnTech](https://blenderartists.org/user_avatar/blenderartists.org/vrntech/32/949893_2.png) [@vrnTech](https://blenderartists.org/u/vrnTech)\
**Post date:** [July 18, 2022, 9:15am UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/16 "2022-07-18T09:15:59Z")

</div>

Thank for the lightning fast response! The new version does exactly what I wanted. I hope this will benefit others as well!

---

<div class="post-metadata">

**Author:** ![APEC](https://blenderartists.org/user_avatar/blenderartists.org/apec/32/640008_2.png) [@APEC](https://blenderartists.org/u/APEC)\
**Post date:** [April 2, 2023, 7:40am UTC](https://blenderartists.org/t/simplelattice-deform-with-pleasure/1321032/17 "2023-04-02T07:40:33Z")

</div>

## Update 0.1.6

1. More accurate bbox calculation for MESH objects if object have custom rotation  

2. New feature to tweak angles for created lattice object  

Also look at other minor 0.1.4 and 0.1.5 updates. Sorry to not lighting it up.
