Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-02-09 00:09:49 +0300
committerHans Goudey <h.goudey@me.com>2021-02-09 00:09:49 +0300
commitcfa48c84d06ca8197f86b6d3ceef8a2c7c311a82 (patch)
treeb841d7d8c27a8811317fc069a8581953fef5b736 /source/blender/editors/include
parent13299a73675028c1d9bf3143ec808f9231e78e75 (diff)
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
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/UI_interface_icons.h5
1 files changed, 3 insertions, 2 deletions
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 */