Hey All

within a plugin I'm writing, I'm trying to read a per point attribute
(vector3f) and set it on my mesh.
the topology on that mesh is changing.

looking through the docs, it seems that custom ICE Attribute would be a
good idea, so I went ahead with creating one vie the geometry
 AddIceAttribute method.

ICEAttribute iceAttr = mesh.AddICEAttribute("myVelocity",
siICENodeDataVector3, siICENodeStructureSingle,siICENodeContextComponent0D)
;
CICEAttributeDataArrayVector3f data;
iceAttr.GetDataArray(data);

for (size_t i=0;i<velocities->size();i++)
{
CVector3f
val(velocities->get()[i].x,velocities->get()[i].y,velocities->get()[i].z);
data[(LONG)i]=val;
}

when I compare the attribute that I created to other per point
IceAttributes (like pointVelocity, pointPositions etc), I can see that the
"IsConstant" method on my attribute is returning True, while on the builtIn
ones it is False/
The size of the data I'm getting from GetDataArray is 1.

what would be the best way to store per point data on mesh nodes with
changing topology.

Cheers
Ran

Reply via email to