Beispiel #1
0
def ueOpen():
    p = nukescripts.registerWidgetAsPanel("ueCommonOpen.Open", "ueOpen",
                                          "ue.panel.ueOpen", create=True)
    p.setMinimumSize(600, 940)
    ueCommonOpen.setClasses(__ueclasses__)

    if p.showModalDialog():
        spec = ueCommonOpen.getValues()
        version = ueAssetUtils.getVersions(spec)[spec.vers-1]
        nuke.scriptOpen(os.path.join(version["path"], version["file_name"]+".nk"))
        nuke.tprint("Opened %s" % spec)

    nukescripts.unregisterPanel("ue.panel.ueOpen", lambda: "return")
Beispiel #2
0
 def open(self):
     spec = ueCommonOpen.getValues()
     version = ueAssetUtils.getVersions(spec)[spec.vers - 1]
     maya.cmds.file(os.path.join(version["path"],
                                 version["file_name"] + ".ma"),
                    o=True,
                    f=True)
     print "Opened %s" % spec
     self.close()
Beispiel #3
0
def ueOpenReadGeo():
    p = nukescripts.registerWidgetAsPanel("ueCommonOpen.Open", "ueOpen",
                                          "ue.panel.ueOpen", create=True)
    p.setMinimumSize(600, 940)
    ueCommonOpen.setClasses(__ueclasses_read_geo__)

    if p.showModalDialog():
        spec = ueCommonOpen.getValues()
        n = nuke.thisNode()
        n.knob("proj").setValue(spec.proj)
        n.knob("grp").setValue(spec.grp)
        n.knob("asst").setValue(spec.asst)
        n.knob("elclass").setValue(spec.elclass)
        n.knob("eltype").setValue(spec.eltype)
        n.knob("elname").setValue(spec.elname)
        n.knob("vers").setValue(int(spec.vers))

    nukescripts.unregisterPanel("ue.panel.ueOpen", lambda: "return")
Beispiel #4
0
Datei: Open.py Projekt: hdd/ue
    def __init__(self, parent=ueMaya.getMayaWindow()):
        QtGui.QMainWindow.__init__(self, parent)

        ueCommonOpen.setClasses(__ueclasses__)

        self.openWidget = ueCommonOpen.Open()
        self.buttonBox = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok|
                                                QtGui.QDialogButtonBox.Cancel)

        centralWidget = QtGui.QWidget()
        centralWidget.setLayout(QtGui.QVBoxLayout())
        centralWidget.layout().addWidget(self.openWidget)
        centralWidget.layout().addWidget(self.buttonBox)

        self.setCentralWidget(centralWidget)
        self.setWindowTitle("ueOpen [*]")

        self.buttonBox.accepted.connect(self.open)
        self.buttonBox.rejected.connect(self.close)
Beispiel #5
0
    def __init__(self, parent=ueMaya.getMayaWindow()):
        QtGui.QMainWindow.__init__(self, parent)

        ueCommonOpen.setClasses(__ueclasses__)

        self.openWidget = ueCommonOpen.Open()
        self.buttonBox = QtGui.QDialogButtonBox(
            QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Cancel)

        centralWidget = QtGui.QWidget()
        centralWidget.setLayout(QtGui.QVBoxLayout())
        centralWidget.layout().addWidget(self.openWidget)
        centralWidget.layout().addWidget(self.buttonBox)

        self.setCentralWidget(centralWidget)
        self.setWindowTitle("ueOpen [*]")

        self.buttonBox.accepted.connect(self.open)
        self.buttonBox.rejected.connect(self.close)
Beispiel #6
0
 def createRef(self):
     spec = ueCommonOpen.getValues()
     version = ueAssetUtils.getVersions(spec)[int(spec.vers)-1]
     if spec.elclass == "geo":
         ext = "obj"
     elif spec.elclass == "cam":
         ext = "fbx"
     elif spec.elclass == "lgt":
         ext = "fbx"
     else:
         ext = "ma"
     maya.cmds.file(os.path.join(version["path"], version["file_name"]+"."+ext),
                    namespace=version["file_name"], r=True)
     if self.redrawRefList:
         refEditor.drawRefList()
     self.close()
Beispiel #7
0
 def createRef(self):
     spec = ueCommonOpen.getValues()
     version = ueAssetUtils.getVersions(spec)[int(spec.vers) - 1]
     if spec.elclass == "geo":
         ext = "obj"
     elif spec.elclass == "cam":
         ext = "fbx"
     elif spec.elclass == "lgt":
         ext = "fbx"
     else:
         ext = "ma"
     maya.cmds.file(os.path.join(version["path"],
                                 version["file_name"] + "." + ext),
                    namespace=version["file_name"],
                    r=True)
     if self.redrawRefList:
         refEditor.drawRefList()
     self.close()
Beispiel #8
0
Datei: Open.py Projekt: hdd/ue
 def open(self):
     spec = ueCommonOpen.getValues()
     version = ueAssetUtils.getVersions(spec)[spec.vers-1]
     maya.cmds.file(os.path.join(version["path"], version["file_name"]+".ma"), o=True, f=True)
     print "Opened %s" % spec
     self.close()