本文整理汇总了Python中ueCore.AssetUtils.getElements方法的典型用法代码示例。如果您正苦于以下问题:Python AssetUtils.getElements方法的具体用法?Python AssetUtils.getElements怎么用?Python AssetUtils.getElements使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ueCore.AssetUtils
的用法示例。
在下文中一共展示了AssetUtils.getElements方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: loadElements
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getElements [as 别名]
def loadElements(self):
global asst
asst = str(self.asstMenu.currentText())
spec = ueSpec.Spec(proj, grp, asst)
self.elements = ueAssetUtils.getElements(spec)
# self.eltypeList.clear()
self.loadTypes()
示例2: loadLayerLists
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getElements [as 别名]
def loadLayerLists(self):
elements = ueAssetUtils.getElements(ueSpec.Spec(proj, grp, asst))
self.layerListPickerBox.clear()
if __layerClass__ in elements:
if __layerType__ in elements[__layerClass__]:
for layerList in sorted(elements[__layerClass__][__layerType__]):
self.layerListPickerBox.addItem(layerList)
示例3: loadElements
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getElements [as 别名]
def loadElements(self):
global asst, elements
asst = str(self.asstMenu.currentText())
elements = ueAssetUtils.getElements(ueSpec.Spec(proj, grp, asst))
self.animationTab.reload()
self.backgroundTab.reload()
self.renderTab.reload()
示例4: loadElements
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getElements [as 别名]
def loadElements(self):
self.elements = ueAssetUtils.getElements(self.spec)
if "arc" in self.elements:
spec = copy.deepcopy(self.spec)
spec.elclass = "arc"
for eltype in self.elements["arc"]:
spec.eltype = eltype
self.libraryWidgets.append(LibraryWidget(self.elements["arc"][eltype], parent=self))
self.drawLibraryWidgets()
示例5: loadEdits
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getElements [as 别名]
def loadEdits(self):
elements = ueAssetUtils.getElements(self.spec)
self.editMenu.clear()
if self.spec.elclass in elements:
if self.spec.eltype in elements[self.spec.elclass]:
for name in elements[self.spec.elclass][self.spec.eltype]:
self.editMenu.addItem(name)
self.spec.elname = str(self.editMenu.currentText())
self.loadEditVersions()
示例6: loadElements
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getElements [as 别名]
def loadElements(self):
global asst
asst = str(self.asstMenu.currentText())
spec = ueSpec.Spec(proj, grp, asst)
self.elements = ueAssetUtils.getElements(spec)
if elclass in self.elements:
self.loadTypes()
else:
self.eltypeMenu.clear()
self.elnameMenu.clear()
示例7: listElements
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getElements [as 别名]
def listElements():
elements = ueAssetUtils.getElements(settings["spec"])
for e in sorted(elements):
for t in sorted(elements[e]):
for n in sorted(elements[e][t]):
a = ueSpec.Spec(settings["spec"].proj,
settings["spec"].grp,
settings["spec"].asst,
e, t, n)
element = str(a)
if "paths" in settings:
element = "%s -> %s" % (element, n["path"])
print element
示例8: __init__
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getElements [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"))
#.........这里部分代码省略.........
示例9: __init__
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getElements [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"))
#.........这里部分代码省略.........
示例10: __init__
# 需要导入模块: from ueCore import AssetUtils [as 别名]
# 或者: from ueCore.AssetUtils import getElements [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)