Example #1
0
    def nukeImportPass(self, name=None, version=None, x=None, y=None, palette=None, paletteSpec=None):
        if not name:
            name = self.elname

        if not version:
            version = int(self.versList.currentItem().text())

        if not palette or not paletteSpec:
            palette, paletteSpec = self.getPalette()

        read = ueNuke.ueReadAsset("Read", name="%s_%s" % (self.eltype, name), inpanel=False)
        reColour = getReColour(["name", "%s_%s_reColour" % (self.eltype, name), "postage_stamp", "1"])
        colour = ueNuke.ueConstant(name="%s_%s_constant" % (self.eltype, name), inpanel=False)

        if name in palette:
            colour.knob("color").setValue(palette[name][0], 0)
            colour.knob("color").setValue(palette[name][1], 1)
            colour.knob("color").setValue(palette[name][2], 2)
            colour.knob("color").setValue(1.0, 3)

        reColour.setInput(0, colour)
        reColour.setInput(1, read)

        if x:
            reColour.setXYpos(x, y)
        else:
            x = reColour.xpos()
            y = reColour.ypos()

        colour.setXYpos(x - 100, y)
        read.setXYpos(x, y - 140)

        read.knob("proj").setValue(proj)
        read.knob("grp").setValue(grp)
        read.knob("asst").setValue(asst)
        read.knob("elname").setValue(name)
        read.knob("eltype").setValue(self.eltype)
        read.knob("elclass").setValue(__anClass__)
        read.knob("vers").setValue(version)

        colour.knob("proj").setValue(paletteSpec.proj)
        colour.knob("grp").setValue(paletteSpec.grp)
        colour.knob("asst").setValue(paletteSpec.asst)
        colour.knob("elname").setValue(paletteSpec.elname)
        colour.knob("eltype").setValue(paletteSpec.eltype)
        colour.knob("elclass").setValue(paletteSpec.elclass)
        colour.knob("vers").setValue(paletteSpec.vers)

        return reColour
Example #2
0
    def nukeImportPass(self,
                       name=None,
                       version=None,
                       x=None,
                       y=None,
                       palette=None,
                       paletteSpec=None):
        if not name:
            name = self.elname

        if not version:
            version = int(self.versList.currentItem().text())

        if not palette or not paletteSpec:
            palette, paletteSpec = self.getPalette()

        read = ueNuke.ueReadAsset("Read",
                                  name="%s_%s" % (self.eltype, name),
                                  inpanel=False)
        reColour = getReColour([
            "name",
            "%s_%s_reColour" % (self.eltype, name), "postage_stamp", "1"
        ])
        colour = ueNuke.ueConstant(name="%s_%s_constant" % (self.eltype, name),
                                   inpanel=False)

        if name in palette:
            colour.knob("color").setValue(palette[name][0], 0)
            colour.knob("color").setValue(palette[name][1], 1)
            colour.knob("color").setValue(palette[name][2], 2)
            colour.knob("color").setValue(1.0, 3)

        reColour.setInput(0, colour)
        reColour.setInput(1, read)

        if x:
            reColour.setXYpos(x, y)
        else:
            x = reColour.xpos()
            y = reColour.ypos()

        colour.setXYpos(x - 100, y)
        read.setXYpos(x, y - 140)

        read.knob("proj").setValue(proj)
        read.knob("grp").setValue(grp)
        read.knob("asst").setValue(asst)
        read.knob("elname").setValue(name)
        read.knob("eltype").setValue(self.eltype)
        read.knob("elclass").setValue(__anClass__)
        read.knob("vers").setValue(version)

        colour.knob("proj").setValue(paletteSpec.proj)
        colour.knob("grp").setValue(paletteSpec.grp)
        colour.knob("asst").setValue(paletteSpec.asst)
        colour.knob("elname").setValue(paletteSpec.elname)
        colour.knob("eltype").setValue(paletteSpec.eltype)
        colour.knob("elclass").setValue(paletteSpec.elclass)
        colour.knob("vers").setValue(paletteSpec.vers)

        return reColour
Example #3
0
def ueConstant(name=None):
    return ueNuke.ueConstant(name=name)
Example #4
0
File: init.py Project: hdd/ue
def ueConstant(name=None):
    return ueNuke.ueConstant(name=name)