当前位置: 首页>>代码示例>>Python>>正文


Python Plasma.ptPoint3方法代码示例

本文整理汇总了Python中Plasma.ptPoint3方法的典型用法代码示例。如果您正苦于以下问题:Python Plasma.ptPoint3方法的具体用法?Python Plasma.ptPoint3怎么用?Python Plasma.ptPoint3使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Plasma的用法示例。


在下文中一共展示了Plasma.ptPoint3方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: ImportMarkers

# 需要导入模块: import Plasma [as 别名]
# 或者: from Plasma import ptPoint3 [as 别名]
def ImportMarkers(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:
            # need to try to find the game to stick these in
            jfolderRefs = jfolder.getChildNodeRefList()
            for jref in jfolderRefs:
                jnode = jref.getChild()
                jnode = jnode.upcastToMarkerListNode()
                # is it a marker folder list?
                if type(jnode) != type(None):
                    # is it named the right one?
                    if jnode.folderGetName() == mg[1]:
                        # yes, add the markers to this game
                        for marker in mg[0][4]:
                            nMarker = Plasma.ptVaultMarkerNode(PlasmaVaultConstants.PtVaultNodePermissionFlags.kDefaultPermissions)
                            nMarker.markerSetText(marker[0])
                            pos = Plasma.ptPoint3(marker[1],marker[2],marker[3])
                            nMarker.markerSetPosition(pos)
                            nMarker.markerSetAge(marker[4])
                            nMarker.markerSetGPS(marker[5],marker[6],marker[7])
                            jnode.addNode(nMarker)
开发者ID:Aurebesh,项目名称:moul-scripts,代码行数:55,代码来源:xCheat.py


注:本文中的Plasma.ptPoint3方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。