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
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user