f3d 3.4.1__cp314-cp314-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- f3d/__init__.py +107 -0
- f3d/bin/f3d.dll +0 -0
- f3d/bin/vcruntime140.dll +0 -0
- f3d/bin/zlib.dll +0 -0
- f3d/py.typed +0 -0
- f3d/pyf3d.cp314-win_amd64.pyd +0 -0
- f3d/pyf3d.pyi +1535 -0
- f3d/share/f3d/plugins/alembic.json +17 -0
- f3d/share/f3d/plugins/assimp.json +57 -0
- f3d/share/f3d/plugins/draco.json +25 -0
- f3d/share/f3d/plugins/hdf.json +33 -0
- f3d/share/f3d/plugins/native.json +185 -0
- f3d/share/f3d/plugins/occt.json +41 -0
- f3d-3.4.1.dist-info/METADATA +130 -0
- f3d-3.4.1.dist-info/RECORD +18 -0
- f3d-3.4.1.dist-info/WHEEL +5 -0
- f3d-3.4.1.dist-info/licenses/LICENSE.md +32 -0
- f3d-3.4.1.dist-info/licenses/THIRD_PARTY_LICENSES.md +268 -0
f3d/__init__.py
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Fast and minimalist 3D viewer
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
# This file is auto-generated by CMake, do not edit!
|
|
6
|
+
# Refer to python/__init__.py.in source file
|
|
7
|
+
|
|
8
|
+
import os
|
|
9
|
+
import re
|
|
10
|
+
import sys
|
|
11
|
+
import warnings
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
from typing import Any, Iterable, Mapping, Union
|
|
14
|
+
|
|
15
|
+
F3D_ABSOLUTE_DLLS: list[str] = [
|
|
16
|
+
#
|
|
17
|
+
]
|
|
18
|
+
F3D_RELATIVE_DLLS: list[str] = [
|
|
19
|
+
# generated at build
|
|
20
|
+
'bin',
|
|
21
|
+
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _add_dll_directories():
|
|
26
|
+
if sys.version_info >= (3, 8) and sys.platform == "win32":
|
|
27
|
+
for abs_path in F3D_ABSOLUTE_DLLS:
|
|
28
|
+
os.add_dll_directory(abs_path)
|
|
29
|
+
root = Path(__file__).parent
|
|
30
|
+
for rel_path in F3D_RELATIVE_DLLS:
|
|
31
|
+
os.add_dll_directory((root / rel_path).resolve())
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
_add_dll_directories()
|
|
35
|
+
|
|
36
|
+
from .pyf3d import *
|
|
37
|
+
|
|
38
|
+
# Automatically populate __all__ with symbols imported from pyf3d
|
|
39
|
+
__all__ = [name for name in dir(pyf3d) if not name.startswith("_")]
|
|
40
|
+
|
|
41
|
+
# Automatically load plugins for the user
|
|
42
|
+
Engine.autoload_plugins()
|
|
43
|
+
|
|
44
|
+
__version__ = "3.4.1"
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
################################################################################
|
|
48
|
+
# monkey patch `options.update`
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _f3d_options_update(
|
|
52
|
+
self, arg: Union[Mapping[str, Any], Iterable[tuple[str, Any]]]
|
|
53
|
+
) -> None:
|
|
54
|
+
try:
|
|
55
|
+
for k, v in arg.items():
|
|
56
|
+
self[k] = v
|
|
57
|
+
return
|
|
58
|
+
except AttributeError: # `arg` doesn't have `.items()`
|
|
59
|
+
pass
|
|
60
|
+
|
|
61
|
+
try:
|
|
62
|
+
for k, v in arg:
|
|
63
|
+
self[k] = v
|
|
64
|
+
return
|
|
65
|
+
except TypeError: # `arg` isn't iterable
|
|
66
|
+
pass
|
|
67
|
+
except ValueError: # `arg` isn't iterable of pairs
|
|
68
|
+
pass
|
|
69
|
+
|
|
70
|
+
raise ValueError(f"cannot update {self} from {arg}")
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
Options.update = _f3d_options_update
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
################################################################################
|
|
77
|
+
# add deprecated warnings
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def _deprecated_decorator(f, reason):
|
|
81
|
+
def g(*args, **kwargs):
|
|
82
|
+
warnings.warn(reason, DeprecationWarning, 2)
|
|
83
|
+
return f(*args, **kwargs)
|
|
84
|
+
|
|
85
|
+
return g
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def _add_deprecation_warnings():
|
|
89
|
+
for f3d_class in (
|
|
90
|
+
Camera,
|
|
91
|
+
Scene,
|
|
92
|
+
Options,
|
|
93
|
+
Interactor,
|
|
94
|
+
Engine,
|
|
95
|
+
Window,
|
|
96
|
+
Image,
|
|
97
|
+
):
|
|
98
|
+
for name, member in f3d_class.__dict__.items():
|
|
99
|
+
if callable(member) and member.__doc__:
|
|
100
|
+
m = re.search(r"DEPRECATED(:\s*.+)?", member.__doc__)
|
|
101
|
+
if m:
|
|
102
|
+
reason = m.group(1) or ""
|
|
103
|
+
msg = f"{f3d_class.__qualname__}.{name} is deprecated{reason}"
|
|
104
|
+
setattr(f3d_class, name, _deprecated_decorator(member, msg))
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
_add_deprecation_warnings()
|
f3d/bin/f3d.dll
ADDED
|
Binary file
|
f3d/bin/vcruntime140.dll
ADDED
|
Binary file
|
f3d/bin/zlib.dll
ADDED
|
Binary file
|
f3d/py.typed
ADDED
|
File without changes
|
|
Binary file
|