Re: Scripting: Setting a key's Tangents values

Date : Thu, 03 May 2007 16:06:35 +0200
To : XSI(at)Softimage.COM
From : Oz Adi <oz(at)broadcast.co.il>
Subject : Re: Scripting: Setting a key's Tangents values
yes I've tried doing it with LeftTanX etc', but I could only read those values, and couldn't find a way to set them...
I'll try to look into this deeper...


thanks.
Oz.

Andy Jones wrote:
Search the docs for "LeftTanX, FCurveKey". You should be able to get the "keys" of an FCurve as a collection and modify the tangent properties (such as this one) directly, through the object model. I believe I've even done this before in a script I wrote, so I think it does work.

-Andy

Oz Adi wrote:

I am trying to set the LeftTanX, RightTanX, LeftTanY, RightTanY values of *selected* keys, and not the whole Fcurve.

The only Method I found is SetKeyTangents, but it seems like it's not possible to set the tangents on a key level.

SetKeyTangents needs an array with 4 tangent values for each key, but it seems I need to enter values for *all* keys
on the Fcurve.


I suppose I can first, read an array of all key's tangents, and only change those I want to change, then feed this
array back using SetKeyTangents, but this seems not very economical...


am I missing something?

Cheers,

Oz.
www.ozadi.com

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi



---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.