|
|
@ -21,6 +21,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
namespace MaterialEditor
|
|
|
|
namespace MaterialEditor
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
const char *stockShaders[ 10 ] =
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"Normal",
|
|
|
|
|
|
|
|
"Bump",
|
|
|
|
|
|
|
|
"UserColor",
|
|
|
|
|
|
|
|
"LightMap",
|
|
|
|
|
|
|
|
"Specular",
|
|
|
|
|
|
|
|
"Caustics",
|
|
|
|
|
|
|
|
"PerPixelLighting",
|
|
|
|
|
|
|
|
"PerPixelLightingNoSpec",
|
|
|
|
|
|
|
|
"Cloud",
|
|
|
|
|
|
|
|
"Water"
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
MaterialWidget::MaterialWidget( QWidget *parent ) :
|
|
|
|
MaterialWidget::MaterialWidget( QWidget *parent ) :
|
|
|
|
QWidget( parent )
|
|
|
|
QWidget( parent )
|
|
|
@ -29,6 +42,7 @@ namespace MaterialEditor
|
|
|
|
shaderEditorWidget = new ShaderEditorWidget();
|
|
|
|
shaderEditorWidget = new ShaderEditorWidget();
|
|
|
|
matPropWidget = new MatPropWidget();
|
|
|
|
matPropWidget = new MatPropWidget();
|
|
|
|
setNel3DIface( NULL );
|
|
|
|
setNel3DIface( NULL );
|
|
|
|
|
|
|
|
addStockShaders();
|
|
|
|
setupConnections();
|
|
|
|
setupConnections();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -179,6 +193,13 @@ namespace MaterialEditor
|
|
|
|
pass = passCB->currentText();
|
|
|
|
pass = passCB->currentText();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MaterialWidget::addStockShaders()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for( int i = 0; i < 10; i++ )
|
|
|
|
|
|
|
|
shaderCB->addItem( QString( stockShaders[ i ] ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MaterialWidget::setupConnections()
|
|
|
|
void MaterialWidget::setupConnections()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
connect( passButton, SIGNAL( clicked( bool ) ), this, SLOT( onPassEditClicked() ) );
|
|
|
|
connect( passButton, SIGNAL( clicked( bool ) ), this, SLOT( onPassEditClicked() ) );
|
|
|
|