@@ -69,6 +69,67 @@ You can't touch the context, you can't delete it. So showing it to artists will
69
69
70
70
PR-s are welcome.
71
71
72
+ a quick test
73
+ ``` python
74
+ import traceback
75
+ import pyblish.api
76
+ import pyblish.util
77
+ import pyblish_simple
78
+ from Qt import QtCore, QtGui, QtWidgets # pylint: disable=no-name-in-module
79
+ import logging
80
+
81
+ def show (parent = None ):
82
+ global window # garbage collection prevention
83
+
84
+ app = QtWidgets.QApplication.instance()
85
+
86
+ new_app_created = False
87
+ if not app:
88
+ app = QtWidgets.QApplication([])
89
+ new_app_created = True
90
+
91
+ # // set dark mode
92
+ app.setStyle(" Fusion" )
93
+
94
+ window = Ui_Form(parent = parent)
95
+ window.show()
96
+
97
+
98
+ import pyblish_lite
99
+ w2 = pyblish_lite.show()
100
+
101
+
102
+ if new_app_created:
103
+ app.exec_()
104
+
105
+ return window
106
+
107
+ def pyblish_test ():
108
+ """ create a instance and pyblish check for local dev testing"""
109
+ import pyblish.api
110
+
111
+ class CollectDummy (pyblish .api .ContextPlugin ):
112
+ """ Discover and collect available rigs into the context"""
113
+ order = pyblish.api.CollectorOrder
114
+ def process (self , context ):
115
+ instance = context.create_instance(" dummy" , family = " mesh" )
116
+
117
+ # create a dummy validation plugin
118
+ class ValidateDummy (pyblish .api .InstancePlugin ):
119
+ label = " dummy"
120
+ families = [" mesh" ]
121
+ order = pyblish.api.ValidatorOrder
122
+ def process (self , instance ):
123
+ assert False , " dummy error"
124
+
125
+ pyblish.api.register_plugin(CollectDummy)
126
+ pyblish.api.register_plugin(ValidateDummy)
127
+
128
+ show()
129
+
130
+ if __name__ == ' __main__' :
131
+ pyblish_test()
132
+ ```
72
133
## community
73
134
- [ Pyblish forum thread] ( https://forums.pyblish.com/t/pyblish-simple-a-new-ui-aimed-at-artists/701 )
74
135
- PYPI https://pypi.org/project/pyblish-simple/
0 commit comments