SelectSequenceDialog.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include "EditorDefs.h"
  9. #include "SelectSequenceDialog.h"
  10. // CSelectSequence dialog
  11. //////////////////////////////////////////////////////////////////////////
  12. CSelectSequenceDialog::CSelectSequenceDialog(QWidget* pParent)
  13. : CGenericSelectItemDialog(pParent)
  14. {
  15. setWindowTitle(tr("Select Sequence"));
  16. }
  17. //////////////////////////////////////////////////////////////////////////
  18. /* virtual */ void
  19. CSelectSequenceDialog::OnInitDialog()
  20. {
  21. SetMode(eMODE_LIST);
  22. CGenericSelectItemDialog::OnInitDialog();
  23. }
  24. //////////////////////////////////////////////////////////////////////////
  25. /* virtual */ void
  26. CSelectSequenceDialog::GetItems(std::vector<SItem>& outItems)
  27. {
  28. IMovieSystem* pMovieSys = GetIEditor()->GetMovieSystem();
  29. if (pMovieSys)
  30. {
  31. for (int i = 0; i < pMovieSys->GetNumSequences(); ++i)
  32. {
  33. IAnimSequence* pSeq = pMovieSys->GetSequence(i);
  34. SItem item;
  35. AZStd::string fullname = pSeq->GetName();
  36. item.name = fullname.c_str();
  37. outItems.push_back(item);
  38. }
  39. }
  40. }
  41. #include <moc_SelectSequenceDialog.cpp>