Re: Swapping Curves: Here's the solution

Date : Wed, 30 Jan 2008 12:02:21 -0500
To : <XSI(at)Softimage.COM>
From : "Moloney, Ciaran" <cmoloney(at)nybg.org>
Subject : Re: Swapping Curves: Here's the solution
Title: Re: Swapping Curves: Here's the solution

Nice idea.
I didn't realise that "Set" could directly accept array elements produced by "vbArgs.toArray()". That will make dealing with output arguments in Jscript slightly less painful. Thanks for that. 


---------- Forwarded message ----------
From: "Bradley Gabe" <witha...(at)gmail.com>
Date: Jan 28, 11:07 am
Subject: Swapping Curves: Here's the solution
To: XSI Mailing List Archive


Thanks to Sergei and Ciaran for their help, I was able to built the custom
tools I needed for swapping Animation Control icons. I've posted the
important block of code info below in jscript that allows you to grab the
entire curvelist set of data from a source and build the same curve data set
on a target curve object. The same basic technique should work for polygon
and nurbs meshes as well:

// Get curve data from geometry source
var vbArgs = new VBArray(sourceObj.ActivePrimitive.Geometry.Get2
(siSINurbs));
var args = vbArgs.toArray();

// Freeze target and copy all curve info at the Geometry level
FreezeObj(targetObj);
targetObj.ActivePrimitive.Geometry.Set(args[0], args[1], args[2], args[3],
args[4], args[5], args[6], args[7], siSINurbs);


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.