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


Python FxStudio.issueCommand方法代码示例

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


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

示例1: group_to_word

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import issueCommand [as 别名]
def group_to_word(start_index, end_index, word_text):
    """ Issues a FaceFX Studio command to group the phonemes to a word. """
    try:
        ascii_text = word_text.decode('ascii')
    except UnicodeDecodeError:
        encodedWord = b64encode(word_text.encode('utf-8'))
        word_command = '-wordTextUnicode "{0}"'.format(encodedWord)
    else:
        word_command = '-wordText "{0}"'.format(ascii_text)
    FxStudio.issueCommand('phonList -group -startIndex "{0}" -endIndex "{1}" '
        '{2}'.format(start_index, end_index, word_command))
开发者ID:e-johnson,项目名称:AndroidProject,代码行数:13,代码来源:FxHelperLibrary.py

示例2: _export_collapsed_xml

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import issueCommand [as 别名]
def _export_collapsed_xml(actor_path, xml_file):
    """ Exports collapsed XML file.

    """
    with Unattended():
        with Progress("Collapsing Actor...") as progress:

            progress.update(.05)

            collapsed_actor = tempfile.gettempdir() + '\\' + os.path.basename(re.sub('\.facefx', '-FG_Collapsed.facefx', actor_path))

            bone_pose_names = get_bone_pose_nodes();

            # Export a collapsed version of the file.
            FxStudio.issueCommand('fgcollapse -file "{0}" -output "{1}" -fn "{2}"'.format(actor_path, collapsed_actor, bone_pose_names))

            progress.update(1)

            if not os.path.exists(collapsed_actor):
                message = 'Could not load collapsed actor! Make sure you have '
                message += 'write permsission to the directory: "{0}"'.format(os.path.dirname(collapsed_actor))
                raise FxStudio.FaceFXError(message)

            # Load the collapsed actor.
            FxStudio.issueCommand('loadActor -file "{0}"'.format(collapsed_actor))

            FxStudio.issueCommand('actorxml -file "{0}"'.format(xml_file))

            # Load the original actor back up.
            FxStudio.issueCommand('loadActor -file "{0}"'.format(actor_path))

            # Delete the temporary collapsed actor file.
            os.remove(collapsed_actor)
开发者ID:e-johnson,项目名称:AndroidProject,代码行数:35,代码来源:collapsedxmlexporter.py

示例3: OnRemoveBone

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import issueCommand [as 别名]
 def OnRemoveBone(self, event):
     posename = self.choice1.GetString(self.choice1.GetSelection())
     boneselections = self.listBox1.GetSelections()
     boneposecommand = 'bonepose '
     if posename == REST_BONE_LABEL:
         boneposecommand += '-restpose '
     else:
         boneposecommand += '-name "' + posename + '" '
     boneposecommand += '-removebones "'
     for selindex in boneselections:
         boneposecommand += self.listBox1.GetString(selindex) + "|"
     boneposecommand += '"'
     FxStudio.issueCommand(boneposecommand)
     self.OnRefresh()
开发者ID:e-johnson,项目名称:AndroidProject,代码行数:16,代码来源:removebones.py

示例4: OnPlayButtonClicked

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import issueCommand [as 别名]
 def OnPlayButtonClicked(self, event):
     group = self.errorAreas[self.errorIndex]["group"]
     anim = self.errorAreas[self.errorIndex]["anim"]
     starttime = self.errorAreas[self.errorIndex]["starttime"] - START_PADDING
     endtime = self.errorAreas[self.errorIndex]["endtime"]
     if FxStudio.getSelectedAnimGroupName() != group:
         FxStudio.issueCommand('select -type "animgroup" -names "{0}"'.format(group))
     if FxStudio.getSelectedAnimName() != anim:
         FxStudio.issueCommand('select -type "anim" -names "{0}"'.format(anim))
     FxStudio.issueCommand('play -start {0} -end {1}'.format(starttime, endtime))
开发者ID:e-johnson,项目名称:AndroidProject,代码行数:12,代码来源:ConfidenceScoreGUI.py

示例5: OnNextButtonClicked

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import issueCommand [as 别名]
 def OnNextButtonClicked(self, event):
     self.errorIndex += 1
     if self.errorIndex < len(self.errorAreas):
         group = self.errorAreas[self.errorIndex]["group"]
         anim = self.errorAreas[self.errorIndex]["anim"]
         starttime = self.errorAreas[self.errorIndex]["starttime"] - START_PADDING
         endtime = self.errorAreas[self.errorIndex]["endtime"]
         FxStudio.issueCommand('select -type "animgroup" -names "{0}"'.format(group))
         FxStudio.issueCommand('select -type "anim" -names "{0}"'.format(anim))
         FxStudio.issueCommand('currentTime -new "{0}"'.format(starttime))
         FxStudio.setVisibleTimeRange(starttime, endtime)
     else:
         self.errorIndex = -1
     self.OnRefresh()
开发者ID:e-johnson,项目名称:AndroidProject,代码行数:16,代码来源:ConfidenceScoreGUI.py

示例6: issue_raw

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import issueCommand [as 别名]
def issue_raw(command):
    """Issues a command and raises an exception if the command fails. """
    if not FxStudio.issueCommand(command):
        raise FBXImportError('Command failed: {0}'.format(command))
开发者ID:e-johnson,项目名称:AndroidProject,代码行数:6,代码来源:commands.py

示例7: OnReanalyzeButtonClicked

# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import issueCommand [as 别名]
 def OnReanalyzeButtonClicked(self, event):
     currentAnimation = Animation(FxStudio.getSelectedAnimGroupName(),
         FxStudio.getSelectedAnimName())
     FxStudio.issueCommand('analyze -audio "{0}" -overwrite'.format(
         currentAnimation.absoluteAudioAssetPath))
开发者ID:e-johnson,项目名称:AndroidProject,代码行数:7,代码来源:ConfidenceScoreGUI.py


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