forked from bartvdbraak/blender
Add a little bit of space between socket layouts on nodes.
This commit is contained in:
parent
8066c09df2
commit
fa0e2603f5
@ -359,7 +359,10 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
|
|||||||
nsock->locx = locx + NODE_WIDTH(node);
|
nsock->locx = locx + NODE_WIDTH(node);
|
||||||
/* place the socket circle in the middle of the layout */
|
/* place the socket circle in the middle of the layout */
|
||||||
nsock->locy = 0.5f * (dy + buty);
|
nsock->locy = 0.5f * (dy + buty);
|
||||||
|
|
||||||
dy = buty;
|
dy = buty;
|
||||||
|
if (nsock->next)
|
||||||
|
dy -= NODE_SOCKDY;
|
||||||
}
|
}
|
||||||
|
|
||||||
node->prvr.xmin = locx + NODE_DYS;
|
node->prvr.xmin = locx + NODE_DYS;
|
||||||
@ -443,7 +446,10 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
|
|||||||
nsock->locx = locx;
|
nsock->locx = locx;
|
||||||
/* place the socket circle in the middle of the layout */
|
/* place the socket circle in the middle of the layout */
|
||||||
nsock->locy = 0.5f * (dy + buty);
|
nsock->locy = 0.5f * (dy + buty);
|
||||||
|
|
||||||
dy = buty;
|
dy = buty;
|
||||||
|
if (nsock->next)
|
||||||
|
dy -= NODE_SOCKDY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* little bit space in end */
|
/* little bit space in end */
|
||||||
|
@ -230,6 +230,7 @@ extern const char *node_context_dir[];
|
|||||||
#define BASIS_RAD (0.4f * U.widget_unit)
|
#define BASIS_RAD (0.4f * U.widget_unit)
|
||||||
#define NODE_DYS (U.widget_unit / 2)
|
#define NODE_DYS (U.widget_unit / 2)
|
||||||
#define NODE_DY U.widget_unit
|
#define NODE_DY U.widget_unit
|
||||||
|
#define NODE_SOCKDY (0.08f * U.widget_unit)
|
||||||
#define NODE_WIDTH(node) (node->width * UI_DPI_FAC)
|
#define NODE_WIDTH(node) (node->width * UI_DPI_FAC)
|
||||||
#define NODE_MARGIN_X (0.75f * U.widget_unit)
|
#define NODE_MARGIN_X (0.75f * U.widget_unit)
|
||||||
#define NODE_SOCKSIZE (0.25f * U.widget_unit)
|
#define NODE_SOCKSIZE (0.25f * U.widget_unit)
|
||||||
|
Loading…
Reference in New Issue
Block a user