Page MenuHome

Fix T76538: Prevent nodesocket creation on certain nodes
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on May 8 2020, 5:36 PM.

Details

Summary
  • no sockets on Frame nodes
  • no Input sockets on Group Input nodes
  • no Output sockets on Group Output nodes

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.May 8 2020, 5:36 PM
Philipp Oeser (lichtwerk) created this revision.

I think this should be an assert in nodeAddSocket. An additional check in rna code seems appropriate. There you could also check for group inputs and group output nodes, I think. Does this throw a Python exception now?

For me it looks inconsistent that frame node can have input/output collection because it actually can't to add there anything.

Yes, the decision that frame nodes are just normal nodes is a bit weird, maybe I'm missing some historical context. That's how it is for now though...

Philipp Oeser (lichtwerk) retitled this revision from Fix T76538: Prevent nodesocket creation on Frame nodes to Fix T76538: Prevent nodesocket creation on certain nodes.May 8 2020, 8:04 PM
Philipp Oeser (lichtwerk) edited the summary of this revision. (Show Details)

I think this should be an assert in nodeAddSocket. An additional check in rna code seems appropriate. There you could also check for group inputs and group output nodes, I think. Does this throw a Python exception now?

Atm., you can create inputs on Group Input nodes and outputs on Group Output nodes...
Creating outputs on Group Input nodes and inputs on Group Output nodes fails silently

What does it do when you create a new output socket on a Group Input node now? Does it return None?

What does it do when you create a new output socket on a Group Input node now? Does it return None?

returns NodeSocketVirtual

This revision is now accepted and ready to land.May 8 2020, 10:07 PM

Good enough for now. There are probably a couple more cases we could check, but that can be solved later.