MCPcopy Create free account
hub / github.com/Trainguy9512/locomotion / export

Method export

src/main/python/export_script.py:287–318  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

285 return 0
286
287 def export(self):
288 directory = self.directory_line_edit.text()
289 exportSet = self.sets_combo_box.currentText()
290
291 numberOfJointsInSet = cmds.sets(exportSet, size=True, query=True)
292 numberOfBookmarks = len(self.bookmarks)
293
294 frameRate = self.get_frame_rate()
295 exportedSequences = []
296 for i in range(numberOfBookmarks):
297
298 sequencePathAndName = self.sequenceNames[i]
299 filePath = f"{directory}/{sequencePathAndName}.json"
300 timelineBookmark = self.bookmarks[i]
301 markedForExport = self.bookmark_checkbox_widgets[i].isChecked()
302
303 actualDirectory = '/'.join(filePath.split('/')[:-1])
304 if not os.path.isdir(actualDirectory):
305 QtWidgets.QMessageBox.critical(self, "Export Failure", f"The directory {actualDirectory} does not exist.")
306 return
307 print(actualDirectory)
308
309 if markedForExport:
310 self.export_sequence(timelineBookmark, filePath, exportSet, frameRate)
311 print(timelineBookmark)
312 print(filePath)
313 print(exportSet)
314 print(frameRate)
315 exportedSequences.append(sequencePathAndName.split('/')[-1])
316
317 QtWidgets.QMessageBox.information(self, "Export Complete", f"Successfully exported the following animation sequences: \n\n{', '.join(exportedSequences)}")
318 pass
319
320 def export_sequence(self, timelineBookmark, filePath, exportSet, frameRate):
321 if frameRate == 0:

Callers

nothing calls this directly

Calls 2

get_frame_rateMethod · 0.95
export_sequenceMethod · 0.95

Tested by

no test coverage detected