Blender Kitsu: Fix Frame Range Warning #126

Closed
Nick Alberelli wants to merge 6 commits from (deleted):fix/frame-range-warning into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit bf242aca7e - Show all commits

View File

@ -24,7 +24,7 @@ from typing import Any, Union, List, Dict, Optional
import bpy
from bpy.app.handlers import persistent
from blender_kitsu import propsdata, bkglobals
from blender_kitsu import propsdata, bkglobals, cache
from blender_kitsu.logger import LoggerFactory
logger = LoggerFactory.getLogger()
@ -232,11 +232,23 @@ class KITSU_property_group_scene(bpy.types.PropertyGroup):
class KITSU_property_group_error(bpy.types.PropertyGroup):
""""""
def check_kitsu_context(self):
active_shot = cache.shot_active_get()
return bool(active_shot)
frame_range: bpy.props.BoolProperty( # type: ignore
name="Frame Range Error",
description="Indicates if the scene frame range does not match the one in Kitsu",
default=False,
)
kitsu_context: bpy.props.BoolProperty( # type: ignore
name="Kitsu Context not Found",
description="Indicates if the file's context has not been loaded by Kitsu Server",
default=False,
get=check_kitsu_context,
options=set(),
)
class KITSU_property_group_window_manager(bpy.types.PropertyGroup):