本文整理匯總了Python中MT.addCompatibility方法的典型用法代碼示例。如果您正苦於以下問題:Python MT.addCompatibility方法的具體用法?Python MT.addCompatibility怎麽用?Python MT.addCompatibility使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MT
的用法示例。
在下文中一共展示了MT.addCompatibility方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: AndNodeDecorator
# 需要導入模塊: import MT [as 別名]
# 或者: from MT import addCompatibility [as 別名]
label = "Condition.If"
type = "IFNODE"
insockets = [("Condition", "BOOLEAN"),
("Then", "VARIABLE"),
("Else", "VARIABLE")]
outsockes = [("Output", "VARIABLE")]
class AndNodeDecorator(MT.pytypes.NodeDecorator):
label = "Condition.And"
type = "ANDNODE"
outsockets = [("Output", "BOOLEAN")]
class OrNodeDecorator(MT.pytypes.NodeDecorator):
label = "Condition.Or"
type = "ORNODE"
outsockets = [("Output", "BOOLEAN")]
class NotNodeDecorator(MT.pytypes.NodeDecorator):
label = "Condition.Or"
type = "ORNODE"
insockets = [("Input", "BOOLEAN")]
outsockets = [("Output", "BOOLEAN")]
MT.addCompatibility("FLOAT", "INTEGER")
MT.registerNode(SinNodeDecorator)
MT.registerNode(IfNodeDecorator)
MT.registerNode(AndNodeDecorator)
MT.registerNode(OrNodeDecorator)
MT.registerNode(NotNodeDecorator)