#include <blndtool.h>
Inheritance diagram for InitBlendersAction:
Public Member Functions | |
InitBlendersAction () | |
Constructor for the action. | |
~InitBlendersAction () | |
virtual ActionCode | Execute () |
Executes the action. This remaps the blend node using the inverse mapping indexes it was initialised with, creating another InitBlendersAction to invert this mapping. | |
Static Public Member Functions | |
static ActionCode | Init (OpBlendNodes *pOp, ActionList *pActionList, List *pBlenderInfoList, BOOL DeinitState, InitBlendersAction **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. | |
Protected Attributes | |
List | BlenderInfoList |
BOOL | Deinit |
Definition at line 761 of file blndtool.h.
|
Constructor for the action.
Definition at line 7079 of file blndtool.cpp.
|
|
Definition at line 7197 of file blndtool.cpp. 07198 { 07199 BlenderInfoList.DeleteAll(); 07200 }
|
|
Executes the action. This remaps the blend node using the inverse mapping indexes it was initialised with, creating another InitBlendersAction to invert this mapping.
Reimplemented from Action. Definition at line 7168 of file blndtool.cpp. 07169 { 07170 ActionCode Ac; 07171 InitBlendersAction* pAction; 07172 OpBlendNodes* pOp = (OpBlendNodes*)pOperation; 07173 07174 // Negate the type of blender initialisation 07175 Deinit = !Deinit; 07176 07177 Ac = InitBlendersAction::Init( pOp, 07178 pOppositeActLst, 07179 &BlenderInfoList, 07180 Deinit, 07181 &pAction); 07182 07183 if (Ac != AC_FAIL) 07184 { 07185 if (Deinit) 07186 pOp->DeinitBlenders(BlenderInfoList); 07187 else 07188 { 07189 if (!(pOp->ReinitBlenders(BlenderInfoList))) 07190 Ac = AC_FAIL; 07191 } 07192 } 07193 07194 return Ac; 07195 }
|
|
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 7118 of file blndtool.cpp. 07123 { 07124 UINT32 ActSize = sizeof(InitBlendersAction)+(pBlenderInfoList->GetCount()*sizeof(BlenderInfoItem)); 07125 07126 ActionCode Ac = Action::Init(pOp,pActionList,ActSize,CC_RUNTIME_CLASS(InitBlendersAction),(Action**)ppNewAction); 07127 InitBlendersAction* pAction = *ppNewAction; 07128 07129 if (Ac != AC_FAIL) 07130 { 07131 pAction->Deinit = DeinitState; 07132 07133 // Copy items from the given list to the new action's list 07134 BlenderInfoItem *pItem = (BlenderInfoItem*)pBlenderInfoList->GetHead(); 07135 while (pItem != NULL && Ac != AC_FAIL) 07136 { 07137 BlenderInfoItem* pNewItem = pItem->SimpleCopy(); 07138 if (pNewItem != NULL) 07139 { 07140 pAction->BlenderInfoList.AddTail(pNewItem); 07141 pItem = (BlenderInfoItem*)pBlenderInfoList->GetNext(pItem); 07142 } 07143 else 07144 Ac = AC_FAIL; 07145 } 07146 } 07147 07148 return Ac; 07149 }
|
|
Definition at line 776 of file blndtool.h. |
|
Definition at line 777 of file blndtool.h. |