00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #pragma once
00015
00016 #include "PFExport.h"
00017 #include "ParticleChannelMask.h"
00018 #include "..\ifnpub.h"
00019 #include "..\object.h"
00020
00021 class IParamBlock2;
00022
00023 PFExport Object* GetPFObject(Object* obj);
00024
00025 #define PFACTION_INTERFACE Interface_ID(0x74f93d00, 0x1eb34500)
00026 #define GetPFActionInterface(obj) ((IPFAction*)((GetPFObject(obj))->GetInterface(PFACTION_INTERFACE)))
00027
00028
00029
00030
00031
00032
00033 #define PROPID_FINALUPDATETIME 0x00635690
00034
00035 class IPFAction : public FPMixinInterface
00036 {
00037 public:
00038
00039
00040 enum { kInit,
00041 kRelease,
00042 kChannelsUsed,
00043 kActivityInterval,
00044 kIsFertile,
00045 kIsNonExecutable,
00046 kSupportRand,
00047 kGetRand,
00048 kSetRand,
00049 kNewRand,
00050 kIsMaterialHolder,
00051 kGetMaterial,
00052 kSetMaterial,
00053 kSupportScriptWiring,
00054 kGetUseScriptWiring,
00055 kSetUseScriptWiring
00056 };
00057
00058
00059
00060 #pragma warning(push)
00061 #pragma warning(disable:4239 4238)
00062 BEGIN_FUNCTION_MAP
00063
00064 FN_5(kInit, TYPE_bool, Init, TYPE_IOBJECT, TYPE_OBJECT, TYPE_INODE, TYPE_OBJECT_TAB_BR, TYPE_INODE_TAB_BR);
00065 FN_1(kRelease, TYPE_bool, Release, TYPE_IOBJECT);
00066 VFN_2(kChannelsUsed, ChannelsUsed, TYPE_INTERVAL_BR, TYPE_FPVALUE);
00067 FN_0(kActivityInterval, TYPE_INTERVAL_BV, ActivityInterval);
00068 FN_0(kIsFertile, TYPE_bool, IsFertile);
00069 FN_0(kIsNonExecutable, TYPE_bool, IsNonExecutable);
00070 FN_0(kSupportRand, TYPE_bool, SupportRand);
00071 FN_0(kGetRand, TYPE_INT, GetRand);
00072 VFN_1(kSetRand, SetRand, TYPE_INT);
00073 FN_0(kNewRand, TYPE_INT, NewRand);
00074 FN_0(kIsMaterialHolder, TYPE_bool, IsMaterialHolder);
00075 FN_0(kGetMaterial, TYPE_MTL, GetMaterial);
00076 FN_1(kSetMaterial, TYPE_bool, SetMaterial, TYPE_MTL);
00077 FN_0(kSupportScriptWiring, TYPE_bool, SupportScriptWiring);
00078 FN_0(kGetUseScriptWiring, TYPE_bool, GetUseScriptWiring);
00079 VFN_1(kSetUseScriptWiring, SetUseScriptWiring, TYPE_bool);
00080
00081 END_FUNCTION_MAP
00082 #pragma warning(pop)
00083
00104 virtual bool Init(IObject* pCont, Object* pSystem, INode* node, Tab<Object*>& actions, Tab<INode*>& actionNodes) = 0;
00105
00109 virtual bool Release(IObject* pCont) = 0;
00110
00114 virtual const ParticleChannelMask& ChannelsUsed(const Interval& time) const = 0;
00115
00119 PFExport void ChannelsUsed(const Interval& time, FPValue* channels) const;
00120
00127 virtual const Interval ActivityInterval() const = 0;
00128
00135 virtual bool IsFertile() const { return false; }
00136
00141 virtual bool IsNonExecutable() const { return false; }
00142
00147 virtual bool Has3dIcon() const { return false; }
00148
00156 virtual int IsColorCoordinated() const { return -1; }
00157
00162 virtual bool SupportRand() const = 0;
00163
00167 virtual int GetRand() = 0;
00168
00172 virtual void SetRand(int seed) = 0;
00173
00177 PFExport int NewRand();
00178
00182 PFExport static int NewRand(IParamBlock2* pblock, ParamID randomSeedParamID);
00183
00187 virtual bool IsMaterialHolder() const { return false; }
00188
00192 virtual Mtl* GetMaterial() { return NULL; }
00193 #pragma warning(push)
00194 #pragma warning(disable:4100)
00195
00198 virtual bool SetMaterial(Mtl* mtl) { return false; }
00199
00207 virtual bool SupportScriptWiring() const { return false; }
00208
00212 virtual bool GetUseScriptWiring() const { return false; }
00213
00217 virtual void SetUseScriptWiring(bool useScriptWiring) { ; }
00218
00227 virtual bool IsEmitterTMDependent() const { return false; }
00228
00232 virtual bool IsEmitterPropDependent() const { return false; }
00233
00239 virtual IObject* GetCurrentState(IObject* pContainer) { return NULL; }
00240
00244 virtual void SetCurrentState(IObject* actionState, IObject* pContainer) { ; }
00245 #pragma warning(pop)
00246
00249 FPInterfaceDesc* GetDesc() { return GetDescByID(PFACTION_INTERFACE); }
00250
00251 };
00252
00253
00254
00255 enum { kPF_GetActionDescription = 781,
00256
00257
00258 kPF_GetActionName,
00259
00260
00261
00262 kPF_PViewPublic,
00263
00264
00265
00266 kPF_PViewCategory,
00267
00268
00269
00270 kPF_IsFertile,
00271
00272
00273
00274
00275
00276 kPF_IsNonExecutable,
00277
00278
00279 kPF_PViewDepotIcon
00280 };
00281
00285 inline IPFAction* PFActionInterface(Object* obj) {
00286 return ((obj == NULL) ? NULL : GetPFActionInterface(obj));
00287 };
00288
00292 inline IPFAction* PFActionInterface(INode* node) {
00293 return ((node == NULL) ? NULL : PFActionInterface(node->GetObjectRef()));
00294 };
00295
00302 PFExport int IsPFActionActive(INode* actionNode);
00303