예제 #1
0
파일: ueBuildTool.py 프로젝트: hdd/ue
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])
예제 #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])
예제 #3
0
파일: ueCreateAsset.py 프로젝트: hdd/ue
def createAsset():
    if "name" not in asset:
        print "ERROR: Asset name not set"
        sys.exit(2)

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

    spec = ueSpec.Spec("%s:%s" % (asset["spec"], asset["name"]))

    ueCreate.createAsset(spec, asset["type"], dbMeta=asset["dbMeta"])
예제 #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)