From 3bd52ba4f1e899d285ac1692ef501370cd99de53 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Sat, 15 Aug 2015 13:12:58 -0400 Subject: [PATCH] sdk blender plugin: fix settings path for Mac OS X --- .../src/com/jme3/gde/blender/BlenderTool.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderTool.java b/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderTool.java index 2ccb080e4..1d55a6b35 100644 --- a/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderTool.java +++ b/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderTool.java @@ -164,6 +164,14 @@ public class BlenderTool { return "../blender"; } } + + 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(); @@ -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"));