Blender Kitsu: Fix Frame Range Warning #126
@ -24,7 +24,7 @@ from typing import Any, Union, List, Dict, Optional
|
|||||||
import bpy
|
import bpy
|
||||||
from bpy.app.handlers import persistent
|
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
|
from blender_kitsu.logger import LoggerFactory
|
||||||
|
|
||||||
logger = LoggerFactory.getLogger()
|
logger = LoggerFactory.getLogger()
|
||||||
@ -232,11 +232,23 @@ class KITSU_property_group_scene(bpy.types.PropertyGroup):
|
|||||||
class KITSU_property_group_error(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
|
frame_range: bpy.props.BoolProperty( # type: ignore
|
||||||
name="Frame Range Error",
|
name="Frame Range Error",
|
||||||
description="Indicates if the scene frame range does not match the one in Kitsu",
|
description="Indicates if the scene frame range does not match the one in Kitsu",
|
||||||
default=False,
|
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):
|
class KITSU_property_group_window_manager(bpy.types.PropertyGroup):
|
||||||
|
Loading…
Reference in New Issue
Block a user