Blender Kitsu: Refactor Shot Builder #183
@ -31,3 +31,11 @@ def get_file_dir(seq: Sequence, shot: Shot, task_type: TaskType) -> Path:
|
||||
if not shot_dir.exists():
|
||||
shot_dir.mkdir(parents=True)
|
||||
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
|
||||
|
||||
|
@ -134,6 +134,14 @@ class KITSU_OT_build_new_shot(bpy.types.Operator):
|
||||
dir = get_file_dir(seq, shot, task_type)
|
||||
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(f"Seq Name: '{seq.name}' Seq ID: '{self.seq_id}'")
|
||||
print(f"Shot Name: '{shot.name}' Shot ID: '{self.shot_id}'")
|
||||
|
Loading…
Reference in New Issue
Block a user