Giter Club home page Giter Club logo

Comments (2)

patwork avatar patwork commented on August 16, 2024 1

Did you try to search for another path? Why there's a letter "C" or "O" after MacOS in your path? It seems like it should be "B"

"/Applications/Blender.app/Contents/MacOS/Blender"

bool EditorFileSystemImportFormatSupportQueryBlend::_autodetect_path() {
// Autodetect
auto_detected_path = "";
#if defined(MACOS_ENABLED)
Vector<String> find_paths = {
"/opt/homebrew/bin/blender",
"/opt/local/bin/blender",
"/usr/local/bin/blender",
"/usr/local/opt/blender",
"/Applications/Blender.app/Contents/MacOS/Blender",
};
{
List<String> mdfind_args;
mdfind_args.push_back("kMDItemCFBundleIdentifier=org.blenderfoundation.blender");
String output;
Error err = OS::get_singleton()->execute("mdfind", mdfind_args, &output);
if (err == OK) {
for (const String &find_path : output.split("\n")) {
find_paths.push_back(find_path.path_join("Contents/MacOS/Blender"));
}
}
}
#elif defined(WINDOWS_ENABLED)
Vector<String> find_paths = {
"C:\\Program Files\\Blender Foundation\\blender.exe",
"C:\\Program Files (x86)\\Blender Foundation\\blender.exe",
};
{
char blender_opener_path[MAX_PATH];
DWORD path_len = MAX_PATH;
HRESULT res = AssocQueryString(0, ASSOCSTR_EXECUTABLE, ".blend", "open", blender_opener_path, &path_len);
if (res == S_OK) {
find_paths.push_back(String(blender_opener_path).get_base_dir().path_join("blender.exe"));
}
}
#elif defined(UNIX_ENABLED)
Vector<String> find_paths = {
"/usr/bin/blender",
"/usr/local/bin/blender",
"/opt/blender/bin/blender",
};
#endif
for (const String &find_path : find_paths) {
if (_test_blender_path(find_path)) {
auto_detected_path = find_path;
return true;
}
}
return false;
}

from godot.

frklan avatar frklan commented on August 16, 2024 1

Yeah, I accidentally entered the path multiple times 🤯. Sorry about the mistake. Thank's for the help @patwork.

from godot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.