I was desperate to find a way to switch a layer's z depth using a bone's location. Rasheed wrote that flipbybones script that worked... sort of... but it had big problems for my use since it wouldn't place key frames correctly and conflicted with other scripts.
I finally figured it out! Wooohooo! I can change the z depth of a layer ON FRAME 0 from any other frame of the animation!!!
Changing a layer's translation on frame 0 will update throughout the animation without using keys. It can be done "on the fly" based on the location of a bone.
I plan to use this for my face rig but will try to make a script for general use. This is pretty powerful.
I was desperate to find a way to switch a layer's z depth using a bone's location. Rasheed wrote that flipbybones script that worked... sort of... but it had big problems for my use since it wouldn't place key frames correctly and conflicted with other scripts.
I finally figured it out! Wooohooo! I can change the z depth of a layer ON FRAME 0 from any other frame of the animation!!!
Changing a layer's translation on frame 0 will update throughout the animation without using keys. It can be done "on the fly" based on the location of a bone.
I plan to use this for my face rig but will try to make a script for general use. This is pretty powerful.
-vern
But with the normal tools (layer translation) or with a lua script command...? I don't understand... Can you, please, explain it a little more slow?
I can now EASILY target any layer and flip its z translation exactly like Rasheed's script but with out any key frames and no other problems. It is ten times simpler. Just a few lines of code.
It works PERFECTLY!
I have it set up the same as Rasheed's script using 2 bones. When one bone crosses past another bone on the x-axis the layer/s flip the z translation on frame 0. By changing layer translation on frame 0 it updates the whole time line without using any key frames.
Since it is a layer script it checks the location of the bones on every frame and updates the layers z translation on the fly. All it does is checks that one bone is "ahead" or "behind" another bone. I don't have to calculate key frame spacing or check previous key frames etc.
I AM SO FREAKING HAPPY I COULD CRY!!!!!
I have a body rig now that flips the arms and legs up and down for a BODY TURN! I have a body that can be turned just like the head on my rig!!!!!!!!
With this script I can go back to the head and fix all the stupid things I had to do to work around the layer flipping!!!! I can simplify the art work by 50% at least. Removing a bunch of unneccessary layes/shapes.... I can go back to my original idea of flipping the ear layers instead of covering them with extra shapes.
I can now do hair on the sides of the head easy as pie by flipping layers! This is a major breakthrough for me.
I will post a sample of the body turn in another thread. I have to finish tweaking some bones for the chest and hips. It looks so cool. As cool as the head turn!
I am using bones with constraints to deform the body on the turn to change the shape of the chest and hips.