本文整理匯總了Python中kraken.core.objects.operators.kl_operator.KLOperator.resizeInput方法的典型用法代碼示例。如果您正苦於以下問題:Python KLOperator.resizeInput方法的具體用法?Python KLOperator.resizeInput怎麽用?Python KLOperator.resizeInput使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類kraken.core.objects.operators.kl_operator.KLOperator
的用法示例。
在下文中一共展示了KLOperator.resizeInput方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Locator
# 需要導入模塊: from kraken.core.objects.operators.kl_operator import KLOperator [as 別名]
# 或者: from kraken.core.objects.operators.kl_operator.KLOperator import resizeInput [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)