Hi Alan,
You might want to check what class of object you're starting with by using
the GetClassIDName() method. Sometimes you won't always have what you
think you should have. I've been caught out a few times by this.
The code below obtains the PolygonMesh object from a polymesh input
connection of a SCOP:
XSI::InputPort polyMeshPort(op.GetPort(L"polymshIn",L"Group_0",0));
XSI::Primitive primitive(polyMeshPort.GetValue());
//Get geometry object from primitive
XSI::Geometry geometry(primitive.GetGeometry());
//Check that the geometry is actually a polygon mesh
if(!geometry.IsA(XSI::siPolygonMeshID)) return XSI::CStatus::Fail;
//Create the polygon mesh object
XSI::PolygonMesh polyMesh(geometry);
Hope this helps.
Cheers
Andy
> When I run .IsA on a poly mesh it tells me it's an X3DObject - so I
> try getting the activeprimitive of it and it tells me it's a
> primitive.
>
> Any idea why I'm getting non-specific types? This is in C++
>
> CRef item = app.GetSelection().GetItem(0) ;
> if (item.IsA(siPolygonMeshID) ) {
> //nope it says it's not...
>
> Thanks,
>
> Alan.
>
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
> unsubscribe xsi
>
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi