!B (Sandbox) (CE-21795) Importing models with multisubmaterials via fbx switches...
[CRYENGINE.git] / Code / Sandbox / Plugins / LodGeneratorPlugin / panel / LodGeneratorAllPanel.h
bloba4ee102b015a68530188ae75fc5d4ed76828f883
1 #pragma once
3 #include <QWidget>
4 #include <QTime>
5 #include <vector>
6 #include <string>
8 #include "LodGeneratorOptionsPanel.h"
10 namespace Ui {
12 enum ELodGeneratorState
14 eLGS_GeneratePreparePre,
15 eLGS_GeneratePrepare,
16 eLGS_GenerateMesh,
17 eLGS_GenerateMaterial,
18 eLGS_None,
20 struct LodInfo
22 int lod;
23 float percentage;
24 int width;
25 int height;
27 class CLodGeneratorAllPanel;
30 class CLodGeneratorAllPanel : public QWidget
32 Q_OBJECT
34 public:
35 explicit CLodGeneratorAllPanel(QWidget *parent = 0);
36 ~CLodGeneratorAllPanel();
38 const QString LoadedFile();
39 const QString MaterialFile();
40 const void RefreshMaterialFile();
41 void Reset();
43 signals:
44 void SelectMeshFile_Signal(const QString);
45 void SelectMateralFile_Signal(const QString);
46 void UpdateProgress_Signal(int Progress);
48 public slots:
49 void SelectMeshFile_Slot();
50 void SelectObjFile_Slot();
51 void SelectMaterial_Slot();
52 void SelectConfig_Slot(int index);
54 void AutoGenerate();
55 void GenerateOption();
57 private:
58 void OnGenerateMeshs();
59 void OnGenerateMaterials();
60 void OnSave();
61 void OnOpenWithPathParameter(const QString& objectPath);
62 void ShowMessage(std::string message);
63 void timerEvent( QTimerEvent *event );
64 void TaskStarted();
65 void TaskFinished();
66 void SetState(Ui::ELodGeneratorState lodGeneratorState);
68 bool FileOpened();
69 void UpdateConfig();
71 private:
72 Ui::CLodGeneratorAllPanel *ui;
73 int m_nTimerId;
74 QTime m_StartTime;
76 QString m_MeshPath;
77 QString m_MaterialPath;
78 Ui::ELodGeneratorState m_LodGeneratorState;
80 std::vector<Ui::LodInfo> m_LodInfoList;
82 CLodGeneratorOptionsPanel* m_LodGeneratorOptionsPanel;