Ejemplo n.º 1
0
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])
Ejemplo n.º 2
0
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])
Ejemplo n.º 3
0
def createGroup():
    if "name" not in group:
        print "ERROR: Group name not set"
        sys.exit(2)

    if "spec" not in group:
        print "ERROR: Spec not set"
        sys.exit(2)

    spec = ueSpec.Spec(group["spec"], group["name"])

    ueCreate.createGroup(spec, group["type"], dbMeta=group["dbMeta"])
Ejemplo n.º 4
0
def main():
    spec = ueSpec.Spec(options["spec"])

    edit = ueEdit.getEdit(spec)

    if options["assets"]:
        if options["print"]:
            for sequence in edit["sequences"]:
                print "-> %s" % sequence
                for shot in edit[sequence]["shots"]:
                    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 edit["sequences"]:
                print "-> Creating sequence %s ..." % sequence
                spec.grp = sequence
                ueCreate.createGroup(spec, "default")
                for shot in edit[sequence]["shots"]:
                    if shot not in excludedShotNames:
                        print "---> Creating shot %s ..." % shot
                        spec.asst = shot
                        ueCreate.createAsset(spec, "default", dbMeta=edit[sequence][shot])
    elif options["play"]:
        shots = []
        for sequence in edit:
            spec.grp = sequence
            for shot in edit[sequence]:
                spec.asst = shot
                spec.eltype = "storyboard"
                spec.elname = "master"
                spec.elclass = "sb"

                versions = ueAssetUtils.getVersions(spec)

                if len(versions) == 0:
                    print "Nothing"
                    shots.append(os.path.join(os.getenv("UE_PATH"), "lib", "placeholders", "edit.1-24.png"))
                else:
                    print "Something"
                    shots.append(os.path.join(versions[-1]["path"], "edit.1-24.png"))

        arguments = ""
        for path in shots:
            arguments += " %s" % (path)

        print arguments

        os.system("rv %s" % arguments)