2025-02-14 Nodes compatibility for 5.0

We had a meeting with developers from different modules that rely on nodes: compositor, geometry nodes, rendering. The goal was to agree on the planing for both 4.5 and 5.0 as there is some overlap and possible dependencies in the tasks.

This is a terse meeting notes to share with the rest of the team.

Attendees

  • Brecht Van Lommel
  • Jacques Lucke
  • Hans Goudey
  • Omar Emara
  • Sergey Sharybin

Notes

  • Material reusability and fields: #112547 - Material reusability and fields - blender - Blender Projects
  • For moving node properties to sockets
  • 5.0 also writes the socket value to the place where the old property was stored
    • Python API compatibility can break in 5.0
    • Start with all the other properties besides enums since those are a bit more complicated.
    • Okay to do this in 4.5 for compositor nodes.
  • Disable indexing node sockets by integer index in 5.0, since this enables more flexibility in future changes without breaking compatibility
  • As nodes are changed to use dynamic declarations (i.e. not “_001” identifier suffix, disable lookup by socket name)
  • Rename “Fac” UI name to “Factor” (this is not a breaking change currently)
  • General agreement about a “Dimension” property for the vector socket type for 2D and 4D vectors
  • When should the compositor remove its own node types to use generic types?
    • Rough idea: implement the new nodes in 4.5, switch to them with versioning in 5.0.
11 Likes
  • Disable indexing node sockets by integer index

When using Translate New Data user preference, node groups are created with translated socket names.

I’m not against disabling integer indexing, but then indexing by name should become more reliable. Otherwise add-on devs would be required to loop around sockets each time they work with groups.

There should always should be an identifier of the sockets/nodes which are not displayed in UI but used internally, and you should use it instead. They never translate and hardcoded for built-in nodes.

D.node_groups[0].interface.items_tree['지오메트리'].identifier
That’s how you access identifier for a specific socket without index lookup.

And as far as I know, the only thing you can access with socket identifier is modifier properties.

Socket name and identifier both are used in name lookup.

Is it?

Just to make sure, this is new feature of 4.+

image

1 Like

Yes it does work in recent 4.5 alpha. Great! This is exactly how I wanted it to work in the first place. Thanks for the info!
It does not work in 4.4 though, so it’s a 4.5+ feature.

Correction: node input/output lookup by identifier dose work in earlier Blender versions (I checked 4.1 at minimum), the thing that threw me of was that lookup by id does not work for node_group.interface.items_tree in any version of Blender.

1 Like