script : python : scop on warp curve point parameters

Date : Wed, 3 Oct 2007 17:37:54 +0930
To : XSI(at)Softimage.COM
From : philb <philbarrenger(at)gmail.com>
Subject : script : python : scop on warp curve point parameters
Has anyone ever managed to apply a scop to the x or y parameters of a point in a BSpline curve on a warp node? The below code should apply a scop to the 8'th point of a curve on a warp node but it always attaches it to the first point :( It sets the "Out" to point1 instead of point8 like it was told. It's possible to apply the scop by hand to any point you like but by script it seems to only be possible to access the first. I can apply expressions without any probs, but no matter what command I use to ad a scop it always ends up on the first.
Anyone ever played with this? Should just "work" right?


# start code
code = '''def myop_Update( inctx, Out, Inposx ) :
    Out.Value = Inposx.Value'''

node = " FxTree.Warper.sl.ToShapes.BSpline.Point8.x"
inOb = Application.Selection( 0 ).posx
Application.AddScriptedOp( node , code , inOb , "myop", "Python" )
# end code


cheers,
phil


--
phil barrenger
philbarrenger(at)gmail.com


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.