Skip to content

Instantly share code, notes, and snippets.

@theycallmeloki
Created March 31, 2022 12:56
Show Gist options
  • Save theycallmeloki/eac12d7ab09125ad6b201289ac874e4b to your computer and use it in GitHub Desktop.
Save theycallmeloki/eac12d7ab09125ad6b201289ac874e4b to your computer and use it in GitHub Desktop.
simple-blender-renderer - blend_render.py
import bpy
import sys
import json
job_id = sys.argv[10]
frame_id = sys.argv[11]
pfs_source_blends = sys.argv[12]
pfs_source_splitter = sys.argv[13]
f = json.loads(open(f'{pfs_source_splitter}/{job_id}/{frame_id}').read())
act_x = (bpy.data.scenes["Scene"].render.resolution_percentage / 100) * bpy.data.scenes[
"Scene"
].render.resolution_x
act_y = (bpy.data.scenes["Scene"].render.resolution_percentage / 100) * bpy.data.scenes[
"Scene"
].render.resolution_y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment