From 46764a3b1ee507b26d193a51d9505979696f4da0 Mon Sep 17 00:00:00 2001 From: dnk-88 Date: Thu, 27 Jan 2011 15:20:49 +0200 Subject: [PATCH] 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+|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El)OEO@P3}~Zhx24R*{cqNwuPaF=#U+s@p-(Rb zqAgPst;wpiZux#cp9N$9Wy1Ax8#16%QEmf7qV++R77O6&po_|~R8&H^n`?Z|+!U&%jePIAgdPjfRhXlU`+S}(*p7gPB8 z+QHA?30wVFA($SK!CM`%)z1-ro2}taUBtq4E;n#8Oikv)(rosa2DB8J(z4Ye3_M{| zSQ!)8vz$H3q>nUioA1}daAruvvVW2@g3k`lD5`s-Y8B*;K0Co}wW)!LF%v%*8rmdE zTa92P58KBb;|x;e#tNSIgQl@D8DKhR>@HAjjEjkCxJ;9o8)a5BD|ANJF<0C_>468Q 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 - - - - +