def main(): if "spec" not in options: print "ERROR: Spec not set" sys.exit(2) spec = ueSpec.Spec(options["spec"]) edit = ueEdit.getBuild(spec) if options["assets"]: if options["print"]: for sequence in sorted(edit): print "-> %s" % sequence for shot in sorted(edit[sequence]): print "---> %s" % shot elif options["create"]: # Get the group and check agains the data in the edit file to see if anything has changed spec = ueSpec.Spec(proj=os.getenv("PROJ")) for sequence in sorted(edit): print "-> Creating sequence %s ..." % sequence spec.grp = sequence ueCreate.createGroup(spec, "lib") for shot in sorted(edit[sequence]): if shot not in ["black", "white"]: print "---> Creating shot %s ..." % shot spec.asst = shot ueCreate.createAsset(spec, "lib", dbMeta=edit[sequence][shot])
def __init__(self, spec=ueSpec.Spec(os.getenv("PROJ"), "edt", "master"), parent=None): AbstractEdit.__init__(self, "build", spec, parent) self.setWindowTitle("Build (libraries)") build = ueEdit.getBuild(spec) for sequence in sorted(build): sequenceItem = QtGui.QTreeWidgetItem(self.editTree) sequenceItem.setText(0, sequence) for shot in sorted(build[sequence]): shotItem = QtGui.QTreeWidgetItem(sequenceItem) shotItem.setText(0, shot)