MStatus polyModifierCmd::undoModifyPoly() { MStatus status = MS::kSuccess; if( !fHasHistory && !fHasRecordHistory ) { status = undoDirectModifier(); } else { fDGModifier.undoIt(); // undoCachedMesh must be called before undoTweakProcessing because // undoCachedMesh copies the original mesh *without* tweaks back onto // the existing mesh. Any changes done before the copy will be lost. // if( !fHasHistory ) { status = undoCachedMesh(); MCheckStatus( status, "undoCachedMesh" ); fDagModifier.undoIt(); } status = undoTweakProcessing(); MCheckStatus( status, "undoTweakProcessing" ); } return status; }
// -------------------------------------------------------------------------------------------- MStatus polyModifierCmd::undoModifyPoly() // -------------------------------------------------------------------------------------------- { MStatus status = MS::kSuccess; if( !fHasHistory && !fHasRecordHistory ) { status = undoDirectModifier(); } else { // Merke: Das MObject zur ModifierNode sollte jetzt zerstrt werden, da es ungueltig wird, wenn der modifier rueckgngig gemacht wird. // Ansonsten gibts nen absturz myModifierNode = MObject::kNullObj; if(createAnimCurves) { createSlideAnim.undoIt(); } fDGModifier.undoIt(); // undoCachedMesh must be called before undoTweakProcessing because // undoCachedMesh copies the original mesh *without* tweaks back onto // the existing mesh. Any changes done before the copy will be lost. // if( !fHasHistory ) { status = undoCachedMesh(); MCheckStatus( status, "undoCachedMesh" ); //fDagModifier.undoIt(); deleteDuplicate.undoIt(); reparentDuplicate.undoIt(); createDuplicate.undoIt(); } status = undoTweakProcessing(); MCheckStatus( status, "undoTweakProcessing" ); } return status; }
MStatus polyModifierCmd::undoModifyPoly() { MStatus status = MS::kSuccess; if( !fHasHistory && !fHasRecordHistory ) { status = undoDirectModifier(); } else { fDGModifier.undoIt(); // undoCachedMesh must be called before undoTweakProcessing because // undoCachedMesh copies the original mesh *without* tweaks back onto // the existing mesh. Any changes done before the copy will be lost. // if( !fHasHistory ) { status = undoCachedMesh(); MCheckStatus( status, "undoCachedMesh" ); //by_tima: fDagModifier.undoIt(); //########################################################################### tima/ MFnDagNode tmpDagNodeFn( fDuplicateDagPath); tima_tempForUndoDeleteDuplicate_modifier.deleteNode(tmpDagNodeFn.object()); status = tima_tempForUndoDeleteDuplicate_modifier.doIt(); /*#ifdef _DEBUG MGlobal::displayInfo( "tima_upstreamNodeTransform_name = " + tmpDagNodeFn.name()); if(status)cout<<endl<<"tima_tempForUndoDeleteDuplicate_modifier.doIt - success"<<endl; else cout<<endl<<"tima_tempForUndoDeleteDuplicate_modifier.doIt - failed"<<endl; #endif*/ MCheckStatus( status, "tima_tempForUndoDeleteDuplicate_modifier.doIt" ); //########################################################################### /tima } status = undoTweakProcessing(); MCheckStatus( status, "undoTweakProcessing" ); } return status; }