So, Lattice Tool 2.0 was born......
The GUI is very similar to that of Lattice Tool 1.04 but without the nodes option, that will be added later, and to be honest it provides a very similar function to the original release but it is a completely new script that works in a new way.
Lattice Tool 1.04 relied on the bevel and extrude tools to create the lattice mesh from the edges of the control object and Lattice Tool 2.0 creates the lattice edges by extruding a control circle along each edge on the object and supplying a NURBS sphere to each vertex (corner) on the control object.
Extruding surfaces along an edge is a good way to allow the new surface to follow any manipulation that may be applied to the initial object, this allowed for the scale function to be considered on the lattice as well as any non-additional manipulation to be applied without having to press the refresh button on the GUI.
The corners were a new challenge.... in order to get them to follow the control mesh I created a follicle which was placed at each vert on the control object and then the corner sphere was parent constrained to it. This is not so straight forward as it may appear as follicles are placed on a UV coordinate system rather than an XYZ system, working out how to do that was fun and also a new UV map needed to be created whenever new faces were made.
The option to keep the panes is still enabled and supplies the same refractive shader as Lattice Tool 1.04, this can obviously be adjusted or completely changed through the hypershade is required.
Here's a video guide to demonstrate the new tools functionality......
The reason I created this new script was to enable live updating of the lattice object as the control mesh was manipulated, it works a treat but there is a down side in the processing that is required to create a complex lattice in comparison to the bevel option in Lattice Tool 1.04... however this is balanced by the fact that Lattice Tool 2.0 creates a clean lattice regardless of the input mesh whereas 1.04 sometimes had problems due to the way that the bevel tool calculates.
In making Lattice Tool 2.0 I have been able to apply all of the understanding that I garnered from creating the previous available version of Lattice Tool and have, again, learned a shed load of new functionality under the hood of Maya... I love scripting!
CLICK FOR SCRIPT - Creative Crash