本文整理汇总了Python中ueCore.AssetUtils.getProjectsList方法的典型用法代码示例。如果您正苦于以下问题:Python AssetUtils.getProjectsList方法的具体用法?Python AssetUtils.getProjectsList怎么用?Python AssetUtils.getProjectsList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ueCore.AssetUtils
的用法示例。
在下文中一共展示了AssetUtils.getProjectsList方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: changeAsset
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getProjectsList [as 别名]
def changeAsset():
spec = ueSpec.Spec(sys.argv[-1])
if not spec.proj in ueAssetUtils.getProjectsList():
print "ERROR: Project does not exist"
sys.exit(2)
if not spec.grp in ueAssetUtils.getGroupsList(spec):
print "ERROR: Group does not exist"
sys.exit(2)
if not spec.asst in ueAssetUtils.getAssetsList(spec):
print "ERROR: Asset does not exist"
sys.exit(2)
project = ueAssetUtils.getProject(spec)
asset = ueAssetUtils.getAsset(spec)
print "export PROJ=%s; " % spec.proj
print "export GRP=%s; " % spec.grp
print "export ASST=%s; " % spec.asst
print "export PROJ_ROOT=%s; " % project["path"]
print "export ASST_ROOT=%s" % asset["path"]
示例2: __init__
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getProjectsList [as 别名]
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
global proj, grp, asst, elclass, eltype, elname
global comment, thumbnail
self.elclasses = elclasses
proj = os.getenv("PROJ")
grp = os.getenv("GRP")
asst = os.getenv("ASST")
elclass = None
eltype = None
elname = None
comment = None
thumbnail = None
self.setLayout(QtGui.QGridLayout())
self.layout().setContentsMargins(2, 2, 2, 2)
self.layout().setSpacing(2)
self.projMenu = QtGui.QComboBox()
self.grpMenu = QtGui.QComboBox()
self.asstMenu = QtGui.QComboBox()
self.elclassMenu = QtGui.QComboBox()
self.eltypeMenu = QtGui.QComboBox()
self.eltypeBox = QtGui.QLineEdit()
self.elnameMenu = QtGui.QComboBox()
self.elnameBox = QtGui.QLineEdit()
self.commentBox = QtGui.QTextEdit()
self.thumbnailBox = QtGui.QScrollArea()
self.thumbnailBox.setFixedHeight(160)
pl = sorted(ueAssetUtils.getProjectsList())
for p in pl:
self.projMenu.addItem(p)
self.projMenu.setCurrentIndex(pl.index(proj))
gl = sorted(ueAssetUtils.getGroupsList(ueSpec.Spec(proj)))
for g in gl:
self.grpMenu.addItem(g)
self.grpMenu.setCurrentIndex(gl.index(grp))
al = sorted(ueAssetUtils.getAssetsList(ueSpec.Spec(proj, grp)))
for a in al:
self.asstMenu.addItem(a)
self.asstMenu.setCurrentIndex(al.index(asst))
for c in sorted(self.elclasses):
self.elclassMenu.addItem(c)
elclass = str(self.elclassMenu.currentText())
self.elements = ueAssetUtils.getElements(ueSpec.Spec(proj, grp, asst))
if elclass in sorted(self.elements):
for t in self.elements[elclass]:
self.eltypeMenu.addItem(t)
eltype = str(self.eltypeMenu.currentText())
if eltype in self.elements[elclass]:
for n in sorted(self.elements[elclass][eltype]):
self.elnameMenu.addItem(n)
elname = str(self.elnameMenu.currentText())
t = QtGui.QWidget()
t.setLayout(QtGui.QHBoxLayout())
self.thumbnailButtons = []
for f in glob.glob(os.path.join(os.getenv("ASST_ROOT"), "tmp", "ueSaveThumbs_*.png")):
w = QtGui.QWidget()
w.setLayout(QtGui.QVBoxLayout())
name = os.path.basename(f).lstrip("ueSaveThumbs_").rstrip(".png")
label = QtGui.QLabel()
img = QtGui.QImage(f)
imgs = img.scaled(250, 80, aspectRatioMode=QtCore.Qt.KeepAspectRatio)
label.setPixmap(QtGui.QPixmap.fromImage(imgs))
radio = QtGui.QRadioButton(name)
self.thumbnailButtons.append(radio)
radio.toggled.connect(self.loadThumbnail)
w.layout().addWidget(label)
w.layout().addWidget(radio)
t.layout().addWidget(w)
self.thumbnailBox.setWidget(t)
asstBox = QtGui.QGroupBox("Asset")
asstBox.setLayout(QtGui.QHBoxLayout())
asstBox.layout().addWidget(QtGui.QLabel("Project"))
asstBox.layout().addWidget(self.projMenu)
asstBox.layout().addWidget(QtGui.QLabel("Group"))
asstBox.layout().addWidget(self.grpMenu)
asstBox.layout().addWidget(QtGui.QLabel("Asset"))
#.........这里部分代码省略.........
示例3: loadProjects
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getProjectsList [as 别名]
def loadProjects(self):
pl = sorted(ueAssetUtils.getProjectsList())
self.projMenu.clear()
for p in pl:
self.projMenu.addItem(p)
self.loadGroups()
示例4: loadProjects
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getProjectsList [as 别名]
def loadProjects(self):
projects = sorted(ueAssetUtils.getProjectsList())
self.clear()
self.addItems(projects)
示例5: __init__
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getProjectsList [as 别名]
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
global proj, grp, asst, elclass, eltype, elname, vers, elpass
self.elclasses = elclasses
proj = os.getenv("PROJ")
grp = os.getenv("GRP")
asst = os.getenv("ASST")
elclass = None
eltype = None
elname = None
vers = None
elpass = None
self.setLayout(QtGui.QGridLayout())
self.layout().setContentsMargins(2, 2, 2, 2)
self.layout().setSpacing(2)
self.projMenu = QtGui.QComboBox()
self.grpMenu = QtGui.QComboBox()
self.asstMenu = QtGui.QComboBox()
self.elclassMenu = QtGui.QComboBox()
self.eltypeList = QtGui.QListWidget()
self.elnameList = QtGui.QListWidget()
self.versList = QtGui.QListWidget()
self.passList = QtGui.QListWidget()
self.elCreatedBy = QtGui.QLabel("N/A")
self.elCreatedAt = QtGui.QLabel("N/A")
self.elComment = QtGui.QLabel("N/A")
self.elThumb = QtGui.QLabel()
self.verCreatedBy = QtGui.QLabel("N/A")
self.verCreatedAt = QtGui.QLabel("N/A")
self.verComment = QtGui.QLabel("N/A")
self.verThumb = QtGui.QLabel()
self.verFilesList = QtGui.QListWidget()
img = QtGui.QImage(os.path.join(os.getenv("UE_PATH"), "lib", "placeholders", "thumbnail.png"))
imgs = img.scaled(200, 80, aspectRatioMode=QtCore.Qt.KeepAspectRatio)
self.elThumb.setPixmap(QtGui.QPixmap.fromImage(imgs))
self.verThumb.setPixmap(QtGui.QPixmap.fromImage(imgs))
pl = sorted(ueAssetUtils.getProjectsList())
for p in pl:
self.projMenu.addItem(p)
self.projMenu.setCurrentIndex(pl.index(proj))
gl = sorted(ueAssetUtils.getGroupsList(ueSpec.Spec(proj)))
for g in gl:
self.grpMenu.addItem(g)
self.grpMenu.setCurrentIndex(gl.index(grp))
al = sorted(ueAssetUtils.getAssetsList(ueSpec.Spec(proj, grp)))
for a in al:
self.asstMenu.addItem(a)
self.asstMenu.setCurrentIndex(al.index(asst))
for c in sorted(self.elclasses):
self.elclassMenu.addItem(c)
elclass = str(self.elclassMenu.currentText())
self.elements = ueAssetUtils.getElements(ueSpec.Spec(proj, grp, asst))
if elclass in self.elements:
for t in sorted(self.elements[elclass]):
self.eltypeList.addItem(QtGui.QListWidgetItem(t))
self.eltypeList.setCurrentItem(self.eltypeList.item(0))
eltype = str(self.eltypeList.currentItem().text())
if eltype in self.elements[elclass]:
for n in sorted(self.elements[elclass][eltype]):
self.elnameList.addItem(QtGui.QListWidgetItem(n))
self.elnameList.setCurrentItem(self.elnameList.item(0))
elname = str(self.elnameList.currentItem().text())
self.updateElInfo()
self.versions = ueAssetUtils.getVersions(ueSpec.Spec(proj, grp, asst, elclass, eltype, elname))
if len(self.versions) > 0:
for v in sorted(range(len(self.versions)), reverse=True):
self.versList.addItem(QtGui.QListWidgetItem("%04d" % int(v + 1)))
self.versList.setCurrentItem(self.versList.item(0))
vers = int(self.versList.currentItem().text())
self.loadPasses()
self.updateVersInfo()
asstBox = QtGui.QGroupBox("Asset")
asstBox.setLayout(QtGui.QHBoxLayout())
asstBox.layout().addWidget(QtGui.QLabel("Project"))
asstBox.layout().addWidget(self.projMenu)
asstBox.layout().addWidget(QtGui.QLabel("Group"))
asstBox.layout().addWidget(self.grpMenu)
asstBox.layout().addWidget(QtGui.QLabel("Asset"))
#.........这里部分代码省略.........
示例6: __init__
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getProjectsList [as 别名]
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.setLayout(QtGui.QVBoxLayout())
self.layout().setContentsMargins(2, 2, 2, 2)
self.layout().setSpacing(2)
global proj, grp, asst
global elements
proj = os.getenv("PROJ")
grp = os.getenv("GRP")
asst = os.getenv("ASST")
self.projMenu = QtGui.QComboBox()
self.grpMenu = QtGui.QComboBox()
self.asstMenu = QtGui.QComboBox()
pl = sorted(ueAssetUtils.getProjectsList())
for p in pl:
self.projMenu.addItem(p)
self.projMenu.setCurrentIndex(pl.index(proj))
gl = sorted(ueAssetUtils.getGroupsList(ueSpec.Spec(proj)))
for g in gl:
self.grpMenu.addItem(g)
self.grpMenu.setCurrentIndex(gl.index(grp))
al = sorted(ueAssetUtils.getAssetsList(ueSpec.Spec(proj, grp)))
for a in al:
self.asstMenu.addItem(a)
self.asstMenu.setCurrentIndex(al.index(asst))
zero = QtGui.QWidget()
one = QtGui.QWidget()
zero.setLayout(QtGui.QHBoxLayout())
zero.layout().setContentsMargins(2, 2, 2, 2)
zero.layout().setSpacing(2)
one.setLayout(QtGui.QHBoxLayout())
one.layout().setContentsMargins(2, 2, 2, 2)
one.layout().setSpacing(2)
zero.layout().addWidget(QtGui.QLabel("project"))
zero.layout().addWidget(self.projMenu)
zero.layout().addWidget(QtGui.QLabel("group"))
zero.layout().addWidget(self.grpMenu)
zero.layout().addWidget(QtGui.QLabel("asset"))
zero.layout().addWidget(self.asstMenu)
zero.layout().addStretch(0)
tabs = QtGui.QTabWidget()
elements = ueAssetUtils.getElements(ueSpec.Spec(proj, grp, asst))
self.animationTab = AnimationTab()
self.backgroundTab = BackgroundTab()
self.renderTab = RenderTab()
tabs.addTab(self.animationTab, "Animation")
tabs.addTab(self.backgroundTab, "Background")
tabs.addTab(self.renderTab, "Render")
one.layout().addWidget(tabs)
self.layout().addWidget(zero)
self.layout().addWidget(one)
self.projMenu.activated.connect(self.loadGroups)
self.grpMenu.activated.connect(self.loadAssets)
self.asstMenu.activated.connect(self.loadElements)