[scripting] Adding an FCurve to a Linked Parameter via OM?

Date : Sat, 01 Dec 2007 18:03:17 +0000
To : XSI(at)Softimage.COM
From : Julian Johnson <julian(at)exch.demon.co.uk>
Subject : [scripting] Adding an FCurve to a Linked Parameter via OM?
Is it possible to add a linked parameter FCurve via the OM? Here's what I'm doing:

import win32com.client

def disp(ob):
  return win32com.client.Dispatch(ob)

oRoot = Application.ActiveSceneRoot
oSphere = oRoot.AddGeometry( "sphere", "MeshSurface" )
oParam = oSphere.Parameters('posx')
oExpr = disp(oParam.AddExpression('l_fcv(cube.kine.local.posx)'))
oFCurve = oExpr.Parameters('l_fcv').AddFCurve(20,)
oFCurve.AddKey(0,0)
oFCurve.AddKey(10,20)

But the resultant FCurve has no 'understanding' of the horizontal scale it should be using. If you create the curve via commands it seems to work fine. I've tried various different FCurve types but maybe this just isn't possible in the OM?

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