From 9526081ca11019ed6e94ecf8aa9a5d0aa607be73 Mon Sep 17 00:00:00 2001 From: dnk-88 Date: Wed, 26 Jan 2011 15:09:08 +0200 Subject: [PATCH 1/3] Changed: #1171 Changed the order of initialization. OVQT weather & sun color dock window. --- .../3d/object_viewer_qt/src/CMakeLists.txt | 3 +- .../src/global_wind_dialog.cpp | 11 +- .../object_viewer_qt/src/global_wind_dialog.h | 1 - .../src/graphics_viewport.cpp | 4 +- .../src/images/ico_skelscale.png | Bin 4321 -> 4789 bytes .../3d/object_viewer_qt/src/main_window.cpp | 140 +++++------------- .../3d/object_viewer_qt/src/main_window.h | 6 +- .../object_viewer_qt/src/object_viewer_qt.qrc | 2 + .../object_viewer_qt/src/sun_color_dialog.cpp | 16 +- .../object_viewer_qt/src/sun_color_dialog.h | 1 - 10 files changed, 50 insertions(+), 134 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/CMakeLists.txt index 56d425655..ab7b12d51 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/CMakeLists.txt @@ -22,6 +22,7 @@ SET(OBJECT_VIEWER_HDR main_window.h graphics_viewport.h animation_dialog.h vegetable_dialog.h global_wind_dialog.h day_night_dialog.h sun_color_dialog.h vegetable_noise_value_widget.h vegetable_density_page.h vegetable_landscape_page.h vegetable_scale_page.h vegetable_appearance_page.h vegetable_rotate_page.h + tune_mrm_dialog.h extension_system/iplugin_manager.h extension_system/plugin_manager.h) SET(OBJECT_VIEWER_UIS animation_form.ui animation_set_form.ui settings_form.ui @@ -35,7 +36,7 @@ SET(OBJECT_VIEWER_UIS animation_form.ui animation_set_form.ui settings_form.ui particle_link_skeleton_form.ui water_pool_form.ui vegetable_dialog_form.ui vegetable_noise_value_form.ui global_wind_form.ui sun_color_form.ui day_night_form.ui vegetable_density_form.ui vegetable_apperance_form.ui vegetable_landscape_form.ui - vegetable_rotate_form.ui vegetable_scale_form.ui) + vegetable_rotate_form.ui vegetable_scale_form.ui tune_mrm_form.ui) SET(OBJECT_VIEWER_RCS object_viewer_qt.qrc) diff --git a/code/nel/tools/3d/object_viewer_qt/src/global_wind_dialog.cpp b/code/nel/tools/3d/object_viewer_qt/src/global_wind_dialog.cpp index fa018d914..b4902b2cb 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/global_wind_dialog.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/global_wind_dialog.cpp @@ -32,8 +32,9 @@ CGlobalWindDialog::CGlobalWindDialog(QWidget *parent) { _ui.setupUi(this); + _ui.horizontalSlider->setValue(int(Modules::objView().getScene()->getGlobalWindPower() * _ui.horizontalSlider->maximum())); + connect(_ui.horizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(setWndPower(int))); - connect(this, SIGNAL(visibilityChanged(bool)), this, SLOT(updateWnd(bool))); } CGlobalWindDialog::~CGlobalWindDialog() @@ -47,12 +48,4 @@ void CGlobalWindDialog::setWndPower(int value) Modules::objView().getScene()->setGlobalWindPower(fValue); } -void CGlobalWindDialog::updateWnd(bool visible) -{ - if (!visible || !Modules::objView().getScene()) - return; - - _ui.horizontalSlider->setValue(int(Modules::objView().getScene()->getGlobalWindPower() * _ui.horizontalSlider->maximum())); -} - } /* namespace NLQT */ \ No newline at end of file diff --git a/code/nel/tools/3d/object_viewer_qt/src/global_wind_dialog.h b/code/nel/tools/3d/object_viewer_qt/src/global_wind_dialog.h index f69231cdb..dc2e68aaf 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/global_wind_dialog.h +++ b/code/nel/tools/3d/object_viewer_qt/src/global_wind_dialog.h @@ -41,7 +41,6 @@ public: private Q_SLOTS: void setWndPower(int value); - void updateWnd(bool visible); private: diff --git a/code/nel/tools/3d/object_viewer_qt/src/graphics_viewport.cpp b/code/nel/tools/3d/object_viewer_qt/src/graphics_viewport.cpp index 2128cdbd1..04f956c11 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/graphics_viewport.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/graphics_viewport.cpp @@ -68,6 +68,7 @@ void CGraphicsViewport::init() Modules::objView().init((nlWindow)winId(), width(), height()); Modules::psEdit().init(); + Modules::veget().init(); setMouseTracking(true); setFocusPolicy(Qt::StrongFocus); @@ -77,7 +78,8 @@ void CGraphicsViewport::release() { //H_AUTO2 nldebug("CGraphicsViewport::release"); - + + Modules::veget().release(); Modules::psEdit().release(); Modules::objView().release(); } diff --git a/code/nel/tools/3d/object_viewer_qt/src/images/ico_skelscale.png b/code/nel/tools/3d/object_viewer_qt/src/images/ico_skelscale.png index 9d6455da243ab66633055f7133f53b9560946651..7154a8a05e09f3d7e797798d55834f7cd54a69ac 100644 GIT binary patch delta 4784 zcmV;h5>M^nA+;rtF@FSSK}|sb0I`n?{9y$E000SaNLh0L01egv01egwkZ*aM0000P zbVXQnQ*UN;cVTj608n9RZgehAMN}YmGcGkQHqe8uS^xkNB}qgTn{q6%yf9V5UF7%&#qfExx}f`7Zy9LL!>iIZ$5nMw9+ zCYfy7%udd<%}ypc$!@YKzWe?kqk)(;2zwd!oaLN%e)#|U?z{JU@7{Ocy^o*$Y!m$q zUApMGiNsmED1v<*1@+e+Z(e(kl_`T`YA>hd=&Bx+&xZErwsfaZ+Yfv%o1KB;?q1e< z2j>;HhwTXNhJVD=3t!f@_qwl_&xZCJd+BBCL{-g)q7&0VZtsGu)`K4zKl$X5^$0=O zwRa*QdO1%DnT5+SwK02#GypP0J}GTHmJ zVX?EY#Zm{4Y^jC7@Ck@Y>UwrV6*6})H2Z_ueM1l=R|B!O2~un7!Gk3PMvoEXbu9vO z_$5=1{?fy@2Ui|z4zA4*Oc;j@UL(aEJ{v}BoIm9fqbU22?EWF}V)9|&{a-`>yYGQZ zW)?8fyMOeG=4aL_Oi9gfRCwG`u(VlF-r1w#2Menj2#uMAh`7Bku9eS*(h>8t4OBx9 z>=5OFYU%`_C6BkP_6`VBYk}6@1I>fIerpjbi#KER4H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Gd&2 z5b_Tn;x#_r#CoQ3B~pGs@+&O`l9J%qe;`^Slh#$`=cB5)7=#Ltt5gKeA#j{CX;csZ zPzS_f@SKx6ECa~?_+#Sbt!3NJ>(`;J#fHKwd;?Tm3{0DbfzPvbu5!iKmYyCQc;{Vo z>3Kze{?M<0H#ete|C0)b7<(@ zz_2ht5GVk+5CU+{@wYz#Jg*ls3o-el?I<)GV6PbbnATAD;y?Yml4{AW!tAV99m$WgEiI2^DH4CI@#v+qK3GQPL*U57~~MXq+? z1%HiP{YqnLF}?j|lZ5ysh>KhPjSzar?${l>V|VPAVgCo$HvA!~F(Q}%0000init(); + _isGraphicsInitialized = true; + + if (_isSoundEnabled) + { + Modules::sound().init(); + _isSoundInitialized = true; + } _SkeletonTreeModel = new CSkeletonTreeModel(this); @@ -96,24 +105,16 @@ CMainWindow::CMainWindow(QWidget *parent) restoreGeometry(settings.value("QtWindowGeometry").toByteArray()); settings.endGroup(); - _isGraphicsEnabled = true; - _isLandscapeEnabled = true; - // As a special case, a QTimer with a timeout of 0 will time out as soon as all the events in the window system's event queue have been processed. // This can be used to do heavy work while providing a snappy user interface. _mainTimer = new QTimer(this); connect(_mainTimer, SIGNAL(timeout()), this, SLOT(updateRender())); - // timer->start(); // <- timeout 0 - // it's heavy on cpu, though, when no 3d driver initialized :) - _mainTimer->start(23); // 25fps _statusBarTimer = new QTimer(this); connect(_statusBarTimer, SIGNAL(timeout()), this, SLOT(updateStatusBar())); - _statusBarTimer->start(1000); _statusInfo = new QLabel(this); this->statusBar()->addPermanentWidget(_statusInfo); - Modules::config().setAndCallback("SoundEnabled", CConfigCallback(this, &CMainWindow::cfcbSoundEnabled)); } CMainWindow::~CMainWindow() @@ -131,15 +132,18 @@ CMainWindow::~CMainWindow() Modules::config().dropCallback("QtPalette"); Modules::config().dropCallback("QtStyle"); - _mainTimer->stop(); - _statusBarTimer->stop(); - delete _AnimationDialog; delete _AnimationSetDialog; delete _SlotManagerDialog; delete _SetupFog; + delete _TuneMRMDialog; delete _ParticleControlDialog; delete _ParticleWorkspaceDialog; + + if (_isSoundInitialized) + Modules::sound().releaseGraphics(); + + _GraphicsViewport->release(); delete _GraphicsViewport; } @@ -152,11 +156,17 @@ void CMainWindow::setVisible(bool visible) if (visible) { QMainWindow::setVisible(true); - updateInitialization(true); + if (_isSoundInitialized) + Modules::sound().initGraphics(); + _mainTimer->start(23); + _statusBarTimer->start(1000); } else { - updateInitialization(false); + _mainTimer->stop(); + _statusBarTimer->stop(); + if (_isSoundInitialized) + Modules::sound().releaseGraphics(); QMainWindow::setVisible(false); } } @@ -273,95 +283,6 @@ void CMainWindow::updateStatusBar() } } -void CMainWindow::updateInitialization(bool visible) -{ - bool done; - do - { - done = true; // set false whenever change - bool wantSound = _isSoundEnabled && visible; - bool wantGraphics = _isGraphicsEnabled && visible; - // TODO WARNING: made Landscape stuff - bool wantLandscape = wantGraphics && _isGraphicsInitialized && _isLandscapeEnabled; - - // .. stuff that depends on other stuff goes on top to prioritize deinitialization - - // Landscape - if (_isLandscapeInitialized) - { - if (!wantLandscape) - { - _isLandscapeInitialized = false; -// if (_isGraphicsInitialized) -// Modules::veget().releaseGraphics(); - Modules::veget().release(); - done = false; - } - } - else - { - if (wantLandscape) - { - Modules::veget().init(); -// if (_isGraphicsInitialized) -// Modules::veget().initGraphics(); - _isLandscapeInitialized = true; - done = false; - } - } - - // Graphics (Driver) - if (_isGraphicsInitialized) - { - if (!wantGraphics) - { - _isGraphicsInitialized = false; - if (_isSoundInitialized) - Modules::sound().releaseGraphics(); - _GraphicsViewport->release(); - done = false; - } - } - else - { - if (wantGraphics) - { - _GraphicsViewport->init(); - if (_isSoundInitialized) - Modules::sound().initGraphics(); - _isGraphicsInitialized = true; - done = false; - } - } - - // Sound (AudioMixer) - if (_isSoundInitialized) - { - if (!wantSound) - { - _isSoundInitialized = false; - if (_isGraphicsInitialized) - Modules::sound().releaseGraphics(); - Modules::sound().release(); - done = false; - } - } - else - { - if (wantSound) - { - Modules::sound().init(); - if (_isGraphicsInitialized) - Modules::sound().initGraphics(); - _isSoundInitialized = true; - done = false; - } - } - - } - while (!done); -} - void CMainWindow::createActions() { _openAction = new QAction(tr("&Open..."), this); @@ -477,6 +398,9 @@ void CMainWindow::createMenus() _toolsMenu->addAction(_SunColorDialog->toggleViewAction()); + //_toolsMenu->addAction(_TuneMRMDialog->toggleViewAction()); + _TuneMRMDialog->toggleViewAction()->setIcon(QIcon(":/images/ico_mrm_mesh.png")); + connect(_ParticleControlDialog->toggleViewAction(), SIGNAL(triggered(bool)), _ParticleWorkspaceDialog, SLOT(setVisible(bool))); @@ -518,6 +442,7 @@ void CMainWindow::createToolBars() _toolsBar->addAction(_VegetableDialog->toggleViewAction()); _toolsBar->addAction(_GlobalWindDialog->toggleViewAction()); _toolsBar->addAction(_SkeletonScaleDialog->toggleViewAction()); +// _toolsBar->addAction(_TuneMRMDialog->toggleViewAction()); } void CMainWindow::createStatusBar() @@ -591,6 +516,11 @@ void CMainWindow::createDialogs() addDockWidget(Qt::RightDockWidgetArea, _SetupFog); _SetupFog->setVisible(false); + // create tune mrm dialog + _TuneMRMDialog = new CTuneMRMDialog(this); + addDockWidget(Qt::BottomDockWidgetArea, _TuneMRMDialog); + _TuneMRMDialog->setVisible(false); + connect(_ParticleControlDialog, SIGNAL(changeState()), _ParticleWorkspaceDialog, SLOT(setNewState())); connect(_ParticleWorkspaceDialog, SIGNAL(changeActiveNode()), _ParticleControlDialog, SLOT(updateActiveNode())); connect(_AnimationSetDialog->ui.setLengthPushButton, SIGNAL(clicked()), _AnimationDialog, SLOT(changeAnimLength())); @@ -637,8 +567,6 @@ void CMainWindow::cfcbSoundEnabled(NLMISC::CConfigFile::CVar &var) void CMainWindow::updateRender() { - updateInitialization(isVisible()); - if (isVisible()) { diff --git a/code/nel/tools/3d/object_viewer_qt/src/main_window.h b/code/nel/tools/3d/object_viewer_qt/src/main_window.h index ee00a84fe..94b8b74cc 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/main_window.h +++ b/code/nel/tools/3d/object_viewer_qt/src/main_window.h @@ -53,6 +53,7 @@ class CVegetableDialog; class CGlobalWindDialog; class CDayNightDialog; class CSunColorDialog; +class CTuneMRMDialog; class CMainWindow : public QMainWindow { @@ -93,7 +94,6 @@ private: void createStatusBar(); void createDialogs(); - void updateInitialization(bool visible); bool loadFile(const QString &fileName, const QString &skelName); void cfcbQtStyle(NLMISC::CConfigFile::CVar &var); @@ -102,7 +102,6 @@ private: bool _isGraphicsInitialized, _isGraphicsEnabled; bool _isSoundInitialized, _isSoundEnabled; - bool _isLandscapeInitialized, _isLandscapeEnabled; CGraphicsViewport *_GraphicsViewport; CAnimationDialog *_AnimationDialog; @@ -117,7 +116,7 @@ private: CSkeletonScaleDialog *_SkeletonScaleDialog; CDayNightDialog *_DayNightDialog; CSunColorDialog *_SunColorDialog; - + CTuneMRMDialog *_TuneMRMDialog; CSkeletonTreeModel *_SkeletonTreeModel; QPalette _originalPalette; @@ -140,7 +139,6 @@ private: QAction *_renderModeAction; QAction *_frameDelayAction; QAction *_lightGroupAction; - QAction *_tuneMRMAction; QAction *_reloadTexturesAction; QAction *_cameraModeAction; QAction *_resetCameraAction; diff --git a/code/nel/tools/3d/object_viewer_qt/src/object_viewer_qt.qrc b/code/nel/tools/3d/object_viewer_qt/src/object_viewer_qt.qrc index 1e63d3f0a..5b14b74f6 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/object_viewer_qt.qrc +++ b/code/nel/tools/3d/object_viewer_qt/src/object_viewer_qt.qrc @@ -27,6 +27,8 @@ images/ico_bgcolor.png images/ico_framedelay.png images/ico_skelscale.png + images/ico_mrm_mesh.png + images/ico_light_group.png images/clear.png images/insert.png images/new.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/sun_color_dialog.cpp b/code/nel/tools/3d/object_viewer_qt/src/sun_color_dialog.cpp index 0a17325ad..9a76b9db1 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/sun_color_dialog.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/sun_color_dialog.cpp @@ -34,7 +34,11 @@ CSunColorDialog::CSunColorDialog(QWidget *parent) { _ui.setupUi(this); - connect(this, SIGNAL(visibilityChanged(bool)), this, SLOT(updateSunColor(bool))); + _ui.ambientWidget->setColor(Modules::objView().getScene()->getSunAmbient()); + _ui.diffuseWidget->setColor(Modules::objView().getScene()->getSunDiffuse()); + _ui.specularWidget->setColor(Modules::objView().getScene()->getSunSpecular()); + + //connect(this, SIGNAL(visibilityChanged(bool)), this, SLOT(updateSunColor(bool))); connect(_ui.ambientWidget, SIGNAL(colorChanged(NLMISC::CRGBA)), this, SLOT(setAmbientSunColor(NLMISC::CRGBA))); connect(_ui.diffuseWidget, SIGNAL(colorChanged(NLMISC::CRGBA)), this, SLOT(setDiffuseSunColor(NLMISC::CRGBA))); connect(_ui.specularWidget, SIGNAL(colorChanged(NLMISC::CRGBA)), this, SLOT(setSpecularSunColor(NLMISC::CRGBA))); @@ -44,16 +48,6 @@ CSunColorDialog::~CSunColorDialog() { } -void CSunColorDialog::updateSunColor(bool visible) -{ - if (!visible || !Modules::objView().getScene()) - return; - - _ui.ambientWidget->setColor(Modules::objView().getScene()->getSunAmbient()); - _ui.diffuseWidget->setColor(Modules::objView().getScene()->getSunDiffuse()); - _ui.specularWidget->setColor(Modules::objView().getScene()->getSunSpecular()); -} - void CSunColorDialog::setAmbientSunColor(NLMISC::CRGBA color) { Modules::objView().getScene()->setSunAmbient(color); diff --git a/code/nel/tools/3d/object_viewer_qt/src/sun_color_dialog.h b/code/nel/tools/3d/object_viewer_qt/src/sun_color_dialog.h index 1a4592caf..587ab5b1b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/sun_color_dialog.h +++ b/code/nel/tools/3d/object_viewer_qt/src/sun_color_dialog.h @@ -44,7 +44,6 @@ public: ~CSunColorDialog(); private Q_SLOTS: - void updateSunColor(bool visible); void setAmbientSunColor(NLMISC::CRGBA color); void setDiffuseSunColor(NLMISC::CRGBA color); void setSpecularSunColor(NLMISC::CRGBA color); From 2337becd25456d2cc35b8d271d5917b7f9d63502 Mon Sep 17 00:00:00 2001 From: dnk-88 Date: Wed, 26 Jan 2011 15:10:33 +0200 Subject: [PATCH 2/3] Changed: #1193 Added new icons and tune MRM dialog. --- .../src/images/ico_light_group.png | Bin 0 -> 5583 bytes .../src/images/ico_mrm_mesh.png | Bin 0 -> 9742 bytes .../object_viewer_qt/src/tune_mrm_dialog.cpp | 36 ++++ .../3d/object_viewer_qt/src/tune_mrm_dialog.h | 52 ++++++ .../3d/object_viewer_qt/src/tune_mrm_form.ui | 164 ++++++++++++++++++ 5 files changed, 252 insertions(+) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/images/ico_light_group.png create mode 100644 code/nel/tools/3d/object_viewer_qt/src/images/ico_mrm_mesh.png create mode 100644 code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.cpp create mode 100644 code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.h create mode 100644 code/nel/tools/3d/object_viewer_qt/src/tune_mrm_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/images/ico_light_group.png b/code/nel/tools/3d/object_viewer_qt/src/images/ico_light_group.png new file mode 100644 index 0000000000000000000000000000000000000000..312f08a0f0dde4f44b14dfa837065a90123a719a GIT binary patch literal 5583 zcmV;=6)@_FP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGh)&Kwv)&Y=jd7JeSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+*LgRNQs02Mz;L_t(|UhSI)R1{m9$7gnTcJ}P1Z{51x{NyKc{sH)>iJn4r|ANpXrW48& zJ?~Gd9yR=@#P5G-qv#sHW=8zb>wNL^snP16>!x(A|NdOp`q8iRxG6)qOtfKDS%P_R z)aC_Yk-m$#Qwag`RuG80vH0>QxJ3JT9^d~O zdrQ5M9%=+(j0K|nG<)`xtXuhk3BQ%6EnmFu(L>=5S}i?d!YZ3A_Kzn@5ZzG$5j)!Q|MJ4}aObydhAo|!N@17!DIYs^8k-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rBiW?fd$ z&2yQ-H_s*npD9=ud?IUk@aZhu;JR$<;PW|4L+A^YkgK9)AySj-_A7bF9wK6RZ9F4}cRzVZLl|Id(#c#;<9rfp}V(QlwX(gY@6Qwkd# z$pB*`b;NF8Hs*H$(tA=Cuz$__9b1Q(NIO1P9lGCN%6+Yp{B2fF%QgGi;HE{Hz%pQ& z?E0T55C(sf1Da&@&TxGwoheg@Z zUW*1i8uUs9hzMRwk)MZ9Khs@fHH>cj>rWl0V?X;LqQ*N{^7FZwte$iL9`Brw9?yzd zF~il-;JK;sJh-h{LK7kfS`M2BM?0jCw0@$a1x28A4@`;VE@kh$^UPh z(5)KJ36)nnXkIfjnMYIJd9b3Frj!tSvk9I2=Tb@BedZT|ezu{$-Zl*x$u2AYTy*`v dj{hqT{4Z#+%_epdyXF7@002ovPDHLkV1nnQVTAwy literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/object_viewer_qt/src/images/ico_mrm_mesh.png b/code/nel/tools/3d/object_viewer_qt/src/images/ico_mrm_mesh.png new file mode 100644 index 0000000000000000000000000000000000000000..8896f7b499adadb7c560f2e1fab7fe65edf3188c GIT binary patch literal 9742 zcmV+pCh^&cP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGh)&Kwv)&Y=jd7JeSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+*LgRNQs0407&L_t(|UhR8zbd>kjbw;9SJVB$70KvVG z1PGEql!ORzcOmYECAdq`0;N!(l)9$w-cr4FZ*O}`g%(KI?>@ho1bUPEz2BeTTHnoD zXU)trPiCI8&pG?pGbSeg{rfKhJqXxE+5YYlKk{?C7~3~2BF&#RjWO*Qm^PrpvB17# zXz7p+m)a2>)3#0Nn7MQM6X4~|z5ta7yrf(kaA9!?ufAquQ{>7i>`yah}(C^-B=V$)V`J?s!6DGKF z?TV#oh#o_7oiMb-3ByZ=z^!ToJR96Fy4eF`){KTv`xs2vJPs4Ljl-m!KA5!22a|V> z$CT|pn6_&oCT|}HpRL}Qw1e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b/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.cpp new file mode 100644 index 000000000..81af1eae3 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.cpp @@ -0,0 +1,36 @@ +/* + Object Viewer Qt + Copyright (C) 2010 Dzmitry Kamiahin + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +*/ + +#include "stdpch.h" +#include "tune_mrm_dialog.h" + +namespace NLQT +{ + +CTuneMRMDialog::CTuneMRMDialog(QWidget *parent) + : QDockWidget(parent) +{ + ui.setupUi(this); +} + +CTuneMRMDialog::~CTuneMRMDialog() +{ +} + +} /* namespace NLQT */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.h b/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.h new file mode 100644 index 000000000..74b3c9bae --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.h @@ -0,0 +1,52 @@ +/* + Object Viewer Qt + Copyright (C) 2010 Dzmitry Kamiahin + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +*/ + +#ifndef TUNE_MRM_DIALOG_H +#define TUNE_MRM_DIALOG_H + +#include "ui_tune_mrm_form.h" + +// STL includes + +// NeL includes + +// Project includes + +namespace NLQT +{ + +class CTuneMRMDialog: public QDockWidget +{ + Q_OBJECT + +public: + CTuneMRMDialog(QWidget *parent = 0); + ~CTuneMRMDialog(); + +private Q_SLOTS: + +private: + + Ui::CTuneMRMDialog ui; + +}; /* class CTuneMRMDialog */ + +} /* namespace NLQT */ + +#endif // TUNE_MRM_DIALOG_H diff --git a/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_form.ui b/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_form.ui new file mode 100644 index 000000000..ba6bd4d5e --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_form.ui @@ -0,0 +1,164 @@ + + + CTuneMRMDialog + + + + 0 + 0 + 576 + 87 + + + + + 476 + 87 + + + + QDockWidget::AllDockWidgetFeatures + + + Tune MRM (The maximum faces in scene) + + + + + + + + + Max (specify the max value) + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + true + + + QAbstractSpinBox::NoButtons + + + 10000000 + + + 100000 + + + + + + + + + + + Current (real final max polygon value) + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + true + + + QAbstractSpinBox::NoButtons + + + 10000000 + + + 100000 + + + + + + + + + 100000 + + + 5000 + + + 10000 + + + 100000 + + + Qt::Horizontal + + + 5000 + + + + + + + 100000 + + + 100000 + + + Qt::Horizontal + + + + + + + + + + horizontalSlider + valueChanged(int) + spinBox + setValue(int) + + + 214 + 67 + + + 232 + 47 + + + + + From 255c7715f58b84cd42349be255d379999b49e510 Mon Sep 17 00:00:00 2001 From: dnk-88 Date: Thu, 27 Jan 2011 15:20:49 +0200 Subject: [PATCH 3/3] Changed: #1193 Tune MRM dialog. --- .../src/images/ico_light_group.png | Bin 5583 -> 5398 bytes .../3d/object_viewer_qt/src/main_window.cpp | 4 +- .../3d/object_viewer_qt/src/object_viewer.cpp | 8 ++-- .../object_viewer_qt/src/tune_mrm_dialog.cpp | 31 +++++++++++- .../3d/object_viewer_qt/src/tune_mrm_dialog.h | 4 +- .../3d/object_viewer_qt/src/tune_mrm_form.ui | 44 ++++++------------ 6 files changed, 55 insertions(+), 36 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/images/ico_light_group.png b/code/nel/tools/3d/object_viewer_qt/src/images/ico_light_group.png index 312f08a0f0dde4f44b14dfa837065a90123a719a..49ad8830a421ce5d27cf31a2217ba30738642028 100644 GIT binary patch delta 5354 zcmV!e8Qzw5ElSxEDRCr$Pn+H%;S(?XZHdpP| z)YR;3)$Z18?QEzO1jPh`+Ja;xM*~O@0a2n76eUN=`4JyUqF`th+osI{1BePpQc=;y zfQku;@4w%<_dUc`(FfSmQ@d9E>Rj%-=e+O#|GsnXxflG^ucZ73;2*!V3tjscgf=mk zkpF+ue!r;eDDYns|25s9XpDbhMof2{pS?c?tuj+zN@M-!OpWy?ALnsXhJ3kjvqO1; zNpRHGrD2i2%fqX)?So6RH(H9G*8R_)JixCJz}?ne|6U?klb9N&`yeSu3wcq7gaL{Y zEsz$hjrbkvNDb6NwC{2x2J74urmahCJ>!4-A73MupLI-;sO+~TDQl9lqV+`w^Xzcz zYy`R+1$cJ168#U4;N|0^c-C8smWFH`t=R@)@>=BYGDmK-3E~1Zkri)L)_TtGk3VbB zGxcScPlPIE#~An2l{ldPUI|7A&qE}-_6e@id7j7jzs3GCZ={FnBR9qrQGROu`$~UZ z*UeO1Kg&4BkA&N1MH>%4xRwmj$i+#7OAL8ufW(OBecz)f-5#kSx`^>thcL+|_-6@z zx?ghQ$Ts`J1QWdK-SY*)KW%`-h)XBq5bdvqIDb{-$60KW#7B3Af0%BpGv5DH%}&+a zT}ETCdMl+6&rJBR0w$ij(U^m1zvX|3*`|h5-+C&~c;GWJ;Jvnj-=|0DJ-OeM@&)22 z7yL0p>W{}Fafc>$?a*zWiFjvxjKUP_%KbTZ5DnLVHlv@*xJcAQV|++K>N@P&rh(cj zZ<`qxFr5LfA4`%KglVI@x!@;(OP}dai5H2kp!aSK1YvrJ57a-&;uSwL{ON!93*`dq z{Jojhc=e?AqnZ1(sE=n_G)Ct+u6)3$3U^uyR3RE|{MYFu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Q zJkdof#82vd@T@5Sudi>ztB&n>(Gf)Jf+2X`9*Sq}VMI8dU5~)i>yhZW5r0i%26dh8 zIEbGm;L0wK-bop-w{VTRjxIgc4Clggttky^Zj{;{NKW2{Q-4;r9WV0gIFrBi zW?fd$&2yQ-H_s*npD9=ud?IUk@aZhu;JR$<;PW|4L+A^YkgK9)Ayl~+4xUNbY9M^oN;u%efyln{Hf37!1sQc2u><`;o}wxPb>HVqlc kE-U_Abp5}M|0@psFKDsNCUz3L<^TWy07*qoM6N<$g4mj4^#A|> diff --git a/code/nel/tools/3d/object_viewer_qt/src/main_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/main_window.cpp index d2db507a3..a283eea3a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/main_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/main_window.cpp @@ -398,7 +398,7 @@ void CMainWindow::createMenus() _toolsMenu->addAction(_SunColorDialog->toggleViewAction()); - //_toolsMenu->addAction(_TuneMRMDialog->toggleViewAction()); + _toolsMenu->addAction(_TuneMRMDialog->toggleViewAction()); _TuneMRMDialog->toggleViewAction()->setIcon(QIcon(":/images/ico_mrm_mesh.png")); connect(_ParticleControlDialog->toggleViewAction(), SIGNAL(triggered(bool)), @@ -442,7 +442,7 @@ void CMainWindow::createToolBars() _toolsBar->addAction(_VegetableDialog->toggleViewAction()); _toolsBar->addAction(_GlobalWindDialog->toggleViewAction()); _toolsBar->addAction(_SkeletonScaleDialog->toggleViewAction()); -// _toolsBar->addAction(_TuneMRMDialog->toggleViewAction()); + _toolsBar->addAction(_TuneMRMDialog->toggleViewAction()); } void CMainWindow::createStatusBar() diff --git a/code/nel/tools/3d/object_viewer_qt/src/object_viewer.cpp b/code/nel/tools/3d/object_viewer_qt/src/object_viewer.cpp index 37df70475..ac34152fa 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/object_viewer.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/object_viewer.cpp @@ -89,6 +89,11 @@ void CObjectViewer::init(nlWindow wnd, uint16 w, uint16 h) // initialize the window with config file values _Driver->setDisplay(wnd, NL3D::UDriver::CMode(w, h, 32)); + + // Create a scene + _Scene = _Driver->createScene(false); + _Scene->setPolygonBalancingMode(NL3D::UScene::PolygonBalancingClamp); + _Driver->enableUsedTextureMemorySum(); _Light = ULight::createLight(); @@ -106,9 +111,6 @@ void CObjectViewer::init(nlWindow wnd, uint16 w, uint16 h) _Driver->setLight(0, *_Light); _Driver->enableLight(0); - // Create a scene - _Scene = _Driver->createScene(false); - _PlayListManager = _Scene->createPlayListManager(); _Scene->enableLightingSystem(true); diff --git a/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.cpp b/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.cpp index 81af1eae3..493cfb577 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.cpp @@ -20,17 +20,46 @@ #include "stdpch.h" #include "tune_mrm_dialog.h" +// NeL includes +#include + +// Project includes +#include "modules.h" + +const int sliderStepSize = 5000; + namespace NLQT { CTuneMRMDialog::CTuneMRMDialog(QWidget *parent) : QDockWidget(parent) { - ui.setupUi(this); + _ui.setupUi(this); + + connect(_ui.maxValueSlider, SIGNAL(valueChanged(int)), this, SLOT(setMaxValue(int))); + connect(_ui.currentValueSlider, SIGNAL(valueChanged(int)), this, SLOT(setCurrentValue(int))); + + _ui.maxValueSlider->setValue(_ui.maxValueSlider->maximum()); } CTuneMRMDialog::~CTuneMRMDialog() { } +void CTuneMRMDialog::setMaxValue(int value) +{ + int actualMaxValue = value * sliderStepSize; + int actualValue = float(actualMaxValue) * _ui.currentValueSlider->value() / _ui.currentValueSlider->maximum(); + + _ui.currentValueSlider->setMaximum(actualMaxValue); + _ui.currentValueSlider->setValue(actualValue); + _ui.maxValueSpinBox->setValue(actualMaxValue); +} + +void CTuneMRMDialog::setCurrentValue(int value) +{ + Modules::objView().getScene()->setGroupLoadMaxPolygon("Skin", value); + _ui.currentValueSpinBox->setValue(value); +} + } /* namespace NLQT */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.h b/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.h index 74b3c9bae..c0e00d9f4 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.h +++ b/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_dialog.h @@ -40,10 +40,12 @@ public: ~CTuneMRMDialog(); private Q_SLOTS: + void setMaxValue(int value); + void setCurrentValue(int value); private: - Ui::CTuneMRMDialog ui; + Ui::CTuneMRMDialog _ui; }; /* class CTuneMRMDialog */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_form.ui b/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_form.ui index ba6bd4d5e..4f5b22c84 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_form.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/tune_mrm_form.ui @@ -7,13 +7,13 @@ 0 0 576 - 87 + 92 476 - 87 + 92 @@ -47,7 +47,7 @@ - + true @@ -87,7 +87,7 @@ - + true @@ -105,29 +105,32 @@ - + - 100000 + 20 - 5000 + 1 - 10000 + 5 - 100000 + 20 Qt::Horizontal + + QSlider::TicksAbove + - 5000 + 1 - + 100000 @@ -143,22 +146,5 @@ - - - horizontalSlider - valueChanged(int) - spinBox - setValue(int) - - - 214 - 67 - - - 232 - 47 - - - - +