forked from vfxetc/sgpublish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO.txt
179 lines (125 loc) · 7.07 KB
/
TODO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
- Remove the source_publishes attribute.
- Various importers should highlight tasks which have publishes that the
importer would pull in.
- Do we need to force the playblast to open for those which are selected
from the old playblast manager?
- Perhaps give them another button which open it?
- Perhaps give them a "secret" keyboard modifier?
- should publish windows load tasks sync to severely simplify the testing
process, and to make it more obvious when it fails?
- get sgpublish.io.base.Exporter.before_export_publish into export_publish
Or fully document the reason for it is that we want to override have access
to the publisher from within the `export` method.
- Rename Publisher attributes to match PublishEntity names (without the prefix)
- frames_path -> path_to_frames
- movie_path -> path_to_movie
- movie_url -> qt
- Refactor Publisher into Exporter and Publisher
- Exporter handles all the file manipulation stuff
- Publisher the two-stage entity creation
- "Version Scene to Match Publish" button in the confirmation dialog
- easiest way is to add (allow_version_up=True) kwarg which is checked
by default
- Compile complete list of exporters
mayatools.geocache.exporter
mayatools.camera.exporter
mayatools.refedit.exporter
mayatools.transform_anim_export
sgpublish.mayatools.scene_publisher
ks.maya.render_pass_tools.export_render_layers_gui
- What are the various tasks that should be covered be exporters/publishers?
- Provide a UI for the user to pick tasks to attach to, names and
descriptions, new version number, timelog info, playblast, etc..
- Creating a folder using a SGFS template, and tagging it on a successful
publish. (It doesn't need to be successful.)
- Notify the user when a publish succeeded, and the new version number.
- Warn/stop the user when opening the dialog, before pressing the button
(by disabling it and putting warnings into the dialog), and after
validating the data in the dialog
- Abtracting most of the differences bettween exporting to a folder in the
work area vs publishing.
- Could the export/publish differences be merged into a single stream by having
a general ExportRequest object that the user could set movie_frames (etc.) on
that won't actually end up doing anything, except going into `export.yml` or
something similar?
- TEST THE SCENE PUBLISHER.
- could sgmock.unittest provide the basics for setting up a fake Shotgun
sandbox, SGFS, etc., so we can just move on with testing?
- Need to set a global SGFS_ROOT. Something like Flask's context stack
would not work since SGFS will be used from several threads.
- with sgfs.testing.context(root=self.sandbox): ???
- completely mock the Shotgun server and SGFS_ROOT, then create
the directories for a task from scratch
- set the workspace to something in the testing sandbox
- uitools.trampoline.wait_for_true(func, *args, **kwargs, timeout)
- uitools.trampoline.wait_for_signal(signal, timeout=None)
- rename attributes as I go using deprecate.renamed_attr('new') so the logs
will show what still needs to be fixed
- publish safety checks still close the dialog, since there isn't a good way to
pass that information back to the dialog from the exporter
- raise an UnsafeExport exception?
- always return True or a Publisher
- have safety_check(**kwargs) to make sure it won't error
- have preflight(**kwargs) for interactions with the user, including
potentially dealing with and dismissing the warnings from the
safety check, including unsaved files, no timelog on versions, etc
- replace Publisher with `create_publish_folder` and `create_publish`.
- don't really need this big context for creating the entity anymore since
we don't care about sequential version numbers all that much
- it could still be very handy to have a context for an export folder since
it could automatically make sure there are no naming collisions in either
the folder name or in the files that we copy into it, and it could rename
the folder to "*_failed" if it failed.
with sgfs.export_context(template_name, **kwargs) as export:
export.mkdir('blah')
export.open('name', 'wb') as fh
export.add_file(abspath, relpath)
export.create_entity('PublishEvent', {})
if not export.failed():
sgpublish.publish_export(export, ...)
- document the purpose of sgpublish, and the sorts of things that are included
in the metadata
- how to progressively replace safety_check
- rename it to something else, so that the new code can call the old and it
continue to work the same
- refactor sgpublish.publisher.Publisher
- There is too much attempted forsight in this class, doing lots of things
that we do not need it to do. Perhaps, we should revert to directly
manipulating PublishEvents, or to have a function create a base for us
from sgfs templates.
sgpublish.create_publish_directory(type_, name, version)
- creates a uniquely named directory based off of SGFS templates
- A SGFS.create_and_tag('PublishEvent', sg_data, tag_data)
- Instead of all of the methods passing kwargs around, perhaps there
could be an ExportRequest, which would also have many of the extra
wacky methods on it.
- Now that we don't nessesarily need the double import phase, can
we move to::
with sgpublish.publish_context(code='whatever', type='maya_scene') as publish:
# `publish` is the PublishEvent entity fields already filled
# out. Changes made to it will be pushed out assuming no
# exceptions are raised. We don't really have a way to set
# anything into the SGFS tag metadata, however. Perhaps if we treat
# `publish['__metadata__']` as special...
pass
sgpublish.create_version_for_review(publish, **fields)
- Maya extensions should be mixins?
class CameraExporter(MayaExporterMixin, base.Exporter)
- class sgpublish.exporter.ui.dialog.Dialog(QtGui.QDialog):
# Uses this as the exporter, AND to set base title, amoung other
# things.
exporter_class = MayaSceneExporter
- Dialog.class_factory(name=None, **set_on_new_class)(**pass_to_exporter)
Although, this is really the same as type('MyDialog', (Dialog, ), set_on_new_class)
sgpublish.exporter.ui.dialog.maya.Dialog has the base maya extensions
Perhaps this is what dependency injection is made for?
- sgpublish.importer
- Importer
.import_publish(publish, **kwargs) -> .import_(publish['sg_path'] or publish['sg_directory'], **kwargs)
.import_(path, **kwargs)
- ImportWidget(s) (e.g. WorkImportWidget, PublishImportWidget, etc.)
- initialize themselves from the importer.existing_path
- pathChanged signal
Emit this signal whenever the path changes, or it transitions
to a state that is not ready (indicated by None).
- ImportPublish.import_(**kwargs) -> self.importer.import_publish(publish, **kwargs)