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


Python FxStudio.getTextFromUser方法代码示例

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


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

示例1: _ensure_exists_actor

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import getTextFromUser [as 别名]
def _ensure_exists_actor():
    """Ensure an actor is loaded in Studio. Create one if necessary. """
    try:
        FxStudio.getActorName()
    except RuntimeError:
        actor_name = FxStudio.getTextFromUser('Enter new actor name: ',
            'Create Actor', 'NewActor')
        FxStudio.createNewActor(actor_name)
开发者ID:e-johnson,项目名称:AndroidProject,代码行数:10,代码来源:FBXImporter.py

示例2: oneTimeInit

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import getTextFromUser [as 别名]
def oneTimeInit():
    runOnceFile = FxStudio.getConsoleVariable("g_userdirectory") + "Settings\\runonce"
    if os.path.exists(runOnceFile) == False:
        # This is the first time Studio has been run.
        if FxStudio.isCommandLineMode():
            FxStudio.warn('This appears to be FaceFX Studio\'s first run.')
            FxStudio.error('We still have a bit of set up left to do. Please run FaceFX Studio in normal (GUI) mode before running in command line mode.')
            FxStudio.setConsoleVariable('err_cli_init', '1')
        else:
            runOnceFileHandle = open(runOnceFile, "w")
            runOnceFileHandle.write("File to signal not to open intro content.")
            runOnceFileHandle.close()

            if FxStudio.displayYesNoBox("Would you be willing to help us make FaceFX Studio a better product? FaceFX Studio will prompt you to send a crash report in the event of a crash, but sometimes extra information goes a long way to helping our engineers track down an issue. In particularly rare or difficult to diagnose cases, it is helpful for our engineers to be able to contact you to discuss the issue. If you are willing to help, please answer yes to enter contact information to be sent along with crash reports.") == "yes":
                contactInfoFile = FxStudio.getConsoleVariable("g_userdirectory") + "Settings\\contact-info.txt"
                contactInfoPrompt = "Please enter your name and any contact information (email, phone, etc) on the single line below.\nThis information is stored in " + contactInfoFile + "\nand can be edited or removed at any time."
                contactInfo = FxStudio.getTextFromUser(contactInfoPrompt, "Contact Information")
                if len(contactInfo) > 0:
                    contactInfoFileHandle = open(contactInfoFile, "w")
                    contactInfoFileHandle.write(contactInfo)
                    contactInfoFileHandle.close()
开发者ID:e-johnson,项目名称:AndroidProject,代码行数:23,代码来源:facefxinit.py


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