当前位置: 首页>>代码示例>>Python>>正文


Python MT.registerNode方法代码示例

本文整理汇总了Python中MT.registerNode方法的典型用法代码示例。如果您正苦于以下问题:Python MT.registerNode方法的具体用法?Python MT.registerNode怎么用?Python MT.registerNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MT的用法示例。


在下文中一共展示了MT.registerNode方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: SubdNodeDecorator

# 需要导入模块: import MT [as 别名]
# 或者: from MT import registerNode [as 别名]
import MT

class SubdNodeDecorator(MT.pytypes.NodeDecorator):
    type="SUBDIVISIONSURFACE"
    label="Objects.Data.Subdivision"
    insockets = [ ("Mesh", "OBJECTDATA"),
                  ("Iterations", "INTEGER", 1)]

    outsockets = [("Subd", "OBJECTDATA")]

class FilterPolygonDecorator(MT.pytypes.NodeDecorator):
    type="FILTERPOLYGON"
    label="Objects.Data.Filter Polygon"
    insockets = [ ("Mesh", "OBJECTDATA"),
                  ("Name", "STRING"),
                  ("Upper Limit", "FLOAT", 1.0),
                  ("Lower Limit", "FLOAT", 0.0)]

    outsockets = [("Filtered", "OBJECTDATA")]

MT.registerNode(SubdNodeDecorator)
MT.registerNode(FilterPolygonDecorator)
开发者ID:frigge,项目名称:MindTree,代码行数:24,代码来源:__init__.py

示例2: AndNodeDecorator

# 需要导入模块: import MT [as 别名]
# 或者: from MT import registerNode [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)
开发者ID:frigge,项目名称:MindTree,代码行数:32,代码来源:__init__.py

示例3: print

# 需要导入模块: import MT [as 别名]
# 或者: from MT import registerNode [as 别名]
        transform_array_node = None
        for child in self.node.insockets[1].childNodes:
            if child.type == "ARRAYNODE":
                axiom_array_node = child
                axioms = [s.value for s in child.insockets if s.value is not None
                          and s.type != "VARIABLE"]
        for child in self.node.insockets[2].childNodes:
            if child.type == "ARRAYNODE":
                transform_array_node = child

        print(axioms)
        for a in axioms:

            if not a in [s.name for s in transform_array_node.insockets]:
                transform_array_node.addInSocket(a, "TRANSFORMABLE")

class LSystemNodeDecorator(MT.pytypes.NodeDecorator):
    label = "LSystem"
    type = "LSYSTEMNODE"
    insockets = [
        ("Axion", "STRING"),
        ("Rules", "LIST:STRING"),
        ("Transformations", "LIST:TRANSFORMABLE"),
        ("Iterations", "INTEGER")
    ]
    outsockets = [("Skeleton", "TRANSFORMABLE")]
    #customwidget = SyncInputsWidget

MT.registerNode(LSystemNodeDecorator)

开发者ID:viviwu,项目名称:MindTree,代码行数:31,代码来源:__init__.py

示例4: ReadTextNode

# 需要导入模块: import MT [as 别名]
# 或者: from MT import registerNode [as 别名]
import MT

class ReadTextNode(MT.pytypes.NodeDecorator):
    type = "TEXTREAD"
    label = "IO.Read Text"
    insockets = [("Filename", "DIRECTORY"),
                ("Watch File", "BOOLEAN")]
    outsockets = [("File Content", "STRING")]

MT.registerNode(ReadTextNode)
开发者ID:frigge,项目名称:MindTree,代码行数:12,代码来源:readtextnode.py

示例5: SetMaterialInstanceNodeDecorator

# 需要导入模块: import MT [as 别名]
# 或者: from MT import registerNode [as 别名]
            ("Diffuse Color", "COLOR", (1, 1, 1, 1)),
            ("Diffuse Intensity", "FLOAT", 0.8),
            ("Specular Intensity", "FLOAT", 0.8)
            ]
    outsockets = [("Material", "MATERIAL")]

