JacquesLucke / blender_vscode

Visual Studio Code extension for Blender development.
MIT License
570 stars 75 forks source link

Network drives do not get mapped when launching Blender through VS Code #107

Closed justus-hildebrand closed 3 years ago

justus-hildebrand commented 3 years ago

Hey there! I just stumbled across this odd behavior on my Windows 10 machine, not sure it appears on other OSes:

Whenever I launch Blender through VS Code (Ctrl+Shift+P -> Blender: Build and Start), my system's network drives do not appear in Blender's file browser. My Blender test scenes are placed on a network drive, which can make this bug pretty annoying over time, since I have to restart Blender through Windows whenever I make a change to my add-on. When starting Blender regularly by launching the installed .exe, the drives show up just fine, which makes me think this might be an issue with how the VS code plugin launches the Blender instance. Do you maybe have an explanation for this behavior? I'm happy to help with further info/testing if required.

justus-hildebrand commented 3 years ago

Turns out that VS code was still running as administrator after I launched it to install the python dependencies of this plugin, which means the Blender instances were launched by the Administrator profile as well. Since "Administrator" is a different user, the network drives mapped by my usual user were not accessible, which was causing my problem. If anyone encounters this issue, make sure you're running your programs with the correct access rights/under the correct user.

TL;DR fix: Don't run VS Code as administrator.