本文整理汇总了Python中Plasma.ptVaultMarkerListNode方法的典型用法代码示例。如果您正苦于以下问题:Python Plasma.ptVaultMarkerListNode方法的具体用法?Python Plasma.ptVaultMarkerListNode怎么用?Python Plasma.ptVaultMarkerListNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plasma
的用法示例。
在下文中一共展示了Plasma.ptVaultMarkerListNode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ImportGames
# 需要导入模块: import Plasma [as 别名]
# 或者: from Plasma import ptVaultMarkerListNode [as 别名]
def ImportGames(args):
"args = 'filename folder'"
import Plasma
import PlasmaVaultConstants
arglist = args.split()
if len(arglist) < 2:
print 'ERROR - not enough arguments - ImportMarkers "filename foldername")'
return
filename = arglist[0]
try:
dfile = open(filename+'.py','r')
except IOError:
print "ERROR - file %d could not be found" % (filename+'.py')
return
dfile.close()
argresidual = args[len(filename)+1:]
#== find the folder where the markerfolders might be
# search thru the age journal folders
vault = Plasma.ptVault()
jfolder = None
master_agefolder = vault.getAgeJournalsFolder()
if type(master_agefolder) != type(None):
agefolderRefs = master_agefolder.getChildNodeRefList()
for agefolderRef in agefolderRefs:
agefolder = agefolderRef.getChild()
agefolder = agefolder.upcastToFolderNode()
if type(agefolder) != type(None):
# might be a foldername with spaces! so see if it starts with the name
if argresidual.startswith(agefolder.folderGetName()):
jfolder = agefolder
argresidual = argresidual[len(agefolder.folderGetName())+1:]
if jfolder:
exec("import %s" % (filename))
exec("mgs = %s.mgs" % (filename))
for mg in mgs:
nMarkerFolder = Plasma.ptVaultMarkerListNode(PlasmaVaultConstants.PtVaultNodePermissionFlags.kDefaultPermissions)
nMarkerFolder.folderSetName(mg[1])
nMarkerFolder.setOwnerID(mg[0][0])
nMarkerFolder.setOwnerName(mg[0][1])
nMarkerFolder.setGameType(mg[0][2])
nMarkerFolder.setRoundLength(mg[0][3])
jfolder.addNode(nMarkerFolder)