Comments (9)
Yeah, the code back then was much uglier than now because I just started learning typescript. Should be better now. :)
Thanks for the provided fix. Is it not possible to select the actual binary when you are asked to select the executable?
Will blender always be packaged like that or is this path different for different people?
Can command line arguments be passed to "open" that are forwarded to the application? I'm not sure how well that works in the task system of vs code. Would be nice if you could try that. I guess if it works, using "open" is the preferable solution because it makes less assumptions about the system.
from blender_vscode.
Or we could check if the selected file ends with .app
, and if yes, /Contents/MacOS/blender
can be added to the path.
Looks like this path is always the same: https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1
from blender_vscode.
in Finder you can right click and do "Show package contents", but that is not available in the open-dialog from vscode atleast.
AFAIK blender is always packaged in a .app when released to OSX, and the path is always blender.app/Contents/MacOS/blender
not sure how it is launched when compiling/debugging the blender sourcecode itself though, I havent dived that far into blender :)
since osx 10.6 you can pass arguments to the 'open' command using --args but I don´t think that is used very widely.
I recently helped solve a bug with machin3tools (for 2.8) regarding osx compatibility (he got the path wrong when reading keymaps inside his plugin) he used this code to solve the issue:
keymappath = os.path.join(bpy.utils.preset_paths(subdir='keyconfig')[0],'blender_27x.py')
inside blender that code returns the blender.app/Content/Resources/.... folder.
yeah your comment from 44secs ago seems like a good solution
from blender_vscode.
https://wiki.blender.org/wiki/Building_Blender/Mac
The last screenshot there indicates that Blender is packaged in the same way when Blender is build from source code.
from blender_vscode.
Can you check if the provided fix works, please?
from blender_vscode.
Works like a charm!
btw, do you really need the ms-vscode.cpptools as an extension dependency?
Its only used for some use-cases which you barely "support" right now right?
from blender_vscode.
Thanks.
No, I don't really need it right now... Added it before I was sure which features I will support for now.
Does it cause trouble for you?
from blender_vscode.
nah, well, since its a dependency you have to install it in order to activate the blender-vscode plugin
Which seems unnecessary if you aren´t doing any cpp development but I guess it´s fine :)
from blender_vscode.
True, I'll probably add this dependency back soon anyway, so not sure if I should remove it now.
Will decide before I publish the next version.
from blender_vscode.
Related Issues (20)
- Does this extension run Blender 3.3 ? HOT 6
- Change blender.scripts.directories to resource too
- Hitting a "Run Script" Breakpoint Opens New Read-Only File HOT 3
- ValueError: Compressor 'zlib1' already registered. HOT 1
- Alpha and Beta versions do not work HOT 2
- Extension not working with blender 2.79
- Cannot set breakpoints when debugging scripts HOT 1
- Addons are not found if their folders are not on the system drive.
- Not working in Blender 3.6 HOT 5
- Blender 3.6.4 crashes pushing undo step from script
- Blender 3.6 and blender development HOT 2
- Blender 4.0 and Run Script Error from VSCode HOT 5
- Changing or deleting scene in blender when running through this VS code addon seems broken? HOT 3
- Does this work for Blender 4.0? HOT 8
- License of adding developed with the extension HOT 1
- Using "Blender Start" terminated with exit code: 3221225477 after reading userpref.blend that was altered by this extension HOT 2
- Publishing to the public vsx registry
- Reloading imported modules in a script HOT 3
- Question: How open existing .blend file on startup HOT 4
- Add option to start blender using custom command (not only custom binary) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blender_vscode.