Blender Kitsu: Refactor Shot Builder #183
@ -84,13 +84,18 @@ def set_resolution_and_fps(project: Project, scene: bpy.types.Scene):
|
||||
scene.render.resolution_percentage = 100
|
||||
|
||||
|
||||
def get_3d_start(shot: Shot):
|
||||
if shot.data and shot.data.get("3d_start"): # shot.data and
|
||||
return int(shot.data.get("3d_start"))
|
||||
else:
|
||||
return 101 # TODO Set in Constants
|
||||
|
||||
|
||||
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
|
||||
)
|
||||
start_3d = get_3d_start(shot)
|
||||
scene.frame_start = start_3d
|
||||
if not shot.nb_frames:
|
||||
raise Exception(f"{shot.name} has missing frame duration information")
|
||||
scene.frame_end = start_3d + shot.nb_frames - 1
|
||||
|
||||
|
||||
|
@ -2,6 +2,7 @@ import bpy
|
||||
from .. import prefs
|
||||
from pathlib import Path
|
||||
import re
|
||||
from .core import get_3d_start
|
||||
|
||||
|
||||
def editorial_export_get_latest(
|
||||
@ -40,7 +41,7 @@ def editorial_export_get_latest(
|
||||
|
||||
# Update shift frame range prop.
|
||||
frame_in = shot.data.get("frame_in")
|
||||
frame_3d_start = shot.data.get("3d_start")
|
||||
frame_3d_start = get_3d_start(shot)
|
||||
frame_3d_offset = frame_3d_start - addon_prefs.shot_builder_frame_offset
|
||||
edit_export_offset = addon_prefs.edit_export_frame_offset
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user