diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/material_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/material_widget.cpp index 87fcfea96..eeb0cf4be 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/material_widget.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/material_widget.cpp @@ -21,6 +21,19 @@ namespace MaterialEditor { + const char *stockShaders[ 10 ] = + { + "Normal", + "Bump", + "UserColor", + "LightMap", + "Specular", + "Caustics", + "PerPixelLighting", + "PerPixelLightingNoSpec", + "Cloud", + "Water" + }; MaterialWidget::MaterialWidget( QWidget *parent ) : QWidget( parent ) @@ -29,6 +42,7 @@ namespace MaterialEditor shaderEditorWidget = new ShaderEditorWidget(); matPropWidget = new MatPropWidget(); setNel3DIface( NULL ); + addStockShaders(); setupConnections(); } @@ -179,6 +193,13 @@ namespace MaterialEditor pass = passCB->currentText(); } + void MaterialWidget::addStockShaders() + { + for( int i = 0; i < 10; i++ ) + shaderCB->addItem( QString( stockShaders[ i ] ) ); + + } + void MaterialWidget::setupConnections() { connect( passButton, SIGNAL( clicked( bool ) ), this, SLOT( onPassEditClicked() ) ); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/material_widget.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/material_widget.h index e8a9ba0d7..d733f95df 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/material_widget.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/material_widget.h @@ -57,6 +57,7 @@ namespace MaterialEditor void subMatChanged( int i ); private: + void addStockShaders(); void setupConnections(); ShaderEditorWidget *shaderEditorWidget; MatPropWidget *matPropWidget;