extapps 0.1.0__py3-none-any.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.
extapps/__init__.py ADDED
@@ -0,0 +1,57 @@
1
+ # !/usr/bin/python
2
+ # coding=utf-8
3
+ """extapps — standalone Switchboard panels for content-pipeline workflows.
4
+
5
+ Each subpackage is a self-contained tool registered via the
6
+ ``uitk.external_tools.in_process`` entry-point group (see ``pyproject.toml``).
7
+ Hosts (tentacle, mayatk, etc.) discover and launch them through uitk's
8
+ ``ExternalToolHandler`` — no host-side knowledge required.
9
+ """
10
+ from pythontk.core_utils.module_resolver import bootstrap_package
11
+
12
+ __package__ = "extapps"
13
+ __version__ = "0.1.0"
14
+
15
+
16
+ DEFAULT_INCLUDE = {
17
+ "map_compositor.launcher": ["MapCompositorUI"],
18
+ "map_compositor.slots": ["MapCompositorSlots"],
19
+ "metashape_workflow.launcher": ["MetashapeWorkflowUI"],
20
+ "metashape_workflow.slots": ["MetashapeWorkflowSlots"],
21
+ "metashape_workflow._metashape_workflow": [
22
+ "MetashapeWorkflow",
23
+ "get_image_filepaths",
24
+ "get_metashape_version",
25
+ "is_license_valid",
26
+ "is_metashape_available",
27
+ ],
28
+ "map_converter.launcher": ["MapConverterUI"],
29
+ "map_converter.slots": ["MapConverterSlots"],
30
+ "map_packer.launcher": ["MapPackerUI"],
31
+ "map_packer.slots": ["MapPackerSlots"],
32
+ "mesh_convert.launcher": ["MeshConvertUI"],
33
+ "mesh_convert.slots": ["MeshConvertSlots"],
34
+ }
35
+
36
+
37
+ bootstrap_package(globals(), include=DEFAULT_INCLUDE)
38
+
39
+
40
+ __all__ = [
41
+ "MapCompositorUI",
42
+ "MapCompositorSlots",
43
+ "MetashapeWorkflowUI",
44
+ "MetashapeWorkflowSlots",
45
+ "MetashapeWorkflow",
46
+ "get_image_filepaths",
47
+ "get_metashape_version",
48
+ "is_license_valid",
49
+ "is_metashape_available",
50
+ "MapConverterUI",
51
+ "MapConverterSlots",
52
+ "MapPackerUI",
53
+ "MapPackerSlots",
54
+ "MeshConvertUI",
55
+ "MeshConvertSlots",
56
+ "__version__",
57
+ ]
@@ -0,0 +1,22 @@
1
+ # !/usr/bin/python
2
+ # coding=utf-8
3
+ """Map Compositor — multi-layer texture compositing tool.
4
+
5
+ Engine lives in :mod:`pythontk.img_utils.map_compositor`; this package
6
+ holds only the Switchboard panel and launcher.
7
+ """
8
+ from pythontk.core_utils.module_resolver import bootstrap_package
9
+
10
+ __package__ = "extapps.map_compositor"
11
+
12
+
13
+ DEFAULT_INCLUDE = {
14
+ "launcher": ["MapCompositorUI"],
15
+ "slots": ["MapCompositorSlots"],
16
+ }
17
+
18
+
19
+ bootstrap_package(globals(), include=DEFAULT_INCLUDE)
20
+
21
+
22
+ __all__ = ["MapCompositorUI", "MapCompositorSlots"]
@@ -0,0 +1,63 @@
1
+ # !/usr/bin/python
2
+ # coding=utf-8
3
+ """Application shell for the Map Compositor UI.
4
+
5
+ The engine lives in :mod:`pythontk.img_utils.map_compositor` and the
6
+ slot bindings in :mod:`extapps.map_compositor.slots`; this module only
7
+ assembles the Switchboard-driven UI and provides the script entry point.
8
+ """
9
+
10
+ from qtpy import QtCore, QtWidgets
11
+
12
+ # High-DPI scaling must be enabled before QApplication is constructed,
13
+ # otherwise the standalone launcher renders Header/Footer text at
14
+ # ~half the size they take inside Maya or tentacle (both hosts
15
+ # pre-configure DPI scaling on their own QApplication, which we then
16
+ # reuse). Only set the attributes when we will be the ones creating
17
+ # the QApplication — setting them after construction is a no-op and
18
+ # can emit a warning. The symbols are gone on Qt 6 (scaling is the
19
+ # default), so each lookup is guarded for forward compatibility.
20
+ if QtWidgets.QApplication.instance() is None:
21
+ for _attr in ("AA_EnableHighDpiScaling", "AA_UseHighDpiPixmaps"):
22
+ flag = getattr(QtCore.Qt, _attr, None)
23
+ if flag is not None:
24
+ QtCore.QCoreApplication.setAttribute(flag, True)
25
+
26
+
27
+ class MapCompositorUI:
28
+ def __new__(cls, *args, **kwargs):
29
+ from uitk import Switchboard
30
+ from extapps import __version__
31
+ from extapps.map_compositor.slots import MapCompositorSlots
32
+
33
+ sb = Switchboard(
34
+ *args,
35
+ ui_source="./map_compositor.ui",
36
+ slot_source=MapCompositorSlots,
37
+ **kwargs,
38
+ )
39
+ ui = sb.loaded_ui.map_compositor
40
+
41
+ ui.set_attributes(WA_TranslucentBackground=True)
42
+ # Use the uitk Header in place of the native OS frame so the
43
+ # options menu (and other header controls) stay visible.
44
+ ui.set_flags(FramelessWindowHint=True)
45
+ ui.style.set(theme="dark", style_class="bgWithBorder")
46
+
47
+ # Expose the menu button (and standard window controls) on the header.
48
+ # The title ("MAP COMPOSITOR") is set declaratively in the .ui file —
49
+ # edit it via Qt Designer rather than here. Only the version
50
+ # (release-dependent) is wired in at runtime.
51
+ ui.header.config_buttons("menu", "minimize", "fullscreen", "hide")
52
+ ui.header.setVersion(__version__)
53
+
54
+ ui.setWindowTitle(f"Map Compositor v{__version__}")
55
+ ui.resize(ui.sizeHint())
56
+ return ui
57
+
58
+
59
+ # -----------------------------------------------------------------------------
60
+
61
+ if __name__ == "__main__":
62
+ ui = MapCompositorUI()
63
+ ui.show(pos="screen", app_exec=True)
@@ -0,0 +1,248 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ui version="4.0">
3
+ <class>QtUi</class>
4
+ <widget class="QMainWindow" name="QtUi">
5
+ <property name="enabled">
6
+ <bool>true</bool>
7
+ </property>
8
+ <property name="geometry">
9
+ <rect>
10
+ <x>0</x>
11
+ <y>0</y>
12
+ <width>750</width>
13
+ <height>394</height>
14
+ </rect>
15
+ </property>
16
+ <property name="minimumSize">
17
+ <size>
18
+ <width>750</width>
19
+ <height>176</height>
20
+ </size>
21
+ </property>
22
+ <property name="windowTitle">
23
+ <string>Map Compositor</string>
24
+ </property>
25
+ <property name="tabShape">
26
+ <enum>QTabWidget::Triangular</enum>
27
+ </property>
28
+ <property name="dockNestingEnabled">
29
+ <bool>true</bool>
30
+ </property>
31
+ <property name="dockOptions">
32
+ <set>QMainWindow::AllowNestedDocks|QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks|QMainWindow::ForceTabbedDocks</set>
33
+ </property>
34
+ <widget class="QWidget" name="central_widget">
35
+ <layout class="QGridLayout" name="gridLayout_2">
36
+ <property name="leftMargin">
37
+ <number>2</number>
38
+ </property>
39
+ <property name="topMargin">
40
+ <number>2</number>
41
+ </property>
42
+ <property name="rightMargin">
43
+ <number>2</number>
44
+ </property>
45
+ <property name="bottomMargin">
46
+ <number>2</number>
47
+ </property>
48
+ <property name="horizontalSpacing">
49
+ <number>2</number>
50
+ </property>
51
+ <property name="verticalSpacing">
52
+ <number>0</number>
53
+ </property>
54
+ <item row="2" column="0">
55
+ <layout class="QVBoxLayout" name="main_layout">
56
+ <property name="spacing">
57
+ <number>1</number>
58
+ </property>
59
+ <item>
60
+ <widget class="Header" name="header" native="true">
61
+ <property name="minimumSize">
62
+ <size>
63
+ <width>0</width>
64
+ <height>19</height>
65
+ </size>
66
+ </property>
67
+ <property name="maximumSize">
68
+ <size>
69
+ <width>16777215</width>
70
+ <height>19</height>
71
+ </size>
72
+ </property>
73
+ <property name="font">
74
+ <font>
75
+ <weight>75</weight>
76
+ <bold>true</bold>
77
+ </font>
78
+ </property>
79
+ <property name="text">
80
+ <string>MAP COMPOSITOR</string>
81
+ </property>
82
+ </widget>
83
+ </item>
84
+ <item>
85
+ <layout class="QGridLayout" name="gridLayout">
86
+ <property name="spacing">
87
+ <number>1</number>
88
+ </property>
89
+ <item row="4" column="0" colspan="5">
90
+ <widget class="LineEdit" name="txt000">
91
+ <property name="minimumSize">
92
+ <size>
93
+ <width>0</width>
94
+ <height>19</height>
95
+ </size>
96
+ </property>
97
+ <property name="maximumSize">
98
+ <size>
99
+ <width>16777215</width>
100
+ <height>19</height>
101
+ </size>
102
+ </property>
103
+ <property name="toolTip">
104
+ <string>Set the directory where your maps to be combined are located.</string>
105
+ </property>
106
+ <property name="placeholderText">
107
+ <string>&lt;Source Directory&gt;</string>
108
+ </property>
109
+ </widget>
110
+ </item>
111
+ <item row="5" column="0" colspan="5">
112
+ <widget class="LineEdit" name="txt001">
113
+ <property name="minimumSize">
114
+ <size>
115
+ <width>0</width>
116
+ <height>19</height>
117
+ </size>
118
+ </property>
119
+ <property name="maximumSize">
120
+ <size>
121
+ <width>16777215</width>
122
+ <height>19</height>
123
+ </size>
124
+ </property>
125
+ <property name="toolTip">
126
+ <string>Set the directory where your combined maps will be output.</string>
127
+ </property>
128
+ <property name="text">
129
+ <string/>
130
+ </property>
131
+ <property name="placeholderText">
132
+ <string>&lt;Destination Directory&gt;</string>
133
+ </property>
134
+ </widget>
135
+ </item>
136
+ <item row="6" column="0" colspan="5">
137
+ <widget class="LineEdit" name="txt002">
138
+ <property name="minimumSize">
139
+ <size>
140
+ <width>0</width>
141
+ <height>19</height>
142
+ </size>
143
+ </property>
144
+ <property name="maximumSize">
145
+ <size>
146
+ <width>16777215</width>
147
+ <height>19</height>
148
+ </size>
149
+ </property>
150
+ <property name="toolTip">
151
+ <string>Set a filename prefix for your combined maps.</string>
152
+ </property>
153
+ <property name="placeholderText">
154
+ <string>&lt;Map Name&gt;</string>
155
+ </property>
156
+ </widget>
157
+ </item>
158
+ </layout>
159
+ </item>
160
+ <item>
161
+ <widget class="QTextEdit" name="txt003">
162
+ <property name="sizePolicy">
163
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
164
+ <horstretch>0</horstretch>
165
+ <verstretch>0</verstretch>
166
+ </sizepolicy>
167
+ </property>
168
+ <property name="minimumSize">
169
+ <size>
170
+ <width>0</width>
171
+ <height>300</height>
172
+ </size>
173
+ </property>
174
+ <property name="frameShape">
175
+ <enum>QFrame::NoFrame</enum>
176
+ </property>
177
+ <property name="frameShadow">
178
+ <enum>QFrame::Plain</enum>
179
+ </property>
180
+ <property name="verticalScrollBarPolicy">
181
+ <enum>Qt::ScrollBarAlwaysOff</enum>
182
+ </property>
183
+ <property name="horizontalScrollBarPolicy">
184
+ <enum>Qt::ScrollBarAlwaysOff</enum>
185
+ </property>
186
+ <property name="readOnly">
187
+ <bool>true</bool>
188
+ </property>
189
+ </widget>
190
+ </item>
191
+ <item>
192
+ <widget class="Footer" name="footer" native="true">
193
+ <property name="minimumSize">
194
+ <size>
195
+ <width>0</width>
196
+ <height>19</height>
197
+ </size>
198
+ </property>
199
+ <property name="maximumSize">
200
+ <size>
201
+ <width>16777215</width>
202
+ <height>19</height>
203
+ </size>
204
+ </property>
205
+ </widget>
206
+ </item>
207
+ </layout>
208
+ </item>
209
+ </layout>
210
+ </widget>
211
+ </widget>
212
+ <customwidgets>
213
+ <customwidget>
214
+ <class>LineEdit</class>
215
+ <extends>QLineEdit</extends>
216
+ <header>uitk.widgets.lineEdit</header>
217
+ </customwidget>
218
+ <customwidget>
219
+ <class>Header</class>
220
+ <extends>QWidget</extends>
221
+ <header>uitk.widgets.header</header>
222
+ </customwidget>
223
+ <customwidget>
224
+ <class>Footer</class>
225
+ <extends>QWidget</extends>
226
+ <header>uitk.widgets.footer</header>
227
+ </customwidget>
228
+ </customwidgets>
229
+ <resources/>
230
+ <connections/>
231
+ <designerdata>
232
+ <property name="gridDeltaX">
233
+ <number>5</number>
234
+ </property>
235
+ <property name="gridDeltaY">
236
+ <number>5</number>
237
+ </property>
238
+ <property name="gridSnapX">
239
+ <bool>true</bool>
240
+ </property>
241
+ <property name="gridSnapY">
242
+ <bool>true</bool>
243
+ </property>
244
+ <property name="gridVisible">
245
+ <bool>true</bool>
246
+ </property>
247
+ </designerdata>
248
+ </ui>
@@ -0,0 +1,133 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ ################################################################################
4
+ ## Form generated from reading UI file 'map_compositor.ui'
5
+ ##
6
+ ## Created by: Qt User Interface Compiler version 6.10.1
7
+ ##
8
+ ## WARNING! All changes made in this file will be lost when recompiling UI file!
9
+ ################################################################################
10
+
11
+ from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
12
+ QMetaObject, QObject, QPoint, QRect,
13
+ QSize, QTime, QUrl, Qt)
14
+ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
15
+ QFont, QFontDatabase, QGradient, QIcon,
16
+ QImage, QKeySequence, QLinearGradient, QPainter,
17
+ QPalette, QPixmap, QRadialGradient, QTransform)
18
+ from PySide6.QtWidgets import (QApplication, QFrame, QGridLayout, QMainWindow,
19
+ QSizePolicy, QTabWidget, QTextEdit, QVBoxLayout,
20
+ QWidget)
21
+
22
+ from uitk.widgets.footer import Footer
23
+ from uitk.widgets.header import Header
24
+ from uitk.widgets.lineEdit import LineEdit
25
+
26
+ class Ui_QtUi(object):
27
+ def setupUi(self, QtUi):
28
+ if not QtUi.objectName():
29
+ QtUi.setObjectName(u"QtUi")
30
+ QtUi.setEnabled(True)
31
+ QtUi.resize(750, 394)
32
+ QtUi.setMinimumSize(QSize(750, 176))
33
+ QtUi.setTabShape(QTabWidget.Triangular)
34
+ QtUi.setDockNestingEnabled(True)
35
+ QtUi.setDockOptions(QMainWindow.AllowNestedDocks|QMainWindow.AllowTabbedDocks|QMainWindow.AnimatedDocks|QMainWindow.ForceTabbedDocks)
36
+ self.central_widget = QWidget(QtUi)
37
+ self.central_widget.setObjectName(u"central_widget")
38
+ self.gridLayout_2 = QGridLayout(self.central_widget)
39
+ self.gridLayout_2.setObjectName(u"gridLayout_2")
40
+ self.gridLayout_2.setHorizontalSpacing(2)
41
+ self.gridLayout_2.setVerticalSpacing(0)
42
+ self.gridLayout_2.setContentsMargins(2, 2, 2, 2)
43
+ self.main_layout = QVBoxLayout()
44
+ self.main_layout.setSpacing(1)
45
+ self.main_layout.setObjectName(u"main_layout")
46
+ self.header = Header(self.central_widget)
47
+ self.header.setObjectName(u"header")
48
+ self.header.setMinimumSize(QSize(0, 19))
49
+ self.header.setMaximumSize(QSize(16777215, 19))
50
+ font = QFont()
51
+ font.setBold(True)
52
+ self.header.setFont(font)
53
+
54
+ self.main_layout.addWidget(self.header)
55
+
56
+ self.gridLayout = QGridLayout()
57
+ self.gridLayout.setSpacing(1)
58
+ self.gridLayout.setObjectName(u"gridLayout")
59
+ self.txt000 = LineEdit(self.central_widget)
60
+ self.txt000.setObjectName(u"txt000")
61
+ self.txt000.setMinimumSize(QSize(0, 19))
62
+ self.txt000.setMaximumSize(QSize(16777215, 19))
63
+
64
+ self.gridLayout.addWidget(self.txt000, 4, 0, 1, 5)
65
+
66
+ self.txt001 = LineEdit(self.central_widget)
67
+ self.txt001.setObjectName(u"txt001")
68
+ self.txt001.setMinimumSize(QSize(0, 19))
69
+ self.txt001.setMaximumSize(QSize(16777215, 19))
70
+
71
+ self.gridLayout.addWidget(self.txt001, 5, 0, 1, 5)
72
+
73
+ self.txt002 = LineEdit(self.central_widget)
74
+ self.txt002.setObjectName(u"txt002")
75
+ self.txt002.setMinimumSize(QSize(0, 19))
76
+ self.txt002.setMaximumSize(QSize(16777215, 19))
77
+
78
+ self.gridLayout.addWidget(self.txt002, 6, 0, 1, 5)
79
+
80
+
81
+ self.main_layout.addLayout(self.gridLayout)
82
+
83
+ self.txt003 = QTextEdit(self.central_widget)
84
+ self.txt003.setObjectName(u"txt003")
85
+ sizePolicy = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding)
86
+ sizePolicy.setHorizontalStretch(0)
87
+ sizePolicy.setVerticalStretch(0)
88
+ sizePolicy.setHeightForWidth(self.txt003.sizePolicy().hasHeightForWidth())
89
+ self.txt003.setSizePolicy(sizePolicy)
90
+ self.txt003.setMinimumSize(QSize(0, 300))
91
+ self.txt003.setFrameShape(QFrame.NoFrame)
92
+ self.txt003.setFrameShadow(QFrame.Plain)
93
+ self.txt003.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
94
+ self.txt003.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
95
+ self.txt003.setReadOnly(True)
96
+
97
+ self.main_layout.addWidget(self.txt003)
98
+
99
+ self.footer = Footer(self.central_widget)
100
+ self.footer.setObjectName(u"footer")
101
+ self.footer.setMinimumSize(QSize(0, 19))
102
+ self.footer.setMaximumSize(QSize(16777215, 19))
103
+
104
+ self.main_layout.addWidget(self.footer)
105
+
106
+
107
+ self.gridLayout_2.addLayout(self.main_layout, 2, 0, 1, 1)
108
+
109
+ QtUi.setCentralWidget(self.central_widget)
110
+
111
+ self.retranslateUi(QtUi)
112
+
113
+ QMetaObject.connectSlotsByName(QtUi)
114
+ # setupUi
115
+
116
+ def retranslateUi(self, QtUi):
117
+ QtUi.setWindowTitle(QCoreApplication.translate("QtUi", u"Map Compositor", None))
118
+ self.header.setText(QCoreApplication.translate("QtUi", u"MAP COMPOSITOR", None))
119
+ #if QT_CONFIG(tooltip)
120
+ self.txt000.setToolTip(QCoreApplication.translate("QtUi", u"Set the directory where your maps to be combined are located.", None))
121
+ #endif // QT_CONFIG(tooltip)
122
+ self.txt000.setPlaceholderText(QCoreApplication.translate("QtUi", u"<Source Directory>", None))
123
+ #if QT_CONFIG(tooltip)
124
+ self.txt001.setToolTip(QCoreApplication.translate("QtUi", u"Set the directory where your combined maps will be output.", None))
125
+ #endif // QT_CONFIG(tooltip)
126
+ self.txt001.setText("")
127
+ self.txt001.setPlaceholderText(QCoreApplication.translate("QtUi", u"<Destination Directory>", None))
128
+ #if QT_CONFIG(tooltip)
129
+ self.txt002.setToolTip(QCoreApplication.translate("QtUi", u"Set a filename prefix for your combined maps.", None))
130
+ #endif // QT_CONFIG(tooltip)
131
+ self.txt002.setPlaceholderText(QCoreApplication.translate("QtUi", u"<Map Name>", None))
132
+ # retranslateUi
133
+