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


Python types.Node方法代码示例

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


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

示例1: poll

# 需要导入模块: from bpy import types [as 别名]
# 或者: from bpy.types import Node [as 别名]
def poll(cls, ntree):
        return ntree.bl_idname == 'CustomTreeType'


# Derived from the Node base type. 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:7,代码来源:custom_nodes.py

示例2: draw_buttons

# 需要导入模块: from bpy import types [as 别名]
# 或者: from bpy.types import Node [as 别名]
def draw_buttons(self, context, layout):
        layout.label("Node settings")
        layout.prop(self, "myFloatProperty")

    # Detail buttons in the sidebar.
    # If this function is not defined, the draw_buttons function is used instead 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:8,代码来源:custom_nodes.py

示例3: draw_label

# 需要导入模块: from bpy import types [as 别名]
# 或者: from bpy.types import Node [as 别名]
def draw_label(self):
        return "I am a custom node"


### Node Categories ###
# Node categories are a python system for automatically
# extending the Add menu, toolbar panels and search operator.
# For more examples see release/scripts/startup/nodeitems_builtins.py 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:10,代码来源:custom_nodes.py

示例4: poll

# 需要导入模块: from bpy import types [as 别名]
# 或者: from bpy.types import Node [as 别名]
def poll(cls, ntree):
        b = False
        if ntree.bl_idname == 'ShaderNodeTree':
            b = True
        return b

# Derived from the Node base type 
开发者ID:blenderskool,项目名称:kaleidoscope,代码行数:9,代码来源:__init__.py

示例5: draw_buttons

# 需要导入模块: from bpy import types [as 别名]
# 或者: from bpy.types import Node [as 别名]
def draw_buttons(self, context, layout):
        col = layout.column(align=True)
        col.label()
        col.label(text="Kaleidoscope Hybrid is just a")
        col.label(text="quick node to choose the nodes")
        col.label(text="that come with Kaleidoscope.")
        col.label()
        col.label(text="Select any one of the option to")
        col.label(text="to use the node that comes with")
        col.label(text="Kaleidoscope")
        col.label()
        row = col.row(align=True)
        row.prop(self, 'node_type', expand = True)

    #Node Label 
开发者ID:blenderskool,项目名称:kaleidoscope,代码行数:17,代码来源:__init__.py

示例6: draw_buttons

# 需要导入模块: from bpy import types [as 别名]
# 或者: from bpy.types import Node [as 别名]
def draw_buttons(self, context, layout):
        SpectrumPaletteUI(self, context, layout)

    #Node Label 
开发者ID:blenderskool,项目名称:kaleidoscope,代码行数:6,代码来源:spectrum.py

示例7: poll

# 需要导入模块: from bpy import types [as 别名]
# 或者: from bpy.types import Node [as 别名]
def poll(cls, ntree):
        b = False
        if ntree.bl_idname == 'ShaderNodeTree':
            b = True
        return b

# Derived from the Node base type. 
开发者ID:blenderskool,项目名称:kaleidoscope,代码行数:9,代码来源:intensity.py

示例8: init

# 需要导入模块: from bpy import types [as 别名]
# 或者: from bpy.types import Node [as 别名]
def init(self, context):
        self.inputs.new('ArmNodeSocketAction', 'In')
        self.inputs.new('NodeSocketShader', 'Material')
        self.inputs.new('NodeSocketString', 'Node')
        self.inputs.new('NodeSocketColor', 'Color')
        self.outputs.new('ArmNodeSocketAction', 'Out') 
开发者ID:armory3d,项目名称:armory,代码行数:8,代码来源:action_set_material_rgb_param.py

示例9: init

# 需要导入模块: from bpy import types [as 别名]
# 或者: from bpy.types import Node [as 别名]
def init(self, context):
        self.inputs.new('ArmNodeSocketAction', 'In')
        self.inputs.new('NodeSocketShader', 'Material')
        self.inputs.new('NodeSocketString', 'Node')
        self.inputs.new('NodeSocketFloat', 'Value')
        self.outputs.new('ArmNodeSocketAction', 'Out') 
开发者ID:armory3d,项目名称:armory,代码行数:8,代码来源:action_set_material_value_param.py

示例10: init

