Use it like this:
1. Create a Object or level with objects
2. Create 3 Tags as seen on the attached tags image (all as "Float" with value
"1")
(Note: The Tags will give a better and animatable control, if the script is
assigned)
3 Open the scripts tab and assign the script below, end of mail (copy'n'paste)
Set "Command Language" to "JavaScript".
// if you add the next lines at the end of the script below
// you should get an realtime feedback, if you move the Tags values slider
print('Some Information:'+
'\nColorValue X= '+myCx+
'\nColorValue Y= '+myCy+
'\nColorValue Z= '+myCz+
'\n\nScaleValueX= '+mySx+
'\nScaleValue Y= '+mySy+
'\nScaleValue Z= '+mySz );
// DO NOT USE IT ON MORE THAN ONE OBJECT
Why? Info Window output for 100s of objects? Hmmmmm, not good
4. Use a macro or copy by hand as many objects as you need
5. Create a simple vsl-material with a color gradient or use a texture
6. Create a Parralel-Mapping(or other) with this material, which spans
over all objects
7. Select all objects and the material-mapping
8. Use Map2Obj with the settings on the attached images and accept
9. move the frame slider, the objects scale should switch
Matthias
Some logical error in the files script,
here's a better one:
//------script begins copy and paste begins
// One from the poor mans scripting corner
//Get the color
myC = Self.GetColor();
//Get the Tags values
scX = Self.Get("scX");
scY = Self.Get("scY");
scZ = Self.Get("scZ");
//Split the color vektor
myCx = myC.x;
myCy = myC.y;
myCz = myC.z;
// Maybe we want to multiply or divide later
// we should make sure that we do not get zero values
// CHANGED NEXT LINES
// now if lower 0.001 previous if lower 0 does not make sense
if (myC.x < 0.001) {
myCx = 0.001;
}
else if (myC.y < 0.001) {
myCy = 0.001;
}
else if (myC.z < 0.001) {
myCz = 0.001;
}
mySx = myCx*scX;
mySy = myCy*scY;
mySz = myCz*scZ;
Self.SetTotalScale(new r3Vect(mySx,mySy,mySz));
//------script ends copy and paste ends<<attachment: map2obj-settings.gif>>
<<attachment: tags.gif>>
