-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script for automated procgen with Blender
Signed-off-by: Andrej Orsula <[email protected]>
- Loading branch information
1 parent
afad43d
commit 521b0fb
Showing
3 changed files
with
1,317 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env -S blender --python-exit-code 1 --python | ||
""" | ||
Script for setting up Blender preferences. | ||
- Use Cycles with CUDA GPU | ||
- Enable Node Wrangler addon | ||
""" | ||
|
||
import bpy | ||
|
||
# Use Cycles with GPU | ||
bpy.context.preferences.addons["cycles"].preferences.compute_device_type = "CUDA" | ||
bpy.context.preferences.addons["cycles"].preferences.get_devices() | ||
for device in bpy.context.preferences.addons["cycles"].preferences.devices: | ||
device.use = device.type == "CUDA" | ||
bpy.context.scene.render.engine = "CYCLES" | ||
bpy.context.scene.cycles.device = "GPU" | ||
|
||
# Enable Node Wrangler | ||
bpy.ops.preferences.addon_enable(module="node_wrangler") | ||
|
||
# Save preferences | ||
bpy.ops.wm.save_userpref() |
Oops, something went wrong.