// Texture
if( myMainTexture.isNull() || myAlphaChannelTexture.isNull() )
{
- //return 1;
myMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_texture.bmp";
myAlphaChannelTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_alpha.bmp";
}
QString mainTextureVTI = mainTextureImage.section( '.', 0, -2 ) + ".vti";
QString command1 = QString( "VISU_img2vti " ) + mainTextureFormat + " " + mainTextureImage + " " + mainTextureVTI;
- cout << command1.latin1() << endl;
- system( command1.latin1() );
-
- QString alphaTextureImage = myAlphaChannelTexture;
- QString alphaTextureFormat = alphaTextureImage.section( '.', -1 );
- QString alphaTextureVTI = alphaTextureImage.section( '.', 0, -2 ) + ".vti";
-
- QString command2 = QString( "VISU_img2vti " ) + alphaTextureFormat + " " + alphaTextureImage + " " + alphaTextureVTI;
- cout << command2.latin1() << endl;
- system( command2.latin1() );
-
- cout << mainTextureVTI.latin1() << endl;
- cout << alphaTextureVTI.latin1() << endl;
-
- thePrs->SetMainTexture( mainTextureImage );
- thePrs->SetAlphaChannelTexture( alphaTextureImage );
- thePrs->MakeTexture( mainTextureVTI, alphaTextureVTI );
+ if(system(command1.latin1()) == 0){
+ QString alphaTextureImage = myAlphaChannelTexture;
+ QString alphaTextureFormat = alphaTextureImage.section( '.', -1 );
+ QString alphaTextureVTI = alphaTextureImage.section( '.', 0, -2 ) + ".vti";
+
+ QString command2 = QString( "VISU_img2vti " ) + alphaTextureFormat + " " + alphaTextureImage + " " + alphaTextureVTI;
+ if(system(command2.latin1()) == 0){
+ thePrs->SetMainTexture( mainTextureImage );
+ thePrs->SetAlphaChannelTexture( alphaTextureImage );
+ thePrs->MakeTexture( mainTextureVTI, alphaTextureVTI );
+ return true;
+ }
+ }
- return 1;
+ return false;
}
void VisuGUI_GaussPointsDlg::accept()