#include <opdrbrsh.h>
Inheritance diagram for SetTimeStampUpdateTypeAction:
Public Member Functions | |
SetTimeStampUpdateTypeAction () | |
Constructor for the action. | |
~SetTimeStampUpdateTypeAction () | |
destructor for the action | |
virtual ActionCode | Execute () |
Executes the action. This will reset the num blend steps in pThisNodeBrush to OldNumSteps, after creating another action to record the current num steps of pThisNodeBrush. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *pOp, ActionList *pActionList, AttrBrushType *pAttrBrush, NodePath *pNodePath, ListUpdateType TypeToSet, SetTimeStampUpdateTypeAction **NewAction) |
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. | |
Public Attributes | |
NodePath * | m_pNodePath |
AttrBrushType * | m_pAttrBrush |
ListUpdateType | m_TypeToSet |
Definition at line 708 of file opdrbrsh.h.
|
Constructor for the action.
Definition at line 5635 of file opdrbrsh.cpp. 05636 { 05637 m_pNodePath = NULL; 05638 m_pAttrBrush = NULL; 05639 m_TypeToSet = UPDATE_NONE; 05640 }
|
|
destructor for the action
Definition at line 5659 of file opdrbrsh.cpp.
|
|
Executes the action. This will reset the num blend steps in pThisNodeBrush to OldNumSteps, after creating another action to record the current num steps of pThisNodeBrush.
Reimplemented from Action. Definition at line 5747 of file opdrbrsh.cpp. 05748 { 05749 ActionCode Act; 05750 SetTimeStampUpdateTypeAction* pAction; 05751 Act = SetTimeStampUpdateTypeAction::Init(pOperation,pOppositeActLst,m_pAttrBrush, m_pNodePath, m_TypeToSet, &pAction); 05752 05753 return Act; 05754 }
|
|
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 5697 of file opdrbrsh.cpp. 05699 { 05700 ERROR2IF(pAttrBrush == NULL,AC_FAIL,"pAttrBrush is NULL"); 05701 ERROR2IF(pNodePath == NULL, AC_FAIL, "Nodepath is NULL"); 05702 05703 // just check that our brush isn't a default 05704 if (pAttrBrush->GetBrushHandle() == BrushHandle_NoBrush) 05705 return AC_OK; 05706 // Get the attribute value, just to make sure 05707 BrushAttrValue* pVal = (BrushAttrValue*)pAttrBrush->GetAttributeValue(); 05708 if (pVal == NULL) 05709 return AC_FAIL; 05710 05711 // make the new action 05712 UINT32 ActSize = sizeof(SetTimeStampUpdateTypeAction); 05713 SetTimeStampUpdateTypeAction* pNewAction; 05714 ActionCode Ac = Action::Init(pOp,pActionList,ActSize,CC_RUNTIME_CLASS(SetTimeStampUpdateTypeAction),(Action**)&pNewAction); 05715 *ppNewAction = pNewAction; 05716 05717 // all we really do is ask the brush to update itself 05718 if (Ac != AC_FAIL) 05719 pVal->SetTimeStampUpdateType(TypeToSet); 05720 05721 // set the members of the undo action 05722 pNewAction->m_pAttrBrush = pAttrBrush; 05723 pNewAction->m_pNodePath = pNodePath; 05724 pNewAction->m_TypeToSet= TypeToSet; 05725 05726 return Ac; 05727 }
|
|
Definition at line 726 of file opdrbrsh.h. |
|
Definition at line 725 of file opdrbrsh.h. |
|
Definition at line 727 of file opdrbrsh.h. |