本文整理汇总了Python中kraken.core.objects.operators.kl_operator.KLOperator.resizeOutput方法的典型用法代码示例。如果您正苦于以下问题:Python KLOperator.resizeOutput方法的具体用法?Python KLOperator.resizeOutput怎么用?Python KLOperator.resizeOutput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kraken.core.objects.operators.kl_operator.KLOperator
的用法示例。
在下文中一共展示了KLOperator.resizeOutput方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Locator
# 需要导入模块: from kraken.core.objects.operators.kl_operator import KLOperator [as 别名]
# 或者: from kraken.core.objects.operators.kl_operator.KLOperator import resizeOutput [as 别名]
from kraken import plugins
from kraken.core.objects.locator import Locator
from kraken.core.objects.operators.kl_operator import KLOperator
from kraken.core.traverser.traverser import Traverser
locInA = Locator("locatorInA")
locInB = Locator("locatorInB")
locOutA = Locator("locatorOutA")
locOutB = Locator("locatorOutB")
operator = KLOperator("IK", "MultiPoseConstraintSolver", "Kraken")
operator.resizeInput('constrainers', 2)
operator.resizeOutput('constrainees', 2)
operator.setInput("constrainers", locInA, 0)
operator.setInput("constrainers", locInB, 1)
operator.setOutput("constrainees", locOutA, 0)
operator.setOutput("constrainees", locOutB, 1)
trav = Traverser()
trav.addRootItem(locOutA)
trav.addRootItem(locOutB)
def callback(**args):
item = args.get('item', None)
print 'Visited '+item.getDecoratedPath()
trav.traverse(itemCallback = callback)