-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeode_object.py
More file actions
78 lines (56 loc) · 1.82 KB
/
Copy pathgeode_object.py
File metadata and controls
78 lines (56 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Standard library imports
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import Any
# Third party imports
import opengeode as og
# Local application imports
from .types import GeodeObjectType, ViewerType
class GeodeObject(ABC):
identifier: og.Identifier
def __init__(self, identifier: og.Identifier | None = None) -> None:
self.identifier = identifier if identifier is not None else og.Identifier()
@classmethod
@abstractmethod
def geode_object_type(cls) -> GeodeObjectType: ...
@classmethod
@abstractmethod
def viewer_type(cls) -> ViewerType: ...
@classmethod
@abstractmethod
def is_3D(cls) -> bool: ...
@classmethod
@abstractmethod
def is_viewable(cls) -> bool: ...
@abstractmethod
def builder(self) -> Any: ...
@classmethod
@abstractmethod
def is_loadable(cls, filename: str) -> og.Percentage: ...
@classmethod
@abstractmethod
def load(cls, filename: str) -> GeodeObject: ...
@classmethod
@abstractmethod
def additional_files(cls, filename: str) -> og.AdditionalFiles: ...
@abstractmethod
def native_extension(cls) -> str: ...
@classmethod
@abstractmethod
def input_extensions(cls) -> list[str]: ...
@classmethod
@abstractmethod
def object_priority(cls, filename: str) -> int: ...
@classmethod
@abstractmethod
def output_extensions(cls) -> list[str]: ...
@abstractmethod
def is_saveable(self, filename: str) -> bool: ...
@abstractmethod
def save(self, filename: str) -> list[str]: ...
@abstractmethod
def save_viewable(self, filename_without_extension: str) -> str: ...
@abstractmethod
def save_light_viewable(self, filename_without_extension: str) -> str: ...
@abstractmethod
def inspect(self) -> Any: ...