mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 08:48:13 +00:00
* Remove legacy client * Misc cleanup * Add message box after submission success / fail * Use a new is_localhost method to handle localhost not including '.local' * Code cleanup * Fix issue where engine browser would think we're downloading forever * Add message box after submission success / fail * Use a new is_localhost method to handle localhost not including '.local' * Code cleanup * Fix issue where engine browser would think we're downloading forever * Add pubsub messages to serverproxy_manager.py * Add resolution, fps and renderer versions to add_job.py * Add cameras to add_job.py * Add message box after submission success / fail * Use a new is_localhost method to handle localhost not including '.local' * Code cleanup * Fix issue where engine browser would think we're downloading forever * Add message box after submission success / fail * Code cleanup * Add cameras to add_job.py * Add dynamic engine options and output format * Move UI work out of BG threads and add engine presubmission tasks * Submit dynamic args when creating a new job * Hide groups and show messagebox after submission * Choose file when pressing New Job in main window now
31 lines
1.0 KiB
Python
31 lines
1.0 KiB
Python
import json
|
|
import bpy
|
|
|
|
# Get all cameras
|
|
scene = bpy.data.scenes[0]
|
|
cameras = []
|
|
for cam_obj in bpy.data.cameras:
|
|
user_map = bpy.data.user_map(subset={cam_obj}, value_types={'OBJECT'})
|
|
for data_obj in user_map[cam_obj]:
|
|
cam = {'name': data_obj.name,
|
|
'cam_name': cam_obj.name,
|
|
'cam_name_full': cam_obj.name_full,
|
|
'lens': cam_obj.lens,
|
|
'lens_unit': cam_obj.lens_unit,
|
|
'sensor_height': cam_obj.sensor_height,
|
|
'sensor_width': cam_obj.sensor_width,
|
|
'is_active': scene.camera.name_full == cam_obj.name_full}
|
|
cameras.append(cam)
|
|
|
|
data = {'cameras': cameras,
|
|
'engine': scene.render.engine,
|
|
'frame_start': scene.frame_start,
|
|
'frame_end': scene.frame_end,
|
|
'resolution_x': scene.render.resolution_x,
|
|
'resolution_y': scene.render.resolution_y,
|
|
'resolution_percentage': scene.render.resolution_percentage,
|
|
'fps': scene.render.fps}
|
|
|
|
data_string = json.dumps(data)
|
|
print("SCENE_DATA:" + data_string)
|