本文整理汇总了Python中FxStudio.getFaceGraphNodeNames方法的典型用法代码示例。如果您正苦于以下问题:Python FxStudio.getFaceGraphNodeNames方法的具体用法?Python FxStudio.getFaceGraphNodeNames怎么用?Python FxStudio.getFaceGraphNodeNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FxStudio
的用法示例。
在下文中一共展示了FxStudio.getFaceGraphNodeNames方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: on_drop
# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import getFaceGraphNodeNames [as 别名]
def on_drop(files):
"""Handles files dropped on the viewport. """
try:
# If there is not an .fbx file present in the file list, ignore it.
if len([x for x in files if path_has_extension(x, '.fbx')]) == 0:
return
fbx_file = _get_fbx_file(files)
betf_file = _get_betf_file(files)
if not FxStudio.isActorLoaded():
FBXImporter.full_import_fbx(fbx_file, betf_file)
else:
if len(FxStudio.getFaceGraphNodeNames()) > 0:
msg = "Dragging an FBX file onto an empty actor will set up the "
msg += "character for you. Dragging an fbx file onto an actor "
msg += "with an existing face graph will update the render asset. "
msg += "No auto updating will occur. Do you want to continue?"
if FxStudio.displayYesNoBox(msg) == "yes":
FBXImporter.render_asset_only_import(fbx_file)
else:
FBXImporter.full_import_fbx(fbx_file, betf_file)
except FBXImportError as e:
FxStudio.warn(': '.join(['FBXImporter', str(e)]))
示例2: get_bone_pose_nodes
# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import getFaceGraphNodeNames [as 别名]
def get_bone_pose_nodes():
""" Returns a string with all bone pose node names in the actor separated by '|'
"""
bone_pose_names = ""
for node in FxStudio.getFaceGraphNodeNames():
if FxStudio.getFaceGraphNodeProperties(node)[0] == 'FxBonePoseNode':
bone_pose_names = bone_pose_names + node + '|'
return bone_pose_names
示例3: _rig_pos_neg_nodes
# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import getFaceGraphNodeNames [as 别名]
def _rig_pos_neg_nodes():
"""Attemps to rig the positive and negative nodes automatically.
"""
degrees = float(30)
inv_degrees = 1. / float(degrees)
face_graph = FxStudio.getFaceGraphNodeNames()
with CommandBatcher('-addednodes'):
for node in config.AUTO_RIG_NODES.iterkeys():
# Actual targets driven by FaceFX Studio use spaces, not underscores.
node_name = config.AUTO_RIG_NODES[node]
negative_node = ''.join([node, config.NEGATIVE_SUFFIX])
positive_node = ''.join([node, config.POSITIVE_SUFFIX])
if negative_node in face_graph and positive_node in face_graph:
commands.create_combiner(node_name,
node_min=-degrees, node_max=degrees)
commands.link_linear(node_name, negative_node, m=-inv_degrees)
commands.link_linear(node_name, positive_node, m=inv_degrees)
示例4: OnRefresh
# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import getFaceGraphNodeNames [as 别名]
def OnRefresh(self):
selection = self.choice1.GetString(self.choice1.GetSelection())
self.choice1.Clear()
self.listBox1.Clear()
self.choice1.Append(REST_BONE_LABEL)
for node in FxStudio.getFaceGraphNodeNames():
if FxStudio.getFaceGraphNodeProperties(node)[0] == "FxBonePoseNode":
self.choice1.Append(node)
if not self.choice1.SetStringSelection(selection):
self.choice1.SetSelection(0)
selection = self.choice1.GetString(self.choice1.GetSelection())
if selection == REST_BONE_LABEL:
for bone in FxStudio.getBoneNames():
self.listBox1.Append(bone)
else:
for bone in FxStudio.getBonePoseBoneNames(selection):
self.listBox1.Append(bone)