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


Python FxStudio.getDirectory方法代码示例

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


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

示例1: _update_from_relative_paths

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import getDirectory [as 别名]
def _update_from_relative_paths():
    """Updates the absolute paths stored in the plugin options using the
    relative paths and the current clientspec, but only if the new absolute
    paths are found. Returns true if anything was updated, false if nothing was
    updated."""
    options = PluginOptions()
    current_time = time.time()
    updated = False
    if not os.path.exists(options.fbx_abs_path) and not options.fbx_rel_path == None:
        abs_fbx_path = os.path.abspath(os.path.join(FxStudio.getDirectory(
            'clientspec_root'), options.fbx_rel_path))
        if os.path.exists(abs_fbx_path):
            FxStudio.msg("Updating absolute FBX path from relative: {0} to {1}"
                .format(options.fbx_abs_path, abs_fbx_path))
            options.fbx_abs_path = abs_fbx_path
            options.fbx_modification_timestamp = current_time
            updated = True

    if not os.path.exists(options.betf_abs_path) and not options.betf_rel_path == None:
        abs_betf_path = os.path.abspath(os.path.join(FxStudio.getDirectory(
            'clientspec_root'), options.betf_rel_path))
        if os.path.exists(abs_betf_path):
            FxStudio.msg("Updating absolute BETF path from relative: {0} to {1}"
                .format(options.betf_abs_path, abs_betf_path))
            options.betf_abs_path = abs_betf_path
            options.betf_modification_timestamp = current_time
            updated = True
    return updated
开发者ID:e-johnson,项目名称:AndroidProject,代码行数:30,代码来源:messagehandler.py

示例2: __init__

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import getDirectory [as 别名]
 def __init__(self, title="wxPython: stdout/stderr"):
     self.frame = None
     self.title = title
     self.pos = wx.DefaultPosition
     self.size = (800, 600)
     self.color_palette = FxStudio.getColorPalette()
     self.triggers = []
     self.logfile = open(FxStudio.getDirectory('logs') + FxStudio.getConsoleVariable('g_applaunchtime') + "-python-log.txt", "w")
     self.continue_line = False
开发者ID:e-johnson,项目名称:AndroidProject,代码行数:11,代码来源:ipython.py

示例3: FaceFXOnDemandOutputWindow

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import getDirectory [as 别名]
            self.SetAutoLayout(1)
            self.output = FaceFXOnDemandOutputWindow(title="output")
            sys.stdout = self.output
            sys.stderr = self.output
            FxStudio.dockInMainWindowNotebook(self, "Python")

        def onSize(self, newSize):
            self.Layout()

        # Do nothing when mouse capture is lost. This causes selection to be a little
        # weird if this happens but will not lock or crash the application or cause the
        # C++ wxWidgets code to assert.
        def onMouseCaptureLost(self, event):
            pass


old = wx.FindWindowByName('FaceFX IPython Shell')
if old == None:
    FxStudio.msg('Starting FaceFX IPython Shell...')
    FxStudio.msg('Using IPython version {0}.'.format(IPython.__version__))
    FxStudio.msg('Using wxPython version {0}.'.format(wx.__version__))
    panel = FaceFXIPythonShell(FxStudio.getMainWindowNotebook(), wx.ID_ANY, 'FaceFX IPython Shell')
    ip = IPython.ipapi.get()
    ip.ex('import ipython')
    ip.ex('ipython.magicfy_all_studio_commands()')
    ipython_log_filename = FxStudio.getDirectory('logs')
    ipython_log_filename += FxStudio.getConsoleVariable('g_applaunchtime')
    ipython_log_filename += '-ipython-log.txt'
    ip.IP.magic_logstart('-o -r -t "{0}"'.format(ipython_log_filename))
    ip.IP.magic_cd(FxStudio.getDirectory('app'))
开发者ID:e-johnson,项目名称:AndroidProject,代码行数:32,代码来源:ipython.py


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