#include <blndtool.h>
Inheritance diagram for ChangeBlenderAction:
Public Member Functions | |
ChangeBlenderAction () | |
Constructor for the action. | |
~ChangeBlenderAction () | |
virtual ActionCode | Execute () |
Executes the action. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *pOp, ActionList *pActionList, NodeBlender *pNodeBlender, ChangeBlenderOpParam &ChangeParam) |
This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NO_RECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation. | |
Protected Attributes | |
NodeBlender * | m_pNodeBlender |
ChangeBlenderOpParam | m_ChangeParam |
Definition at line 1141 of file blndtool.h.
|
Constructor for the action.
Definition at line 8368 of file blndtool.cpp. 08369 { 08370 m_pNodeBlender = NULL; 08371 }
|
|
Definition at line 8495 of file blndtool.cpp.
|
|
Executes the action.
Reimplemented from Action. Definition at line 8485 of file blndtool.cpp. 08486 { 08487 m_ChangeParam.SwapOldAndNew(); 08488 08489 ActionCode Act; 08490 Act = ChangeBlenderAction::Init(pOperation,pOppositeActLst,m_pNodeBlender,m_ChangeParam); 08491 08492 return Act; 08493 }
|
|
This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NO_RECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation.
Definition at line 8405 of file blndtool.cpp. 08409 { 08410 ERROR2IF(pNodeBlender == NULL,AC_FAIL,"pNodeBlender is NULL"); 08411 08412 UINT32 ActSize = sizeof(ChangeBlenderAction); 08413 08414 ChangeBlenderAction* pNewAction; 08415 ActionCode Ac = Action::Init(pOp,pActionList,ActSize,CC_RUNTIME_CLASS(ChangeBlenderAction),(Action**)&pNewAction); 08416 08417 if (Ac != AC_FAIL && pNewAction != NULL) 08418 { 08419 ChangeBlenderType ChangeType = ChangeParam.m_ChangeType; 08420 08421 pNewAction->m_pNodeBlender = pNodeBlender; 08422 pNewAction->m_ChangeParam.m_ChangeType = ChangeType; 08423 08424 pNewAction->m_ChangeParam.SetOldValues(pNodeBlender); 08425 switch (ChangeType) 08426 { 08427 case CHANGEBLENDER_ANGLESTART: pNodeBlender->SetAngleStart(ChangeParam.m_NewAngleStart); break; 08428 case CHANGEBLENDER_ANGLEEND: pNodeBlender->SetAngleEnd( ChangeParam.m_NewAngleEnd); break; 08429 case CHANGEBLENDER_PATHSTART: 08430 { 08431 pNodeBlender->SetProportionOfPathDistStart(ChangeParam.m_NewPathStart); 08432 pNodeBlender->SetUninitialised(); 08433 } 08434 break; 08435 case CHANGEBLENDER_PATHEND: 08436 { 08437 pNodeBlender->SetProportionOfPathDistEnd(ChangeParam.m_NewPathEnd); 08438 pNodeBlender->SetUninitialised(); 08439 } 08440 break; 08441 case CHANGEBLENDER_REGEN: 08442 { 08443 pNodeBlender->SetUninitialised(); 08444 } 08445 break; 08446 case CHANGEBLENDER_NBPINDEX: 08447 { 08448 pNodeBlender->SetNodeBlendPathIndex(ChangeParam.m_NewNodeBlendPathIndex); 08449 } 08450 break; 08451 case CHANGEBLENDER_BLENDONCURVE: 08452 { 08453 pNodeBlender->SetBlendedOnCurve(ChangeParam.m_NewBlendedOnCurve); 08454 } 08455 break; 08456 case CHANGEBLENDER_SWAPENDS: 08457 { 08458 pNodeBlender->ReverseEnds(); 08459 pNodeBlender->SetUninitialised(); 08460 } 08461 break; 08462 default : ERROR2(AC_FAIL,"Unknown change blend type"); break; 08463 } 08464 pNewAction->m_ChangeParam.SetNewValues(pNodeBlender); 08465 } 08466 08467 return Ac; 08468 }
|
|
Definition at line 1156 of file blndtool.h. |
|
Definition at line 1155 of file blndtool.h. |