class SetMaterialInstanceNodeDecorator(MT.pytypes.NodeDecorator):
    label = "Objects.Material.Set Material"
    type = "SETMATERIALINSTANCE"

    insockets = [
            ("Object", "TRANSFORMABLE"),
            ("Material", "MATERIAL")
            ]
    outsockets = [("Object", "TRANSFORMABLE")]



MT.registerNode(GroupObjectsNodeDecorator)
MT.registerNode(TransformObjectNodeDecorator)
MT.registerNode(ParentNodeDecorator)
MT.registerNode(PointLightNodeDecorator)
MT.registerNode(SpotLightNodeDecorator)
MT.registerNode(DistantLightNodeDecorator)
MT.registerNode(MaterialInstanceNodeDecorator)
MT.registerNode(SetMaterialInstanceNodeDecorator)
MT.registerNode(EmptyNodeDecortator)
MT.registerNode(CameraNodeDecorator)
MT.registerNode(ObjectNodeDecorator)
MT.registerNode(CreateTransformationNodeDecorator)
开发者ID:viviwu,项目名称:MindTree,代码行数:32,代码来源:__init__.py

示例6: Import3D

# 需要导入模块: import MT [as 别名]
# 或者: from MT import registerNode [as 别名]
from . import textio
from . import readtextnode
from . import objio
import MT


class Import3D(MT.pytypes.NodeDecorator):
    type = "IMPORT3D"
    label = "Objects.Import"
    insockets = [("Filepath", "DIRECTORY"), ("Transformation", "MAT4")]
    outsockets = [("Scene", "TRANSFORMABLE")]


class Export3D(MT.pytypes.NodeDecorator):
    type = "EXPORT3D"
    label = "Objects.Export"
    insockets = [("Filepath", "SAVEFILE"), ("Scene", "TRANSFORMABLE")]
    outsockets = [("Export", "ACTION")]


MT.registerNode(Import3D)
MT.registerNode(Export3D)
开发者ID:frigge,项目名称:MindTree,代码行数:24,代码来源:__init__.py

示例7: registerNodes

# 需要导入模块: import MT [as 别名]
# 或者: from MT import registerNode [as 别名]
def registerNodes():
    MT.registerNode(BoolNodeDecorator)
    MT.registerNode(FloatNodeDecorator)
    MT.registerNode(IntNodeDecorator)
    MT.registerNode(StringNodeDecorator)
    MT.registerNode(ColorNodeDecorator)
    MT.registerNode(Vector3DNodeDecorator)
    MT.registerNode(Vector2DNodeDecorator)
开发者ID:frigge,项目名称:MindTree,代码行数:10,代码来源:valuenodes.py

示例8: CopyNodeDecorator

# 需要导入模块: import MT [as 别名]
# 或者: from MT import registerNode [as 别名]
    outsockets = [("Cylinder", "OBJECTDATA")]

class CopyNodeDecorator(MT.pytypes.NodeDecorator):
    type="COPY"
    label="Objects.Copy"
    insockets = [ ("Object", "TRANSFORMABLE"),
                  ("Points", "TRANSFORMABLE"),
                  ("Use Normal", "BOOLEAN", False),
                  ("Up Vector", "VECTOR3D", (0,1,0))]
    outsockets = [("Copies", "TRANSFORMABLE")]

class MeshNodeDecorator(PrimitiveNodeDecoratorBase):
    label="Objects.Primitives.Mesh"
    datanode = "Objects.Data.Mesh"

MT.registerNode(MeshDataNodeDecorator)

MT.registerNode(CubeDataNodeDecorator)
MT.registerNode(PlaneDataNodeDecorator)
MT.registerNode(CylinderDataNodeDecorator)
MT.registerNode(DiscDataNodeDecorator)
MT.registerNode(CubeNodeDecorator)
MT.registerNode(PlaneNodeDecorator)
MT.registerNode(IcosphereDataNodeDecorator)
MT.registerNode(IcosphereNodeDecorator)
MT.registerNode(CylinderNodeDecorator)
MT.registerNode(DiscNodeDecorator)
MT.registerNode(CopyNodeDecorator)

