(PApplet parent, String filename)
| 431 | |
| 432 | |
| 433 | static protected String getBasePath(PApplet parent, String filename) { |
| 434 | // Obtaining the path |
| 435 | File file = new File(parent.dataPath(filename)); |
| 436 | if (!file.exists()) { |
| 437 | file = parent.sketchFile(filename); |
| 438 | } |
| 439 | String absolutePath = file.getAbsolutePath(); |
| 440 | return absolutePath.substring(0, |
| 441 | absolutePath.lastIndexOf(File.separator)); |
| 442 | } |
| 443 | |
| 444 | |
| 445 | // Stores a material defined in an MTL file. |
no test coverage detected