home *** CD-ROM | disk | FTP | other *** search
/ Xentax forum attachments archive / xentax.7z / 8090 / ModelEdit.7z / ImportAnimation.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2006-03-08  |  2.9 KB  |  103 lines

  1. // ImportAnimation.cpp : implementation file
  2. //
  3.  
  4. #include "precompile.h"
  5. #include "modeledit.h"
  6. #include "importanimation.h"
  7.  
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CImportAnimation
  16.  
  17. IMPLEMENT_DYNAMIC(CImportAnimation, CFileDialog)
  18.  
  19. CImportAnimation::CImportAnimation(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, LPCTSTR lpszFileName,
  20.         DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) :
  21.         CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd)
  22. {
  23.     m_bImportAnimations = TRUE;
  24.     m_bImportUserDims = FALSE;
  25.     m_bImportTranslations = FALSE;
  26.     m_bUseUVCoords = FALSE;
  27.     m_bImportSockets = FALSE;
  28.     m_bImportWeightSets = FALSE;
  29.     m_ofn.Flags |= OFN_ENABLETEMPLATE;
  30.     m_ofn.lpTemplateName = MAKEINTRESOURCE( IDD_IMPORTANIM );
  31.     m_ofn.Flags |= OFN_ALLOWMULTISELECT;
  32. }
  33.  
  34. BEGIN_MESSAGE_MAP(CImportAnimation, CFileDialog)
  35.     //{{AFX_MSG_MAP(CImportAnimation)
  36.     ON_BN_CLICKED(IDC_IMPORT_USEUVCOORDS, OnCheck)
  37.     ON_BN_CLICKED(IDC_IMPORT_ANIMATIONS, OnCheck)
  38.     ON_BN_CLICKED(IDC_IMPORT_USERDIMS, OnCheck)
  39.     ON_BN_CLICKED(IDC_IMPORT_TRANSLATIONS, OnCheck)
  40.     ON_BN_CLICKED(IDC_IMPORT_SOCKETS, OnCheck)
  41.     ON_BN_CLICKED(IDC_IMPORT_WEIGHTSETS, OnCheck)
  42.     //}}AFX_MSG_MAP
  43. END_MESSAGE_MAP()
  44.  
  45.  
  46. void CImportAnimation::OnInitDone( )
  47. {
  48.     CButton *pCheck;
  49.  
  50.     pCheck = ( CButton * )GetDlgItem( IDC_IMPORT_ANIMATIONS );
  51.     if( pCheck )
  52.         pCheck->SetCheck( m_bImportAnimations );
  53.     
  54.     pCheck = ( CButton * )GetDlgItem( IDC_IMPORT_USEUVCOORDS );
  55.     if( pCheck )
  56.         pCheck->SetCheck( m_bUseUVCoords );
  57.  
  58.     pCheck = ( CButton * )GetDlgItem( IDC_IMPORT_USERDIMS );
  59.     if( pCheck )
  60.         pCheck->SetCheck( m_bImportUserDims );
  61.  
  62.     pCheck = ( CButton * )GetDlgItem( IDC_IMPORT_TRANSLATIONS );
  63.     if( pCheck )
  64.         pCheck->SetCheck( m_bImportTranslations );
  65.  
  66.     pCheck = ( CButton * )GetDlgItem( IDC_IMPORT_SOCKETS );
  67.     if( pCheck )
  68.         pCheck->SetCheck( m_bImportSockets );
  69.  
  70.     pCheck = ( CButton * )GetDlgItem( IDC_IMPORT_WEIGHTSETS );
  71.     if( pCheck )
  72.         pCheck->SetCheck( m_bImportWeightSets );
  73. }
  74.  
  75. void CImportAnimation::OnCheck() 
  76. {
  77.     CButton *pCheck;
  78.  
  79.     pCheck = ( CButton * )GetDlgItem( IDC_IMPORT_ANIMATIONS );
  80.     if( pCheck )
  81.         m_bImportAnimations = pCheck->GetCheck( );
  82.     
  83.     pCheck = ( CButton * )GetDlgItem( IDC_IMPORT_USEUVCOORDS );
  84.     if( pCheck )
  85.         m_bUseUVCoords = pCheck->GetCheck( );
  86.  
  87.     pCheck = ( CButton * )GetDlgItem( IDC_IMPORT_USERDIMS );
  88.     if( pCheck )
  89.         m_bImportUserDims = pCheck->GetCheck( );
  90.  
  91.     pCheck = ( CButton * )GetDlgItem( IDC_IMPORT_TRANSLATIONS );
  92.     if( pCheck )
  93.         m_bImportTranslations = pCheck->GetCheck( );
  94.  
  95.     pCheck = ( CButton * )GetDlgItem( IDC_IMPORT_SOCKETS );
  96.     if( pCheck )
  97.         m_bImportSockets = pCheck->GetCheck( );
  98.  
  99.     pCheck = ( CButton * )GetDlgItem( IDC_IMPORT_WEIGHTSETS );
  100.     if( pCheck )
  101.         m_bImportWeightSets = pCheck->GetCheck( );
  102. }
  103.