[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11153] trunk/blender/source/blender/src/ editnode.c: * Added a bit more 'padding' around the node sockets, so there' s a
Matt Ebb
matt at mke3.net
Tue Jul 3 09:39:17 CEST 2007
Revision: 11153
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11153
Author: broken
Date: 2007-07-03 09:39:17 +0200 (Tue, 03 Jul 2007)
Log Message:
-----------
* Added a bit more 'padding' around the node sockets, so there's a
larger area to drop the noodle connection on. This helps a lot when
working with lots of nodes and the view zoomed out to maximum.
Modified Paths:
--------------
trunk/blender/source/blender/src/editnode.c
Modified: trunk/blender/source/blender/src/editnode.c
===================================================================
--- trunk/blender/source/blender/src/editnode.c 2007-07-03 07:30:42 UTC (rev 11152)
+++ trunk/blender/source/blender/src/editnode.c 2007-07-03 07:39:17 UTC (rev 11153)
@@ -836,15 +836,28 @@
short mval[2];
getmouseco_areawin(mval);
- areamouseco_to_ipoco(G.v2d, mval, &rect.xmin, &rect.ymin);
- rect.xmin -= NODE_SOCKSIZE+3;
- rect.ymin -= NODE_SOCKSIZE+3;
- rect.xmax = rect.xmin + 2*NODE_SOCKSIZE+6;
- rect.ymax = rect.ymin + 2*NODE_SOCKSIZE+6;
-
/* check if we click in a socket */
for(node= snode->edittree->nodes.first; node; node= node->next) {
+
+ areamouseco_to_ipoco(G.v2d, mval, &rect.xmin, &rect.ymin);
+
+ rect.xmin -= NODE_SOCKSIZE+3;
+ rect.ymin -= NODE_SOCKSIZE+3;
+ rect.xmax = rect.xmin + 2*NODE_SOCKSIZE+6;
+ rect.ymax = rect.ymin + 2*NODE_SOCKSIZE+6;
+
+ if (!(node->flag & NODE_HIDDEN)) {
+ /* extra padding inside and out - allow dragging on the text areas too */
+ if (in_out == SOCK_IN) {
+ rect.xmax += NODE_SOCKSIZE;
+ rect.xmin -= NODE_SOCKSIZE*4;
+ } else if (in_out == SOCK_OUT) {
+ rect.xmax += NODE_SOCKSIZE*4;
+ rect.xmin -= NODE_SOCKSIZE;
+ }
+ }
+
if(in_out & SOCK_IN) {
for(sock= node->inputs.first; sock; sock= sock->next) {
if(!(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) {
More information about the Bf-blender-cvs
mailing list