Blender Git Loki

Git Commits -> Revision 6a447a3

April 6, 2020, 11:52 (GMT)
Add emitters, events, forces and control flow socket types

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")
```

Differential Revision: https://developer.blender.org/D7349

Commit Details:

Full Hash: 6a447a32feb82dc356894f6b5be267547b8bd955
Parent Commit: 7dfdb1a
Lines Changed: +104, -0

7 Modified Paths:

/source/blender/blenkernel/intern/node.c (+24, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+8, -0) (Diff)
/source/blender/blenloader/intern/writefile.c (+4, -0) (Diff)
/source/blender/editors/space_node/drawnode.c (+4, -0) (Diff)
/source/blender/makesdna/DNA_node_types.h (+4, -0) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+41, -0) (Diff)
/source/blender/nodes/intern/node_socket.c (+19, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021