From cfa48c84d06ca8197f86b6d3ceef8a2c7c311a82 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Mon, 8 Feb 2021 15:09:49 -0600 Subject: Cleanup: Register node property layout callbacks in files This commit moves the property layout callbacks for node types to their implementation files from `drawnode.c`. This was proposed a while ago in T75724. **Benefits** - Fewer files need to be changed when adding a new node. - Makes it possible to reuse functions from the node's implementation in the layout code. - Except for RNA, all of the node "inputs" are in the same place. - Code gets shorter overall, avoids the large switch statements. **Downsides** - Requires including two UI headers. - Requires adding an editors dependency to the nodes folder. This commit only changes function nodes and geometry nodes, more can be moved later. Differential Revision: https://developer.blender.org/D10352 --- source/blender/editors/include/UI_interface_icons.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h index d77a87e7200..4d860be285d 100644 --- a/source/blender/editors/include/UI_interface_icons.h +++ b/source/blender/editors/include/UI_interface_icons.h @@ -23,6 +23,9 @@ #pragma once +/* Required for enum iconSizes which can't be forward declared if this file is included in C++. */ +#include "DNA_ID.h" + #ifdef __cplusplus extern "C" { #endif @@ -34,8 +37,6 @@ struct PreviewImage; struct Scene; struct bContext; -enum eIconSizes; - typedef struct IconFile { struct IconFile *next, *prev; char filename[256]; /* FILE_MAXFILE size */ -- cgit v1.2.3