f3d 3.3.0rc6__cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.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.

Potentially problematic release.


This version of f3d might be problematic. Click here for more details.

f3d/__init__.py ADDED
@@ -0,0 +1,99 @@
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 = [
16
+ #
17
+ ]
18
+ F3D_RELATIVE_DLLS = [
19
+ #
20
+ ]
21
+ if sys.version_info >= (3, 8) and sys.platform == "win32":
22
+ for abs_path in F3D_ABSOLUTE_DLLS:
23
+ os.add_dll_directory(abs_path)
24
+ root = Path(__file__).parent
25
+ for rel_path in F3D_RELATIVE_DLLS:
26
+ os.add_dll_directory((root / rel_path).resolve())
27
+
28
+ from .pyf3d import *
29
+
30
+ # Automatically populate __all__ with symbols imported from pyf3d
31
+ __all__ = [name for name in dir(pyf3d) if not name.startswith("_")]
32
+
33
+ # Automatically load plugins for the user
34
+ Engine.autoload_plugins()
35
+
36
+ __version__ = "3.3.0"
37
+
38
+
39
+ ################################################################################
40
+ # monkey patch `options.update`
41
+
42
+
43
+ def _f3d_options_update(
44
+ self, arg: Union[Mapping[str, Any], Iterable[tuple[str, Any]]]
45
+ ) -> None:
46
+ try:
47
+ for k, v in arg.items():
48
+ self[k] = v
49
+ return
50
+ except AttributeError: # `arg` doesn't have `.items()`
51
+ pass
52
+
53
+ try:
54
+ for k, v in arg:
55
+ self[k] = v
56
+ return
57
+ except TypeError: # `arg` isn't iterable
58
+ pass
59
+ except ValueError: # `arg` isn't iterable of pairs
60
+ pass
61
+
62
+ raise ValueError(f"cannot update {self} from {arg}")
63
+
64
+
65
+ Options.update = _f3d_options_update
66
+
67
+
68
+ ################################################################################
69
+ # add deprecated warnings
70
+
71
+
72
+ def _deprecated_decorator(f, reason):
73
+ def g(*args, **kwargs):
74
+ warnings.warn(reason, DeprecationWarning, 2)
75
+ return f(*args, **kwargs)
76
+
77
+ return g
78
+
79
+
80
+ def _add_deprecation_warnings():
81
+ for f3d_class in (
82
+ Camera,
83
+ Scene,
84
+ Options,
85
+ Interactor,
86
+ Engine,
87
+ Window,
88
+ Image,
89
+ ):
90
+ for name, member in f3d_class.__dict__.items():
91
+ if callable(member) and member.__doc__:
92
+ m = re.search(r"DEPRECATED(:\s*.+)?", member.__doc__)
93
+ if m:
94
+ reason = m.group(1) or ""
95
+ msg = f"{f3d_class.__qualname__}.{name} is deprecated{reason}"
96
+ setattr(f3d_class, name, _deprecated_decorator(member, msg))
97
+
98
+
99
+ _add_deprecation_warnings()
f3d/__init__.pyi ADDED
@@ -0,0 +1,43 @@
1
+ """
2
+
3
+ Fast and minimalist 3D viewer
4
+ """
5
+ from __future__ import annotations
6
+ from f3d.pyf3d import Camera
7
+ from f3d.pyf3d import CameraState
8
+ from f3d.pyf3d import Color
9
+ from f3d.pyf3d import Engine
10
+ from f3d.pyf3d import Image
11
+ from f3d.pyf3d import InteractionBind
12
+ from f3d.pyf3d import Interactor
13
+ from f3d.pyf3d import LibInformation
14
+ from f3d.pyf3d import LightState
15
+ from f3d.pyf3d import LightType
16
+ from f3d.pyf3d import Log
17
+ from f3d.pyf3d import Mesh
18
+ from f3d.pyf3d import Options
19
+ from f3d.pyf3d import ReaderInformation
20
+ from f3d.pyf3d import Scene
21
+ from f3d.pyf3d import Utils
22
+ from f3d.pyf3d import Window
23
+ import os as os
24
+ from pathlib import Path
25
+ import re as re
26
+ import sys as sys
27
+ from typing import Any
28
+ from typing import Union
29
+ import warnings as warnings
30
+ from . import pyf3d
31
+ __all__: list = ['CAMERA_LIGHT', 'Camera', 'CameraState', 'Color', 'Engine', 'HEADLIGHT', 'Image', 'InteractionBind', 'Interactor', 'LibInformation', 'LightState', 'LightType', 'Log', 'Mesh', 'Options', 'ReaderInformation', 'SCENE_LIGHT', 'Scene', 'Utils', 'Window']
32
+ def _add_deprecation_warnings():
33
+ ...
34
+ def _deprecated_decorator(f, reason):
35
+ ...
36
+ def _f3d_options_update(self, arg: typing.Mapping[str, typing.Any] | typing.Iterable[tuple[str, typing.Any]]) -> None:
37
+ ...
38
+ CAMERA_LIGHT: pyf3d.LightType # value = <LightType.CAMERA_LIGHT: 2>
39
+ F3D_ABSOLUTE_DLLS: list = list()
40
+ F3D_RELATIVE_DLLS: list = list()
41
+ HEADLIGHT: pyf3d.LightType # value = <LightType.HEADLIGHT: 1>
42
+ SCENE_LIGHT: pyf3d.LightType # value = <LightType.SCENE_LIGHT: 3>
43
+ __version__: str = '3.3.0'
f3d/lib64/libf3d.so ADDED
Binary file
f3d/py.typed ADDED
File without changes