Skip to content

Commit

Permalink
Merge pull request #137 from mpreisler/custom_blender_args
Browse files Browse the repository at this point in the history
Support configuration of additional arguments on Blender start
  • Loading branch information
Griperis authored Oct 11, 2023
2 parents d83fcdd + 2f4fdbf commit 312671b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
### Added
- New `blender.environmentVariables` option. Can be used to define environment variables passed to
blender on `Blender Start`.
- New `blender.additionalArguments` option. Can be used to define additional arguments used when
starting blender on `Blender Start`.

### Changed
- Changed scope of `blender.executables` to `resource`. The value is firstly looked up in workspace
Expand Down
14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,20 @@
"BLENDER_USER_CONFIG": "C:/custom_user_config"
}
]
},
"blender.additionalArguments": {
"type": "array",
"scope": "resource",
"title": "Startup Additional Arguments",
"description": "Additional arguments used for Blender start-up. List of strings.",
"items": {
"type": "string"
},
"examples": [
[
"--factory-startup"
]
]
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/blender_executable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ async function testIfPathIsBlender(filepath: string) {
}

function getBlenderLaunchArgs() {
return ['--python', launchPath];
let config = getConfig();
return ['--python', launchPath].concat(<string[]>config.get("additionalArguments", []));
}

async function getBlenderLaunchEnv() {
Expand Down

0 comments on commit 312671b

Please sign in to comment.