diff options
author | Hans Goudey <h.goudey@me.com> | 2021-12-10 22:52:02 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-10 22:52:02 +0300 |
commit | 7c2fb00e661e080f0d0c85df60f1dff481c91d5e (patch) | |
tree | 35c85744e69e69fc5a3f4a0ed1535780151b25b8 /source/blender/editors/space_node | |
parent | 5a3d5f751f238e568da2bd2b3e3b08dc9e79e3a1 (diff) |
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.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_draw.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc index 62b594d430b..77fccdaf910 100644 --- a/source/blender/editors/space_node/node_draw.cc +++ b/source/blender/editors/space_node/node_draw.cc @@ -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()); |