Hi:
I write a DG node connected with a "nurbsSuface.WordSpace" input attribute.
And want to get the bounding box of the nurbsSurface....
Below are some codes:
MDataHandle inputSurfaceData = block.inputValue(BWorldSpace);
MObject inputSurface = inputSurfaceData.asNurbsSurface();
......................................
......................................
MBoundingBox BB;
MFnDagNode colSurface(inputSurface);
MStatus stat0;
BB = colSurface.boundingBox(&stat0);
if ( stat0 == MS::kFailure )
MGlobal::displayInfo(MString("Failure !!"));
if ( stat0 == MS::kSuccess )
MGlobal::displayInfo(MString("Success !!"));
the result is always "Failure !!"
I've tried to use "MGlobal::executeCommand("xform -q -bb collisionBall ", BBX);"
But it seems to be a not smart way!!
Is there something wrong in my codes?
Or if there is any other way to get the boundingBox?
THX!!