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