As I announced in other post, I was working on a way to use the 3D rig skeleton to automatically Z sort the layers of your model.
Here it is!!!!
http://www.darthfurby.com/genete/Script ... layers.zip
http://www.darthfurby.com/genete/Script ... layers.swf
PLEASE BACKUP YOUR FILES FIRST!. THIS IS A UNDER DEVELOPMENT SCRIPT AND I CANNOT GUARANTEE THAT SOME ERROR CAN CAUSE DATA LOOSE.
CONTENT of Zsortlayers.zip:
- 3Dgrid10.lua: A new version of the embedded script that allow move in 3D points as shown in this and this threads. It have now a new subroutine that make the following: Search all the chils layers of the bone layers, check if the layers is binded to a bone, if yes, then check if the bone is a .pt (have included a Z value from the script) then assign the Z value to the layer.
- sortlayers.anme: A sample file.
- Create a 3D skeleton that can rotate with the masterX and masterY bones. Follow this tutorial to create it from this thread.
- Embed the 3Dgrid10.lua file to the bone layer
- Be sure that "Sort layers by depth" is enabled in the bone layer.
- Add some layers (they could be any kind of layers) and bind them to the .pt bones (the horizontal ones in the font view)
- Automatically binded layers would move with the .pt bones and also modify its Z value and its order.
DarthFurby's technique has a drawback that is the fact that you have linear translation of the points and that you have to control the overall position of the shape to move it from side to side. Also need to change to another composition to make the shapes change its order.
This simplification of the 3D rig would allow (I hope!) use Darth's technique but with the advantage of forget about shape sort and forget about shape main position(what is done by the 3D skeleton). You have only to morph the shape to match the head turn.
I have created a new post because I believe people would enthuse with this technique a little more than with the full 3D.

In the example the skeleton is a flat square that you can see in layers
skel FRONT and skel SIDE
Also I have taken apart (to the right) the bones of the side view because they don't contribute to the sample.
Finally I have left the real Z value of the bone unaltered to copy it to the layer. This produce some 3D distortion (small shapes for negative Z and bigger for positive Z). Do you think I would add a feature that allow the user select the Z increment to allow or restrict the Z distortion? Remember that usually people don't like that because they are looking only sort layers and don't magnify or reduce its size. It could be done using a bone scale.
Last. This technique can be use also in combination of other 3Dgrid embedded in the child layers. It allow multiple limbs easily done!. The bad new is that they are "point unconnected" so that should be done by hand. It is time for experimenting.

Please all comments are welcome.
Cheers!
-G