MT.registerNode(MeshNodeDecorator)
开发者ID:frigge,项目名称:MindTree,代码行数:32,代码来源:__init__.py

示例9: JointNodeDecorator

# 需要导入模块: import MT [as 别名]
# 或者: from MT import registerNode [as 别名]
import MT

class JointNodeDecorator(MT.pytypes.NodeDecorator):
    label = "Objects.Joint"
    type = "JOINTNODE"
    outsockets = [("Joint", "TRANSFORMABLE")]
    insockets = [("Transformation", "MAT4"),
                 ("Children", "LIST:TRANSFORMABLE")]

MT.registerNode(JointNodeDecorator)
开发者ID:frigge,项目名称:MindTree,代码行数:12,代码来源:skeleton.py

示例10: CreatePCInPlane

# 需要导入模块: import MT [as 别名]
# 或者: from MT import registerNode [as 别名]
import MT

class CreatePCInPlane(MT.pytypes.NodeDecorator):
    insockets = [
        ("Width", "FLOAT", 100.0),
        ("Height", "FLOAT", 100.0),
        ("Number of Points", "INTEGER", 1000),
        ]
    outsockets = [ ("Pointcloud", "TRANSFORMABLE") ]
    type = "CREATEPCPLANE"
    label = "Objects.Create Pointcloud in Plane"

class ScatterPointsOnSurface(MT.pytypes.NodeDecorator):
    type = "SCATTERSURFACE"
    label = "Objects.Scatter Surface"
    insockets = [
        ("Object", "TRANSFORMABLE"),
        ("count", "INTEGER", 100)
    ]
    outsockets = [ ("Pointcloud", "TRANSFORMABLE") ]

MT.registerNode(CreatePCInPlane)
MT.registerNode(ScatterPointsOnSurface)
开发者ID:frigge,项目名称:MindTree,代码行数:25,代码来源:__init__.py

示例11: Vector3DToFloatDecorator

# 需要导入模块: import MT [as 别名]
# 或者: from MT import registerNode [as 别名]
            ("G", "FLOAT"),
            ("B", "FLOAT"),
            ("A", "FLOAT")
            ]

class Vector3DToFloatDecorator(MT.pytypes.NodeDecorator):
    label = "Values.Converters.Vector3DToFloat"
    type = "VECTOR3DTOFLOAT"
    insockets = [("Vector", "VECTOR3D")]
    outsockets = [
            ("X", "FLOAT"),
            ("Y", "FLOAT"),
            ("Z", "FLOAT")
            ]

class Vector2DToFloatDecorator(MT.pytypes.NodeDecorator):
    label = "Values.Converters.Vector2DToFloat"
    type = "VECTOR2DTOFLOAT"
    insockets = [("Vector", "VECTOR2D")]
    outsockets = [
            ("X", "FLOAT"),
            ("Y", "FLOAT")
            ]

MT.registerNode(FloatToVector3DDecorator)
MT.registerNode(FloatToVector2DDecorator)
MT.registerNode(FloatToColorDecorator)
MT.registerNode(Vector3DToFloatDecorator)
MT.registerNode(Vector2DToFloatDecorator)
MT.registerNode(ColorToFloatDecorator)
开发者ID:frigge,项目名称:MindTree,代码行数:32,代码来源:converternodes.py

示例12: registerNodes

# 需要导入模块: import MT [as 别名]
# 或者: from MT import registerNode [as 别名]
def registerNodes():
    MT.registerNode(AddPropertiesNodeDecorator)
    MT.registerNode(FilterObjectsNodeDecorator)
开发者ID:viviwu,项目名称:MindTree,代码行数:5,代码来源:addproperties.py


注:本文中的MT.registerNode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。