|
I’m trying to get the keys of an FCurve IceNode (for exporting) from a script but I am stuck. I can get to the profile parameter, which I suspect holds the fcurve but here is where I get stuck. I can’t seem to find any documentation on this either.
Hope anyone can help here.
Cheers
Jacob
|
|
|
|
sorry.. I found the answer minutes after posting this .. but anyway heres a code snippet for anyone who might have the same problem..
[FONT='Courier New'][COLOR=white]var fCrvNode = Selection(0);[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white] [/COLOR][/FONT]
[FONT='Courier New'][COLOR=white]Logmessage(fCrvNode.name);[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white] [/COLOR][/FONT]
[FONT='Courier New'][COLOR=white]var fCrvProfile = fCrvNode .Parameters(0);[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white]Logmessage(fCrvProfile.Name);[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white] [/COLOR][/FONT]
[FONT='Courier New'][COLOR=white]var fCrvFCrv = fCrvProfile.Value;[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white]Logmessage("FCurve Data:");[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white]Logmessage(" - Number of Keys :" + fCrvFCrv.Keys.Count);[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white]for(i=0;i<fCrvFCrv.Keys.Count;i++)[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white]{[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white] var Key = fCrvFCrv.Keys(i);[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white] Logmessage(" - Key #" + i);[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white] Logmessage(" - Left :" + Key.Left);[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white] Logmessage(" - LeftTanX :" + Key.LeftTanX );[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white] Logmessage(" - LeftTanY :" + Key.LeftTanY );[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white] Logmessage(" - Right :" + Key.Right );[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white] Logmessage(" - RightTanX :" + Key.RightTanX );[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white] Logmessage(" - RightTanY :" + Key.RightTanY );[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white] Logmessage(" - Value :" + Key.value);[/COLOR][/FONT]
[FONT='Courier New'][COLOR=white]}[/COLOR][/FONT]
|
|
|