Blender Kitsu: Refactor Shot Builder #183

Merged
Nick Alberelli merged 55 commits from TinyNick/blender-studio-pipeline:feature/shot-builder-2 into main 2023-12-21 23:58:21 +01:00
2 changed files with 12 additions and 0 deletions
Showing only changes of commit 83a6045cf2 - Show all commits

View File

@ -70,6 +70,16 @@ def set_resolution_and_fps(project: Project, scene: bpy.types.Scene):
scene.render.resolution_percentage = 100
def set_frame_range(shot: Shot, scene: bpy.types.Scene):
start_3d = (
int(shot.data.get("3d_start"))
if shot.data.get("3d_start")
else 101 # TODO Set in Constants
)
scene.frame_start = start_3d
scene.frame_end = start_3d + shot.nb_frames - 1
def link_and_override_collection(
file_path: str, collection_name: str, scene: bpy.types.Scene
) -> bpy.types.Collection:

View File

@ -9,6 +9,7 @@ from .core import (
task_type_anim_output_collection,
set_shot_scene,
set_resolution_and_fps,
set_frame_range,
)
active_project = None
@ -136,6 +137,7 @@ class KITSU_OT_build_new_shot(bpy.types.Operator):
shot_task_name = shot.get_shot_task_name(task_type)
scene = set_shot_scene(shot_task_name)
set_resolution_and_fps(active_project, scene)
set_frame_range(shot, scene)
# File Path
# TODO Only run if saving file