sdk blender plugin: fix settings path for Mac OS X

experimental
Kirill Vainer 9 years ago
parent e14c6467ff
commit 3bd52ba4f1
  1. 12
      sdk/jme3-blender/src/com/jme3/gde/blender/BlenderTool.java

@ -165,6 +165,14 @@ public class BlenderTool {
}
}
private static String getBlenderOsSettingsPath() {
if (Utilities.isMac()) {
return "../blender/blender.app/Contents/Resources";
} else {
return "../blender";
}
}
private static boolean checkBlenderFolders() {
String jmpDir = Places.getUserDirectory().getAbsolutePath();
FileObject fileObject = FileUtil.toFileObject(new File(jmpDir));
@ -251,9 +259,9 @@ public class BlenderTool {
}
private static File getBlenderSettingsFolder() {
File blender = InstalledFileLocator.getDefault().locate(getBlenderOsPath() + "/2.75", null, false);
File blender = InstalledFileLocator.getDefault().locate(getBlenderOsSettingsPath() + "/2.75", null, false);
if (blender == null) {
blender = InstalledFileLocator.getDefault().locate(getBlenderOsPath() + "/2.69", null, false);
blender = InstalledFileLocator.getDefault().locate(getBlenderOsSettingsPath() + "/2.69", null, false);
}
if (blender == null) {
DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message("Error finding Blender settings"));

Loading…
Cancel
Save