Added the stock shader names to the material editor, so it will now be able to select them when loading a shape.

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 11 years ago
parent 1d71a540ba
commit a9a1d17c4f

@ -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() ) );

@ -57,6 +57,7 @@ namespace MaterialEditor
void subMatChanged( int i );
private:
void addStockShaders();
void setupConnections();
ShaderEditorWidget *shaderEditorWidget;
MatPropWidget *matPropWidget;

Loading…
Cancel
Save