I don't need to add that check duh

This commit is contained in:
Yusarina
2025-03-27 20:42:43 +00:00
parent 357aa1b6d9
commit d7fee2c961
+3 -9
View File
@@ -138,15 +138,9 @@ def iter_deps_from_parent_id(cls: Type, my_classes_by_idname: Dict[str, Type]) -
def get_dependency_from_annotation(value: Any) -> Optional[Type]: def get_dependency_from_annotation(value: Any) -> Optional[Type]:
"""Get dependency type from a type annotation""" """Get dependency type from a type annotation"""
blender_version = bpy.app.version if isinstance(value, tuple) and len(value) == 2:
if value[0] in (bpy.props.PointerProperty, bpy.props.CollectionProperty):
if blender_version >= (2, 93): return value[1]["type"]
if isinstance(value, bpy.props._PropertyDeferred):
return value.keywords.get("type")
else:
if isinstance(value, tuple) and len(value) == 2:
if value[0] in (bpy.props.PointerProperty, bpy.props.CollectionProperty):
return value[1]["type"]
return None return None
def iter_classes_to_register(modules: List[Any]) -> Generator[Type, None, None]: def iter_classes_to_register(modules: List[Any]) -> Generator[Type, None, None]: