Hi,
I am new to maya API , im trying to create a simple DGNode in C++ .. but i
am not able to get the inputMesh from datablock
here is my code.. it compiled and loaded in maya succesfully .. after
connecting pSphereShape1.worldMesh to myNode.inMesh[0] attr to
myNode.inMesh[0]...
i am getting feeback form first 3 print command .my im trying to debug it
using MGlobal::executeCommand command.to print stuffs from maya. in my
code third if condition fails.. ofcourse my 1st and 2nd if condition is
ture
im using VS2010 ultimate, cMake 2.8.10 and maya 2013
here is mycode
MStatus myNode::compute(const MPlug& plug, MDataBlock& data)
{
MStatus status;
if ((plug.parent() == aArray) || (plug == aArray))
{
MGlobal::executeCommand( "print \"\\nConnected to plug.\"" );
MObject thisNode = this->thisMObject();
//getting InMesh
MDataHandle inMeshHld = data.inputValue(aInMesh, &status);
CHECK_MSTATUS_AND_RETURN_IT(status);
MObject inMesh = inMeshHld.asMesh();
// condition 1
if (inMeshHld.type() != MFnData::kMesh)
{
MGlobal::executeCommand( "print \"\\nBad Geomentry type.\"" );
}
// condition 2
if ( inMesh.isNull() )
{
MGlobal::executeCommand( "print \"\\ninMesh is null.\"" );
}
// condition 3
if ((inMesh != MObject::kNullObj))
{
MGlobal::executeCommand( "print \"\\got inMeshGeo.\"" );
}
}
else
return MS::kUnknownParameter;
data.setClean( plug );
return MS::kSuccess;
}
what did i miss in this code..? can anyone help me to fix this code
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/5b702949-be3a-43f6-a39e-7d5d722d7bfa%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.