Blender Kitsu: Refactor Shot Builder #183
@ -7,6 +7,8 @@ from ..types import (
|
|||||||
TaskType,
|
TaskType,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from ..cache import Project
|
||||||
|
|
||||||
from blender_kitsu import prefs
|
from blender_kitsu import prefs
|
||||||
|
|
||||||
#################
|
#################
|
||||||
@ -64,6 +66,14 @@ def remove_other_scenes(keep_scene_name: str) -> None:
|
|||||||
bpy.data.scenes.remove(scene)
|
bpy.data.scenes.remove(scene)
|
||||||
|
|
||||||
|
|
||||||
|
def set_resolution_and_fps(project: Project, scene: bpy.types.Scene):
|
||||||
|
scene.render.fps = project.fps # set fps
|
||||||
|
resolution = project.resolution.split('x')
|
||||||
|
scene.render.resolution_y = resolution[0]
|
||||||
|
scene.render.resolution_x = resolution[1]
|
||||||
|
scene.render.resolution_percentage = 100
|
||||||
|
|
||||||
|
|
||||||
def link_and_override_collection(
|
def link_and_override_collection(
|
||||||
file_path: str, collection_name: str, scene: bpy.types.Scene
|
file_path: str, collection_name: str, scene: bpy.types.Scene
|
||||||
) -> bpy.types.Collection:
|
) -> bpy.types.Collection:
|
||||||
|
@ -8,6 +8,7 @@ from .core import (
|
|||||||
link_camera_rig,
|
link_camera_rig,
|
||||||
task_type_anim_output_collection,
|
task_type_anim_output_collection,
|
||||||
create_scene,
|
create_scene,
|
||||||
|
set_resolution_and_fps,
|
||||||
)
|
)
|
||||||
|
|
||||||
active_project = None
|
active_project = None
|
||||||
@ -133,7 +134,8 @@ class KITSU_OT_build_new_shot(bpy.types.Operator):
|
|||||||
|
|
||||||
# Set Up Scene + Naming
|
# Set Up Scene + Naming
|
||||||
shot_task_name = shot.get_shot_task_name(task_type)
|
shot_task_name = shot.get_shot_task_name(task_type)
|
||||||
create_scene(shot_task_name)
|
scene = create_scene(shot_task_name)
|
||||||
|
set_resolution_and_fps(active_project, scene)
|
||||||
|
|
||||||
# File Path
|
# File Path
|
||||||
# TODO Only run if saving file
|
# TODO Only run if saving file
|
||||||
|
Loading…
Reference in New Issue
Block a user