@ -61,17 +61,15 @@ public class OgreSceneDataObject extends SpatialAssetDataObject {
return null ;
return null ;
}
}
String name = getPrimaryFile ( ) . getName ( ) ;
String name = getPrimaryFile ( ) . getName ( ) ;
FileObject sourceMatFile = getPrimaryFile ( ) . getParent ( ) . getFileObject ( name , "material" ) ;
String matName = null ; //((OgreSceneKey)getAssetKey()).getMaterialName();
if ( sourceMatFile ! = null & & sourceMatFile . isValid ( ) ) {
if ( matName = = null ) {
try {
matName = name ;
sourceMatFile . copy ( sourceMatFile . getParent ( ) , "+" + sourceMatFile . getName ( ) , sourceMatFile . getExt ( ) ) ;
}
} catch ( IOException ex ) {
FileObject sourceMatFile = getPrimaryFile ( ) . getParent ( ) . getFileObject ( matName , "material" ) ;
Exceptions . printStackTrace ( ex ) ;
if ( sourceMatFile = = null | | ! sourceMatFile . isValid ( ) ) {
}
} else {
Confirmation msg = new NotifyDescriptor . Confirmation (
Confirmation msg = new NotifyDescriptor . Confirmation (
"No material file found for " + getPrimaryFile ( ) . getNameExt ( ) + "\n"
"No material file found for " + getPrimaryFile ( ) . getNameExt ( ) + "\n"
+ "A file named " + n ame + ".material should be in the same folder.\n"
+ "A file named " + matN ame + ".material should be in the same folder.\n"
+ "Press OK to import mesh only." ,
+ "Press OK to import mesh only." ,
NotifyDescriptor . OK_CANCEL_OPTION ,
NotifyDescriptor . OK_CANCEL_OPTION ,
NotifyDescriptor . WARNING_MESSAGE ) ;
NotifyDescriptor . WARNING_MESSAGE ) ;