# 需要导入模块: from bpy import types [as 别名]
# 或者: from bpy.types import Node [as 别名]
def init(self, context):
        self.inputs.new('ArmNodeSocketAction', 'In')
        self.inputs.new('NodeSocketShader', 'Material')
        self.inputs.new('NodeSocketString', 'Node')
        self.inputs.new('NodeSocketString', 'Image')
        self.outputs.new('ArmNodeSocketAction', 'Out') 
开发者ID:armory3d,项目名称:armory,代码行数:8,代码来源:action_set_material_image_param.py

示例11: draw_label

# 需要导入模块: from bpy import types [as 别名]
# 或者: from bpy.types import Node [as 别名]
def draw_label(self):
        return "Data Node" 
开发者ID:Chasvortex,项目名称:caffe-gui-tool,代码行数:4,代码来源:CGTNodes.py

示例12: draw_buttons

# 需要导入模块: from bpy import types [as 别名]
# 或者: from bpy.types import Node [as 别名]
def draw_buttons(self, context, layout):
        super().draw_buttons(context, layout)
        layout.prop(self, "prop_tree")
        if (not self.prop_tree == None):
            layout.prop_search(self, "prop_node", self.prop_tree, "nodes", text="Node") 
开发者ID:aachman98,项目名称:Sorcar,代码行数:7,代码来源:ScSendToSverchok.py

示例13: set_color_ramp

# 需要导入模块: from bpy import types [as 别名]
# 或者: from bpy.types import Node [as 别名]
def set_color_ramp(self):
    """Set the Colors from the Palette to a ColorRamp node"""
    kaleidoscope_spectrum_props=bpy.context.scene.kaleidoscope_spectrum_props
    ramp = None
    ramp_world = None
    if kaleidoscope_spectrum_props.assign_colorramp_world == True:
        try:
            try:
                ramp_world = bpy.context.scene.world.node_tree.nodes[kaleidoscope_spectrum_props.colorramp_world_name].color_ramp
            except:
                if kaleidoscope_spectrum_props.assign_colorramp_world == True:
                    try:
                        self.report({'WARNING'}, "There is Not a Valid ColorRamp Node in the World Material")
                    except AttributeError:
                        pass
            if kaleidoscope_spectrum_props.colorramp_world_name != "" and kaleidoscope_spectrum_props.assign_colorramp_world == True:
                try:
                    for i in range(0, len(ramp_world.elements)):
                            if kaleidoscope_spectrum_props.assign_colorramp_world == True:
                                exec("ramp_world.elements["+str(i)+"].color[0] = kaleidoscope_spectrum_props.color"+str(i+1)+"[0]")
                                exec("ramp_world.elements["+str(i)+"].color[1] = kaleidoscope_spectrum_props.color"+str(i+1)+"[1]")
                                exec("ramp_world.elements["+str(i)+"].color[2] = kaleidoscope_spectrum_props.color"+str(i+1)+"[2]")
                                ramp_world.elements[0].color[3] = 1.0
                except:
                    pass
        except:
            pass

    for mat in bpy.data.materials:
        spectrum_active = mat.kaleidoscope_spectrum_props
        if spectrum_active.assign_colorramp == True and spectrum_active.colorramp_name != "":
            try:
                if spectrum_active is not None:
                    ramp = mat.node_tree.nodes[spectrum_active.colorramp_name].color_ramp
            except:
                if spectrum_active.assign_colorramp == True:
                    try:
                        self.report({'WARNING'}, "There is Not a Valid ColorRamp Node in '"+mat.name+"'")
                    except AttributeError:
                        pass
            if spectrum_active.colorramp_name != "" and spectrum_active.assign_colorramp == True:
                try:
                    for i in range(0, len(ramp.elements)):
                            if spectrum_active.assign_colorramp == True:
                                exec("ramp.elements["+str(i)+"].color[0] = kaleidoscope_spectrum_props.color"+str(i+1)+"[0]")
                                exec("ramp.elements["+str(i)+"].color[1] = kaleidoscope_spectrum_props.color"+str(i+1)+"[1]")
                                exec("ramp.elements["+str(i)+"].color[2] = kaleidoscope_spectrum_props.color"+str(i+1)+"[2]")
                                ramp.elements[0].color[3] = 1.0
                except:
                    pass 
开发者ID:blenderskool,项目名称:kaleidoscope,代码行数:52,代码来源:spectrum.py


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