예제 #1
0
MStatus
cgfxShaderCmd::undoIt()
{
#ifdef KH_DEBUG
	MString ss = "  .. Undo ";
	ss += fArgString;
	ss += "\n";
	::OutputDebugString( ss.asChar() );
#endif

	MStatus stat;
	try
	{
		stat = undoCmd();
	}
	catch ( cgfxShaderCommon::InternalError* e )   
	{
		reportInternalError( __FILE__, (size_t)e );
		stat = MS::kFailure;
	}
	catch ( ... )
	{
		reportInternalError( __FILE__, __LINE__ );
		stat = MS::kFailure;
	}
#ifdef KH_DEBUG
	ss = "  .. undone\n";
	::OutputDebugString( ss.asChar() );
#endif
	return stat;
}                                      // MStatus cgfxShaderCmd::undoIt
예제 #2
0
cgfxShaderCmd::~cgfxShaderCmd()
//
//	Description:
//		cgfxShaderCmd destructor
//
{
	try
	{
#ifdef KH_DEBUG
		if ( !fIsQuery )
		{
			MString ss = "  .. ~cmd ";
			ss += fArgString;
			ss += "\n";
			::OutputDebugString( ss.asChar() );
		}
#endif
        fOldAttrDefList.clear();
        fNewAttrDefList.clear();

		delete fDagMod;
	}
	catch ( cgfxShaderCommon::InternalError* e )   
	{
		reportInternalError( __FILE__, (size_t)e );
	}
	catch ( ... )
	{
		reportInternalError( __FILE__, __LINE__ );
	}
}
예제 #3
0
파일: error.cpp 프로젝트: ederc/mathic
  void reportInternalError
  (const std::string& errorMsg, const char* file, unsigned int lineNumber) {

    std::ostringstream err;
    err << errorMsg << '\n'
        << "The internal error occured in file " << file
        << " on line " << lineNumber << '.';
    reportInternalError(err.str());
  }
예제 #4
0
MStatus
cgfxShaderCmd::redoIt()
{
#ifdef KH_DEBUG
	MString ss = "  .. Redo ";
	ss += fArgString;
	ss += "\n";
	::OutputDebugString( ss.asChar() );
#endif

	MStatus stat;
	try
	{
		// Get the node object from the selection list.
		MObject oNode;
		stat = fNodeSelection.getDependNode( 0, oNode );
		M_CHECK( stat );

		MFnDependencyNode fnNode( oNode, &stat );
		M_CHECK( stat && fnNode.typeId() == cgfxShaderNode::sId );

		cgfxShaderNode* pNode = (cgfxShaderNode*)fnNode.userNode();
		M_CHECK( pNode );

		// Re-create or re-edit the node.
		stat = redoCmd( oNode, fnNode, pNode );
	}
	catch ( cgfxShaderCommon::InternalError* e )   
	{
		reportInternalError( __FILE__, (size_t)e );
		stat = MS::kFailure;
	}
	catch ( ... )
	{
		reportInternalError( __FILE__, __LINE__ );
		stat = MS::kFailure;
	}
#ifdef KH_DEBUG
	ss = "  .. redone\n";
	::OutputDebugString( ss.asChar() );
#endif
	return stat;
}                                      // MStatus cgfxShaderCmd::redoIt
예제 #5
0
MStatus
cgfxShaderCmd::doIt( const MArgList& args )
{
	MStatus stat;
	try
	{
		stat = doCmd( args );
	}
	catch ( cgfxShaderCommon::InternalError* e )   
	{
		reportInternalError( __FILE__, (size_t)e );
		stat = MS::kFailure;
	}
	catch ( ... )
	{
		reportInternalError( __FILE__, __LINE__ );
		stat = MS::kFailure;
	}
	return stat;
}                                      // MStatus cgfxShaderCmd::doIt