[Bf-committers] [Patch] Adding new node anchored to pre-menu mouse position

trouble daemon troubledaemon at gmail.com
Fri Mar 23 20:39:39 CET 2012


Hey o/

lukas_t and I were discussing on irc about the annoyance of adding new
nodes in the node editor that causes it to use the location of the
mouse at the point where the operator is called that can result in the
new node being placed off the screen, and brainstormed some possible
interim solutions.

He was kind enough to code up a quick patch that will instead use the
position of the mouse at its pre-menu location, instead of when you
actually click the item. The result is that it will add the node
centered to that location. Then you just need to train yourself to put
the mouse where you want the middle of the node to be, saving you from
having to zoom out to move a node that is off-screen, back into
position.

We debated on anchoring centered vs top left etc, but this patch does
centered, yet still seems okay. We were wondering though, what others
might think of a patch like this being put into trunk for release? He
had some ideas for drag&drop, but that might be something for after
release. Also worth noting is that it currently doesn't add the node
in an ideal location if you use the header menu to add the node, but
we figure this is better than what we have now, and a more typical
method used for adding nodes. ie: better than now :)

Anyways, just curious what others think, and if they had any ideas on
the issue/patch, in hopes of getting this issue at least partially
addressed for the next release. You can find the patch here:

http://www.pasteall.org/30303


More information about the Bf-committers mailing list