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 16 additions and 0 deletions
Showing only changes of commit bf6c1a1352 - Show all commits

View File

@ -31,3 +31,11 @@ def get_file_dir(seq: Sequence, shot: Shot, task_type: TaskType) -> Path:
if not shot_dir.exists(): if not shot_dir.exists():
shot_dir.mkdir(parents=True) shot_dir.mkdir(parents=True)
return shot_dir return shot_dir
def set_render_engine(scene: bpy.types.Scene, engine='CYCLES'):
"""
By default we set Cycles as the renderer.
"""
scene.render.engine = engine

View File

@ -134,6 +134,14 @@ class KITSU_OT_build_new_shot(bpy.types.Operator):
dir = get_file_dir(seq, shot, task_type) dir = get_file_dir(seq, shot, task_type)
shot_file_path_str = dir.joinpath(shot_task_name).__str__() shot_file_path_str = dir.joinpath(shot_task_name).__str__()
# Set Render Settings
if (
task_type.get_short_name() == 'anim'
): # TODO get anim from a constant instead
set_render_engine(context.scene, 'BLENDER_WORKBENCH')
else:
set_render_engine(context.scene)
print("Create shot with the following details") # TODO Remove print("Create shot with the following details") # TODO Remove
print(f"Seq Name: '{seq.name}' Seq ID: '{self.seq_id}'") print(f"Seq Name: '{seq.name}' Seq ID: '{self.seq_id}'")
print(f"Shot Name: '{shot.name}' Shot ID: '{self.shot_id}'") print(f"Shot Name: '{shot.name}' Shot ID: '{self.shot_id}'")