예제 #1
0
 def fun():
     if meshes:
         factory.ApplyMorphTargetsToMeshes(meshes, morphTargets)
         if trinity.GetShaderModel() == 'SM_2_0_LO':
             PD.PortraitTools.RebindDXT5ShadersForSM2(meshes)
     if callBack:
         callBack()
예제 #2
0
    def _UpdateCrashKeyValues(self):
        """
        This function sits an infinite loop, periodically updating some meta
        data for the crash reporting. It's called from a thread when this service
        starts.
        """
        self.LogInfo('UpdateCrashKeyValues loop starting')
        stats = []
        try:
            serverInfo = login.GetServerInfo()
            blue.SetCrashKeyValues(u'serverName', unicode(serverInfo.name))
            blue.SetCrashKeyValues(u'serverIP', unicode(serverInfo.IP))
        except:
            log.LogException()

        statNames = [
            'Blue/Memory/Malloc', 'Blue/Memory/Python',
            'Blue/Memory/PageFileUsage', 'Blue/Memory/WorkingSet'
        ]
        for each in statNames:
            s = blue.statistics.Find(each)
            if s:
                stats.append(s)

        while self.state == SERVICE_RUNNING:
            for each in stats:
                blue.SetCrashKeyValues(unicode(each.name), unicode(each.value))

            blue.SetCrashKeyValues(u'Trinity_shader_model',
                                   unicode(trinity.GetShaderModel()))
            blue.synchro.SleepWallclock(5000)
예제 #3
0
    def _UpdateCrashKeyValues(self):
        self.LogInfo('UpdateCrashKeyValues loop starting')
        stats = []
        try:
            serverInfo = login.GetServerInfo()
            blue.SetCrashKeyValues(u'serverName', unicode(serverInfo.name))
            blue.SetCrashKeyValues(u'serverIP', unicode(serverInfo.IP))
            blue.SetCrashKeyValues(
                u'IsRunningWithOptionalUpgrade',
                unicode(nasty.IsRunningWithOptionalUpgrade()))
        except:
            log.LogException()

        statNames = [
            'Blue/Memory/Malloc', 'Blue/Memory/Python',
            'Blue/Memory/PageFileUsage', 'Blue/Memory/WorkingSet'
        ]
        for each in statNames:
            s = blue.statistics.Find(each)
            if s:
                stats.append(s)

        while self.state == SERVICE_RUNNING:
            for each in stats:
                blue.SetCrashKeyValues(unicode(each.name), unicode(each.value))

            blue.SetCrashKeyValues(u'Trinity_shader_model',
                                   unicode(trinity.GetShaderModel()))
            blue.synchro.SleepWallclock(5000)
예제 #4
0
파일: loginII.py 프로젝트: R4M80MrX/eve-1
    def CheckHeightMaps(self):
        if 'LO' in trinity.GetShaderModel():
            heightMapParams = nodemanager.FindNodes(self.scene, 'HeightMap', 'trinity.TriTexture2DParameter')
            for param in heightMapParams:
                param.resourcePath = param.resourcePath.replace('_hi.dds', '_lo.dds')

        else:
            heightMapParams = nodemanager.FindNodes(self.scene, 'HeightMap', 'trinity.TriTexture2DParameter')
            for param in heightMapParams:
                param.resourcePath = param.resourcePath.replace('_lo.dds', '_hi.dds')
예제 #5
0
def GetCachePath(typeID, graphicID, size, itemID, blueprint=BLUEPRINT_NONE):
    if evetypes.GetGroupID(typeID) in [
            const.groupSun, const.groupPlanet, const.groupMoon
    ]:
        return u'cache:/Pictures/Planets/%s_%s_%s.dds' % (
            trinity.GetShaderModel(), itemID, size)
    elif blueprint == BLUEPRINT_COPY:
        return u'cache:/Pictures/Blueprints/bpc_%s' % GetPictureFileName(
            typeID, graphicID, size)
    elif blueprint == BLUEPRINT_RELIC:
        return u'cache:/Pictures/Blueprints/relic_%s' % GetPictureFileName(
            typeID, graphicID, size)
    elif blueprint == BLUEPRINT_NORMAL:
        return u'cache:/Pictures/Blueprints/bp_%s' % GetPictureFileName(
            typeID, graphicID, size)
    elif blueprint == BLUEPRINT_DUST:
        return u'cache:/Pictures/Blueprints/dust_%s_%s_%s.dds' % (
            trinity.GetShaderModel(), typeID, size)
    else:
        return u'cache:/Pictures/Gids/' + GetPictureFileName(
            typeID, graphicID, size)
예제 #6
0
 def ApplyBaseSettings(self):
     currentSettings = self._GetSettings()
     self.bbFormat = trinity.renderContext.GetBackBufferFormat()
     self.postProcessingQuality = currentSettings['postProcessingQuality']
     self.shadowQuality = currentSettings['shadowQuality']
     self.aaQuality = currentSettings['aaQuality']
     self.hdrEnabled = currentSettings['hdrEnabled']
     self.distortionEffectsEnabled = self.useDepth = trinity.GetShaderModel().endswith('DEPTH')
     if 'hdrEnabled' in self.overrideSettings:
         self.hdrEnabled = self.overrideSettings['hdrEnabled']
     if 'bbFormat' in self.overrideSettings:
         self.bbFormat = self.overrideSettings['bbFormat']
     if 'aaQuality' in self.overrideSettings:
         self.aaQuality = self.overrideSettings['aaQuality']
예제 #7
0
def GetPictureFileName(typeID, graphicID, size):
    shaderModel = trinity.GetShaderModel()
    name = '%s_%s_%s_%s_%s.dds' % (shaderModel, graphicID
                                   or 0, evetypes.GetIconID(typeID)
                                   or 0, evetypes.GetRaceID(typeID) or 0, size)
    return name
예제 #8
0
def SupportsHigherShaderModel():
    shaderModel = trinity.GetShaderModel()
    maxSupported = trinity.GetMaxShaderModelSupported()
    if shaderModel == 'SM_2_0_LO' and maxSupported.startswith('SM_3'):
        return True
    return False
예제 #9
0
 def GetDefaultClothSimEnabled(self):
     shaderModel = trinity.GetShaderModel()
     if shaderModel.startswith('SM_3'):
         return 1
     else:
         return 0
예제 #10
0
 def _DoPrepareResources(self):
     self.useDepth = trinity.GetShaderModel().endswith('DEPTH')
     self.prepared = True
     self.SetSettingsBasedOnPerformancePreferences()
예제 #11
0
def _is_low_quality():
    return trinity.GetShaderModel() == 'SM_3_0_LO'