Page MenuHome

Add emitters, events, forces and control flow socket types
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on Apr 6 2020, 1:52 PM.

Details

Summary

This is part of T73324.

The shapes and colors of the sockets will most likely change later on.

This script can be used to create a node with the new socket types:

import bpy

class MyCustomNode(bpy.types.Node):
    bl_idname = 'CustomNodeType'
    bl_label = "Custom Node"

    def init(self, context):
        self.inputs.new('NodeSocketEmitters', "Emitters")
        self.inputs.new('NodeSocketEvents', "Events")
        self.inputs.new('NodeSocketForces', "Forces")
        self.inputs.new('NodeSocketControlFlow', "Control Flow")

        self.outputs.new('NodeSocketEmitters', "Emitters")
        self.outputs.new('NodeSocketEvents', "Events")
        self.outputs.new('NodeSocketForces', "Forces")
        self.outputs.new('NodeSocketControlFlow', "Control Flow")

bpy.utils.register_class(MyCustomNode)

if len(bpy.data.simulations) == 0:
    bpy.data.simulations.new("Simulation")
    
sim = bpy.data.simulations[0]
sim.node_tree.nodes.new("CustomNodeType")

Diff Detail

Repository
rB Blender
Branch
influence-and-control-flow-socket-types (branched from master)
Build Status
Buildable 7518
Build 7518: arc lint + arc unit

Event Timeline

  • Merge branch 'image-and-object-socket-type' into influence-and-control-flow-socket-types
  • add missing cases for new types in switch statement
This revision is now accepted and ready to land.Apr 15 2020, 2:21 PM