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


Python FxStudio.msg方法代码示例

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


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

示例1: _update_from_relative_paths

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import msg [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: actual_log_processing

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import msg [as 别名]
def actual_log_processing(log_type, message, state_machine=LogStateMachine()):
    """ Actually do the processing. Hidden in a second function to avoid having
    to use a global variable for the state machine.

    """

    state_machine.process_line(log_type, message)
    if state_machine.is_summary_ready():
        state_machine.reset()

        # calculate the confidence scores.
        state_machine.calculate_confidence()
        lines = state_machine.get_summary_lines()

        for line in lines:
            FxStudio.msg(line)
        # Echo to Python if we're not in command-line mode.
        if not FxStudio.isCommandLineMode():
            print '\n'.join(lines)
            if len(state_machine.errorAreas) > 0:
                ConfidenceScoreGUI.createFrame(None, state_machine.errorAreas)
开发者ID:e-johnson,项目名称:AndroidProject,代码行数:23,代码来源:BatchSummarizer.py

示例3: on_idle

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import msg [as 别名]

#.........这里部分代码省略.........

                    # Update the render asset if necessary to get the changes to the
                    # base fbx or the animations shown in Studio.
                    if update_render_asset:
                        FBXImporter.update_render_asset(fbx_path)

                    return
                # wx.ID_CANCEL indicates that the user pressed the options
                # button.
                elif selection == wx.ID_CANCEL:
                    show_options_dialog(wx.CommandEvent())
                    # Don't do anything else.
                    return

                update_poses = False
                add_new_ogre_anims = False

                # Remove all animations from the render asset that have been
                # removed from the local disk. Do this first so the poses can come
                # in from the basefbx in case the user removed the pose animation.
                for path in fbx_anims.removed_animations:
                    FBXImporter.remove_animation(fbx_path, path)
                    FBXImporter.remove_ogre_anim(get_animation_name_from_path(path))
                    update_render_asset = True

                # If the pose animation was removed, import the render asset
                # so that the system will know the poses should come from the
                # base fbx file instead.
                if fbx_anims.is_pose_anim_removed():
                    import_render_asset = True
                    update_render_asset = True

                if _is_base_fbx_modified(options):
                    FxStudio.msg('{0} changed. Reimporting.'.format(fbx_path))
                    import_render_asset = True
                    update_render_asset = True

                if import_render_asset:
                    with FxHelperLibrary.Progress("Synchronizing...") as progress:
                        progress.update(0.05)
                        # If a pose animation exists, the poses will come from the
                        # external animation. Otherwise, the poses will come from the
                        # base fbx.
                        poses_are_in_base_fbx = not fbx_anims.pose_anim_exists()
                        progress.update(0.1)
                        # Import the render asset. We ask the importer to only touch
                        # the internal animation if the poses will come from it.
                        FBXImporter.import_render_asset(fbx_path,
                            export_internal_animation=poses_are_in_base_fbx)
                        # We need to reimport all other animations without modifying
                        # their timestamps.
                        _reimport_animations(fbx_path, fbx_anims, progress)
                        progress.update(1.0)
                        # Poses will need to be updated as a result of this step iff
                        # the poses came from *this* fbx.
                        if poses_are_in_base_fbx:
                            update_poses = True

                if _is_betf_modified(options):
                    FxStudio.msg('{0} changed. Reimporting.'.format(options.betf_abs_path))
                    # If the batch export text file changed, we'll need to update
                    # the poses regardless of where they came from.
                    update_poses = True

                if fbx_anims.is_pose_anim_modified():
                    # [Re]import the pose animation. There is logic internal to
开发者ID:e-johnson,项目名称:AndroidProject,代码行数:70,代码来源:messagehandler.py

示例4: FaceFXOnDemandOutputWindow

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import msg [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.msg方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。