summaryrefslogtreecommitdiff
path: root/utils/sceneviewer/clipviewpanel.cpp
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/sceneviewer/clipviewpanel.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'utils/sceneviewer/clipviewpanel.cpp')
-rw-r--r--utils/sceneviewer/clipviewpanel.cpp103
1 files changed, 103 insertions, 0 deletions
diff --git a/utils/sceneviewer/clipviewpanel.cpp b/utils/sceneviewer/clipviewpanel.cpp
new file mode 100644
index 0000000..209ad3e
--- /dev/null
+++ b/utils/sceneviewer/clipviewpanel.cpp
@@ -0,0 +1,103 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================
+
+#include "ClipViewPanel.h"
+#include "dme_controls/dmedageditpanel.h"
+#include "tier1/KeyValues.h"
+
+#include "movieobjects/dmedag.h"
+#include "movieobjects/dmemesh.h"
+#include "movieobjects/dmevertexdata.h"
+#include "vstdlib/random.h"
+
+using namespace vgui;
+
+
+
+//-----------------------------------------------------------------------------
+// Constructor, destructor
+//-----------------------------------------------------------------------------
+CClipViewPanel::CClipViewPanel( vgui::Panel *pParent, const char *pName ) :
+ BaseClass( pParent, pName )
+{
+ m_pClipViewPreview = new CDmeDagEditPanel( this, "ClipViewPreview" );
+
+ SetVisible( true );
+ SetMinimizeButtonVisible( false );
+ SetMaximizeButtonVisible( false );
+ SetMinimizeToSysTrayButtonVisible( false );
+ SetCloseButtonVisible( false );
+
+ SetTitle( "3d View", true );
+
+// LoadControlSettings( "resource/SceneViewer_ClipView.res" );
+}
+
+CClipViewPanel::~CClipViewPanel()
+{
+}
+
+
+//-----------------------------------------------------------------------------
+// Scheme settings
+//-----------------------------------------------------------------------------
+void CClipViewPanel::ApplySchemeSettings( vgui::IScheme *pScheme )
+{
+ BaseClass::ApplySchemeSettings( pScheme );
+ SetBorder( pScheme->GetBorder( "MenuBorder") );
+}
+
+
+//-----------------------------------------------------------------------------
+// Stores the clip
+//-----------------------------------------------------------------------------
+void CClipViewPanel::SetScene( CDmeDag *pScene )
+{
+ m_pClipViewPreview->SetDmeElement( pScene );
+}
+
+CDmeDag *CClipViewPanel::GetScene( )
+{
+ return m_pClipViewPreview->GetDmeElement( );
+}
+
+
+//-----------------------------------------------------------------------------
+// Sets animation
+//-----------------------------------------------------------------------------
+void CClipViewPanel::SetAnimationList( CDmeAnimationList *pAnimationList )
+{
+ m_pClipViewPreview->SetAnimationList( pAnimationList );
+}
+
+void CClipViewPanel::SetVertexAnimationList( CDmeAnimationList *pAnimationList )
+{
+ m_pClipViewPreview->SetVertexAnimationList( pAnimationList );
+}
+
+void CClipViewPanel::SetCombinationOperator( CDmeCombinationOperator *pComboOp )
+{
+ m_pClipViewPreview->SetCombinationOperator( pComboOp );
+}
+
+void CClipViewPanel::RefreshCombinationOperator()
+{
+ m_pClipViewPreview->RefreshCombinationOperator();
+}
+
+
+//-----------------------------------------------------------------------------
+// performs the layout
+//-----------------------------------------------------------------------------
+void CClipViewPanel::PerformLayout()
+{
+ BaseClass::PerformLayout();
+
+ int x, y, w, h;
+ GetClientArea( x, y, w, h );
+ m_pClipViewPreview->SetBounds( x, y, w, h );
+} \ No newline at end of file