JacquesLucke / blender_vscode

Visual Studio Code extension for Blender development.
MIT License
540 stars 70 forks source link

Change blender.scripts.directories to resource too #139

Open dimateos opened 1 year ago

dimateos commented 1 year ago

As stated in the changelog:

  • Changed scope of blender.executables to resource. The value is firstly looked up in workspace settings before user settings.

I would also make the same change for blender.scripts.directories as it feels like a similar setting. For me is always better to at least look first into the workspace settings.

One more thing I would like is to be able to set scripts.directories locally using ${workspaceFolder}. It seems like this is the case for blender.executables although it states otherwise.

By the way the properties of the object for path and name are copy pasted from blender.executables to scripts.directories resulting in a wrong description]:

          "blender.scripts.directories": {
            "type": "array",
            "scope": "application",
            "description": "Directories to store scripts in.",
            "items": {
              "type": "object",
              "title": "Single Script Directory",
              "properties": {
                "path": {
                  "type": "string",
                  // same desc
                  "description": "Absolute file path to a Blender executable."
                },
                "name": {
                  "type": "string",
                  // same desc
                  "description": "Custom name for this Blender version."
                }
              }
            }
          },

Arguably blender.allowModifyExternalPython could also change to resource scope just for the sake of respecting the workspace settings over global ones, but in this case I guess it could make sense for it to be global. Maybe e.g. the case of a shared workspace and preferring to avoid your python to get packages installed, although a warning would suffice.

Anyway this is a minor detail, but simple to add. Thanks for the extension!