f3d 3.3.0rc6__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.

Potentially problematic release.


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

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