本文整理汇总了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)