ScriptSpot

Forum topic · General Scripting

Import values create keys script

By lucky_lowell · 2010-09-14

Description

Hi All,

Was wondering if anyone had any ideas on this.
I have a script that seems to be almost working.
This is to animate a box's scale so it appears to go left and right of zero.
If you look at the script listener it appears as though the values are being
inputted correctly but I am losing my negative sign.
It gives me the absolute value or positive value of the number.
I'm just not sure what I have done wrong.
I have attached all pertinent files.

thanks for looking.
Lowell

Attachments
Comments (3)

Anubis · 2010-09-15

Negative values for scale and volume/size is a wrong concept even in 3d software. Is here negative speed for example :P never mind... You said, you can do negative scale by hand, but did you check whats happened when? See the screenshot. I change only Z to -8 but... as you can see - get value test show that X and Y also are negative :) For example (even weird) this would works:

"$.scale *= -1"

and result scale would be [-1,-1,-1], and it somehow works 'cause made all 3 dimensions negative. I hope this pointer you to the right direction ;-)

Attachments

lucky_lowell · 2010-09-14

Anubis,

So what your telling me is I can put negative values in by hand and not through the script? It seems odd that it behaves this way.

Any suggestions as to how you might tackle the problem.
Manipulate what properties of what kind of geometry?

thanks for looking
Lowell

ps here's to getting to the afterlife one day!

Anubis · 2010-09-14

there is a not real negative scaling.