save startup blend for animation tab & whatnot
This commit is contained in:
2026-04-08 12:10:18 -06:00
parent 57a652524a
commit 692e200ffe
180 changed files with 12336 additions and 3431 deletions
@@ -46,11 +46,11 @@ bk_logger = logging.getLogger(__name__)
def handle_get_rating_task(task: client_tasks.Task):
"""Handle incomming get_rating task by saving the results into global_vars."""
"""Handle incoming get_rating task by saving the results into global_vars."""
if task.status == "created":
return
if task.status == "error":
return bk_logger.warning(f"{task.task_type} task failed: {task.message}")
return bk_logger.warning("%s task failed: %s", task.task_type, task.message)
asset_id = task.data["asset_id"]
ratings = task.result["results"]
@@ -64,23 +64,23 @@ def handle_get_rating_task(task: client_tasks.Task):
def handle_get_ratings_task(task: client_tasks.Task):
"""Handle incomming get_ratings task. This is a special task used only by validators which fetches the ratings
"""Handle incoming get_ratings task. This is a special task used only by validators which fetches the ratings
in big batch right after the search results come into the Client. This is used only to signal problems in the
Goroutine which fetches the ratings. The individual ratings are then sent as normal 'get_rating' tasks.
"""
if task.status == "error": # only reason this task type exists right now
return bk_logger.warning(f"{task.task_type} task failed: {task.message}")
return bk_logger.warning("%s task failed: %s", task.task_type, task.message)
def handle_get_bookmarks_task(task: client_tasks.Task):
"""Handle incomming get_bookmarks task by saving the results into global_vars.
"""Handle incoming get_bookmarks task by saving the results into global_vars.
This is different from standard ratings - the results come from elastic search API
instead of ratings API.
"""
if task.status == "created":
return
if task.status == "error":
bk_logger.warning(f"Could not load bookmarks: {task.message}")
bk_logger.warning("Could not load bookmarks: %s", task.message)
return
for asset in task.result["results"]:
@@ -134,7 +134,7 @@ def ensure_rating(asset_id: str):
if rating is None:
client_lib.get_rating(asset_id)
return
if not rating.quality_fetched or rating.working_hours_fetched:
if not rating.quality_fetched or not rating.working_hours_fetched:
client_lib.get_rating(asset_id)
@@ -419,7 +419,7 @@ class RatingProperties(PropertyGroup):
whs = "0"
self.rating_work_hours_ui = whs
except Exception as e:
bk_logger.warning(f"exception setting rating_work_hours_ui: {e}")
bk_logger.warning("exception setting rating_work_hours_ui: %s", e)
self.rating_work_hours = round(rating.working_hours, 2)
self.rating_work_hours_lock = False