|
|
@ -84,6 +84,19 @@ namespace MaterialEditor
|
|
|
|
connect( downButton, SIGNAL( clicked( bool ) ), this, SLOT( onDownClicked() ) );
|
|
|
|
connect( downButton, SIGNAL( clicked( bool ) ), this, SLOT( onDownClicked() ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool RenderPassesWidget::passExists( const QString &label )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int c = listWidget->count();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for( int i = 0; i < c; i++ )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if( label == listWidget->item( i )->text() )
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void RenderPassesWidget::onOKClicked()
|
|
|
|
void RenderPassesWidget::onOKClicked()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
close();
|
|
|
|
close();
|
|
|
@ -101,17 +114,7 @@ namespace MaterialEditor
|
|
|
|
if( label.isEmpty() )
|
|
|
|
if( label.isEmpty() )
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
int i = 0;
|
|
|
|
if( passExists( label ) )
|
|
|
|
while( i < listWidget->count() )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
QListWidgetItem *item = listWidget->item( i );
|
|
|
|
|
|
|
|
QString text = item->text();
|
|
|
|
|
|
|
|
if( text == label )
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
i++;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( i < listWidget->count() )
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QMessageBox::warning(
|
|
|
|
QMessageBox::warning(
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
@ -168,6 +171,19 @@ namespace MaterialEditor
|
|
|
|
if( to.isEmpty() )
|
|
|
|
if( to.isEmpty() )
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( from == to )
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( passExists( to ) )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
QMessageBox::warning(
|
|
|
|
|
|
|
|
NULL,
|
|
|
|
|
|
|
|
tr( "Pass label" ),
|
|
|
|
|
|
|
|
tr( "Pass label already exists!" )
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
item->setText( to );
|
|
|
|
item->setText( to );
|
|
|
|
|
|
|
|
|
|
|
|
CNelMaterialProxy material = nl3dIface->getMaterial();
|
|
|
|
CNelMaterialProxy material = nl3dIface->getMaterial();
|
|
|
|