RE: Writing and reading .fraw2 via scripting?

Date : Fri, 8 Jul 2005 16:55:13 -0400
To : <XSI(at)Softimage.COM>
From : "Jeff McFall" <Jeff.McFall(at)sas.com>
Subject : RE: Writing and reading .fraw2 via scripting?
Thanks Andy 

Jeff

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Andy Nicholas
Sent: Friday, July 08, 2005 4:45 PM
To: XSI(at)Softimage.COM
Subject: RE: Writing and reading .fraw2 via scripting?

I don't know if there's a command specifically to do it, but it's easy enough to do by hand. 

I wrote this script a while back to print the camera motion as an .fraw2 when I was trying to get Digital Fusion to import the camera motion from XSI. It doesn't show the keyframe constraints, but that shouldn't be too hard to add.

Anyway, I've pasted it below for you. Hope it helps.


'---------------------------------------------------

set obj = Selection(0)
set animParams = obj.kinematics.local.animatedparameters

dim rootName
rootName = obj.kinematics.local.fullname rootLen = Len(rootName)

'Need to replace this bit with a scene lookup for the FPS dim fps
fps=1/25

for each param in animParams
	dim paramName
	paramName = right(param.fullname,Len(param.fullname)-rootLen-1)
	logmessage "Start_FCurve "&paramName
	set keyList = param.source.keys
	
	for each key in keyList
		dim v1,v2,v3,v4,v5,v6
		v1=FormatNumber(key.time*fps,6)
		v2=FormatNumber(key.value,6)
		v3=FormatNumber(key.righttanx*fps,6)
		v4=FormatNumber(key.righttany*fps,6)
		v5=FormatNumber(key.lefttanx*fps,6)
		v6=FormatNumber(key.lefttany*fps,6)
		logmessage  "0 "&v1&" "&v2&" "&v3&" "&v4&" "&v5&" "&v6&" 388 3"
	next
	
	logmessage "End_FCurve"	
next





-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Jeff McFall
Sent: 08 July 2005 20:32
To: XSI(at)Softimage.COM
Subject: Writing and reading .fraw2 via scripting?

Is it possible to output (and input) .fraw2 files via scripting?
Specifically VBS

Can't seem to find any reference in the scripting manuals and don't get any feedback from the script editor when messing in the fcurve editor.






Jeff McFall
Video Communications & New Media
919 531 4775
jeff.mcfall(at)sas.com

> SAS...The Power to Know
> 

---
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.