2025-12-01

This commit is contained in:
2026-03-17 14:58:51 -06:00
parent 183e865f8b
commit 4b82b57113
6846 changed files with 954887 additions and 162606 deletions
+42
View File
@@ -0,0 +1,42 @@
# SPDX-FileCopyrightText: 2021 Blender Studio Tools Authors
#
# SPDX-License-Identifier: GPL-3.0-or-later
import bpy
from .. import bkglobals
from ..types import Cache, Sequence, Project, Shot
from ..logger import LoggerFactory
logger = LoggerFactory.getLogger()
def shot_meta(strip: bpy.types.Strip, shot: Shot, clear_cache: bool = True) -> None:
if clear_cache:
# Clear cache before pulling.
Cache.clear_all()
# Update sequence props.
seq = Sequence.by_id(shot.parent_id)
strip.kitsu.sequence_id = seq.id
strip.kitsu.sequence_name = seq.name
# Update shot props.
strip.kitsu.shot_id = shot.id
strip.kitsu.shot_name = shot.name
strip.kitsu.shot_description = shot.description if shot.description else ""
# Update project props.
project = Project.by_id(shot.project_id)
strip.kitsu.project_id = project.id
strip.kitsu.project_name = project.name
# Update meta props.
strip.kitsu.initialized = True
strip.kitsu.linked = True
# Update strip name.
strip.name = shot.name
# Log.
logger.info("Pulled meta from shot: %s to strip: %s", shot.name, strip.name)