Page MenuHome

Fix T98968: Reroute node doesn't belongs to the frame automatically when added through lasso gesture
ClosedPublic

Authored by Pratik Borhade (PratikPB2123) on Aug 20 2022, 12:47 PM.

Diff Detail

Repository
rB Blender

Event Timeline

Pratik Borhade (PratikPB2123) requested review of this revision.Aug 20 2022, 12:47 PM
Pratik Borhade (PratikPB2123) created this revision.

Works as expected in all cases I've tried!

There are some corner cases, like when the reroute happens to be created
on top of a frame despite none of the links actually being inside the frame. But I think
those are probably rare in practice and being predictable seems better than trying to
be smart about it.

Will leave the final call to @Hans Goudey (HooglyBoogly)!


Example of behavior mentioned above
source/blender/editors/space_node/node_add.cc
215–219

It wonder if it's nicer to iterate through the nodes backwards until we find the first frame node to attach to.

Aside from the inline comment from Leon, this looks good.

This revision is now accepted and ready to land.Aug 24 2022, 5:05 PM
  • use LISTBASE_FOREACH_BACKWARD
Pratik Borhade (PratikPB2123) marked an inline comment as done.Aug 25 2022, 12:10 PM

Thanks for reviewing and committing the patch :)