當前位置: 首頁>>代碼示例>>Python>>正文


Python KLOperator.resizeOutput方法代碼示例

本文整理匯總了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)
開發者ID:AbedSHP,項目名稱:Kraken,代碼行數:29,代碼來源:operators.py


注:本文中的kraken.core.objects.operators.kl_operator.KLOperator.resizeOutput方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。