//===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ==== // // Animation commands // //========================================================================== // Valve includes #include "datamodel/dmelementfactoryhelper.h" #include "mdlobjects/dmeanimcmd.h" #include "mdlobjects/dmemotioncontrol.h" #include "mdlobjects/dmesequence.h" #include "mdlobjects/dmeanimationassemblycommand.h" #include "movieobjects/dmechannel.h" #include "bone_setup.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmd, CDmeAnimCmd ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmd::OnConstruction() { } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmd::OnDestruction() { } //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmdFixupLoop, CDmeAnimCmdFixupLoop ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdFixupLoop::OnConstruction() { m_nStartFrame.Init( this, "startFrame" ); m_nEndFrame.Init( this, "endFrame" ); } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdFixupLoop::OnDestruction() { } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- const char *CDmeAnimCmdFixupLoop::GetAssemblyDmElementTypeString() { return CDmeFixupLoop::GetStaticTypeSymbol().String(); } //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmdWeightList, CDmeAnimCmdWeightList ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdWeightList::OnConstruction() { m_sWeightListName.Init( this, "weightListName" ); } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdWeightList::OnDestruction() { } //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmdSubtract, CDmeAnimCmdSubtract ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdSubtract::OnConstruction() { m_eAnimation.Init( this, "animation", FATTRIB_NEVERCOPY ); m_nFrame.Init( this, "frame" ); } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdSubtract::OnDestruction() { } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- const char *CDmeAnimCmdSubtract::GetAssemblyDmElementTypeString() { return CDmeSubtract::GetStaticTypeSymbol().String(); } //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmdPreSubtract, CDmeAnimCmdPreSubtract ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdPreSubtract::OnConstruction() { } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdPreSubtract::OnDestruction() { } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- const char *CDmeAnimCmdPreSubtract::GetAssemblyDmElementTypeString() { return CDmePreSubtract::GetStaticTypeSymbol().String(); } //----------------------------------------------------------------------------- // CDmeAnimCmdAlign //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmdAlign, CDmeAnimCmdAlign ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdAlign::OnConstruction() { m_eAnimation.Init( this, "animation", FATTRIB_NEVERCOPY ); m_sBoneName.Init( this, "boneName" ); m_nSourceFrame.Init( this, "sourceFrame" ); m_nDestinatonFrame.Init( this, "destinationFrame" ); m_eMotionControl.InitAndCreate( this, "motionControl" ); } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdAlign::OnDestruction() { } //----------------------------------------------------------------------------- // CDmeAnimCmdRotateTo //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmdRotateTo, CDmeAnimCmdRotateTo ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdRotateTo::OnConstruction() { m_flAngle.Init( this, "angle" ); } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdRotateTo::OnDestruction() { } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- const char *CDmeAnimCmdRotateTo::GetAssemblyDmElementTypeString() { return CDmeRotateTo::GetStaticTypeSymbol().String(); } //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmdWalkFrame, CDmeAnimCmdWalkFrame ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdWalkFrame::OnConstruction() { m_eMotionControl.InitAndCreate( this, "motionControl" ); m_nEndFrame.Init( this, "endFrame" ); } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdWalkFrame::OnDestruction() { } //----------------------------------------------------------------------------- // CDmeAnimCmdDerivative //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmdDerivative, CDmeAnimCmdDerivative ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdDerivative::OnConstruction() { m_flScale.InitAndSet( this, "scale", 1.0f ); } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdDerivative::OnDestruction() { } //----------------------------------------------------------------------------- // CDmeAnimCmdLinearDelta //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmdLinearDelta, CDmeAnimCmdLinearDelta ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdLinearDelta::OnConstruction() { } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdLinearDelta::OnDestruction() { } //----------------------------------------------------------------------------- // CDmeAnimCmdSplineDelta //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmdSplineDelta, CDmeAnimCmdSplineDelta ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdSplineDelta::OnConstruction() { } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdSplineDelta::OnDestruction() { } //----------------------------------------------------------------------------- // CDmeAnimCmdCompress //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmdCompress, CDmeAnimCmdCompress ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdCompress::OnConstruction() { m_nSkipFrames.Init( this, "skipFrames" ); } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdCompress::OnDestruction() { } //----------------------------------------------------------------------------- // CDmeAnimCmdNumFrames //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmdNumFrames, CDmeAnimCmdNumFrames ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdNumFrames::OnConstruction() { m_nFrames.Init( this, "frames" ); } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdNumFrames::OnDestruction() { } //----------------------------------------------------------------------------- // CDmeAnimCmdLocalHierarchy //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmdLocalHierarchy, CDmeAnimCmdLocalHierarchy ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdLocalHierarchy::OnConstruction() { m_sBoneName.Init( this, "boneName" ); m_sParentBoneName.Init( this, "parentBoneName" ); m_flStartFrame.Init( this, "startFrame" ); m_flPeakFrame.Init( this, "peakFrame" ); m_flTailFrame.Init( this, "tailFrame" ); m_flEndFrame.Init( this, "endFrame" ); } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdLocalHierarchy::OnDestruction() { } //----------------------------------------------------------------------------- // CDmeAnimCmdNoAnimation //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Expose this class to the scene database //----------------------------------------------------------------------------- IMPLEMENT_ELEMENT_FACTORY( DmeAnimCmdNoAnimation, CDmeAnimCmdNoAnimation ); //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdNoAnimation::OnConstruction() { m_bNullAttr.Init( this, "nullAttr" ); } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void CDmeAnimCmdNoAnimation::OnDestruction() { }