Cleanup: Remove unnecessary runtime rectangle from nodes in DNA

I assume this `butr` rectangle was used more in the past,
but currently its value is set and used less than 10 lines apart,
so it's trivial to remove 16 bytes from every node. The other
rectangles are also runtime data and could be removed, but
they are more difficult.
This commit is contained in:
Hans Goudey 2021-12-10 13:52:02 -06:00
parent 5a3d5f751f
commit 7c2fb00e66
2 changed files with 1 additions and 9 deletions

View File

@ -480,18 +480,12 @@ static void node_update_basis(const bContext &C, bNodeTree &ntree, bNode &node)
if (node.typeinfo->draw_buttons && (node.flag & NODE_OPTIONS)) {
dy -= NODE_DYS / 2;
/* Set this for `uifunc()` that don't use layout engine yet. */
node.butr.xmin = 0;
node.butr.xmax = NODE_WIDTH(node) - 2 * NODE_DYS;
node.butr.ymin = 0;
node.butr.ymax = 0;
uiLayout *layout = UI_block_layout(node.block,
UI_LAYOUT_VERTICAL,
UI_LAYOUT_PANEL,
loc.x + NODE_DYS,
dy,
node.butr.xmax,
NODE_WIDTH(node) - NODE_DY,
0,
0,
UI_style_get_dpi());

View File

@ -304,8 +304,6 @@ typedef struct bNode {
/** Entire boundbox (world-space). */
rctf totr;
/** Optional buttons area. */
rctf butr;
/** Optional preview area. */
rctf prvr;
/**