There's a working Python example at the start of this post: http://wp.me/powV4-2Do
On Tue, Jan 14, 2014 at 8:14 PM, Enoch Ihde <emi...@gmail.com> wrote: > i'm trying to fill an iceattribute with per frame point data: > here's what i've got > > (this assumes a grid in the scene with a shape that's moving some points, > animated on frame 1 and 2, although... i guess the principle is the same > regardless of whether it's moving or not) > ### snip > > import win32com > from win32com.client import constants as c > xsi = win32com.client.Dispatch('XSI.Application').Application > > obj = xsi.Dictionary.GetObject('grid') > attr = obj.ActivePrimitive.AddICEAttribute('PerFramePointData', > c.siICENodeDataVector3, c.siICENodeStructureArray, > c.siICENodeContextComponent0D) > > inFrame = 1 > outFrame = 2 > > pointsPerFrameArray = [] > for frame in range(inFrame, outFrame + 1): > pointsPerFrameArray.append(obj.EvaluateAt(frame). > ActivePrimitive.ICEAttributes('PointPosition').DataArray) > > attr.DataArray2D = pointsPerFrameArray > > print attr.DataArray2D > > > it yields: > WARNING: 3392 - Invalid offset specified while extracting data from this > attribute: <Attribute: PerFramePointData> <Offset: 120241952> > > and i end up with an empty attribute. > what's the proper method of filling a DataArray2D attribute? > > thanks, > enoch >