Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_node_types.h
| Show First 20 Lines • Show All 439 Lines • ▼ Show 20 Lines | |||||
| } bNodeLink; | } bNodeLink; | ||||
| /* link->flag */ | /* link->flag */ | ||||
| #define NODE_LINKFLAG_HILITE (1 << 0) /* link has been successfully validated */ | #define NODE_LINKFLAG_HILITE (1 << 0) /* link has been successfully validated */ | ||||
| #define NODE_LINK_VALID (1 << 1) | #define NODE_LINK_VALID (1 << 1) | ||||
| #define NODE_LINK_TEST (1 << 2) /* free test flag, undefined */ | #define NODE_LINK_TEST (1 << 2) /* free test flag, undefined */ | ||||
| #define NODE_LINK_TEMP_HIGHLIGHT (1 << 3) /* Link is highlighted for picking. */ | #define NODE_LINK_TEMP_HIGHLIGHT (1 << 3) /* Link is highlighted for picking. */ | ||||
| #define NODE_LINK_MUTED (1 << 4) /* Link is muted. */ | #define NODE_LINK_MUTED (1 << 4) /* Link is muted. */ | ||||
| #define NODE_LINK_DRAGGED (1 << 5) /* Node link is being dragged by the user. */ | |||||
| /* tree->edit_quality/tree->render_quality */ | /* tree->edit_quality/tree->render_quality */ | ||||
| #define NTREE_QUALITY_HIGH 0 | #define NTREE_QUALITY_HIGH 0 | ||||
| #define NTREE_QUALITY_MEDIUM 1 | #define NTREE_QUALITY_MEDIUM 1 | ||||
| #define NTREE_QUALITY_LOW 2 | #define NTREE_QUALITY_LOW 2 | ||||
| /* tree->chunksize */ | /* tree->chunksize */ | ||||
| #define NTREE_CHUNKSIZE_32 32 | #define NTREE_CHUNKSIZE_32 32 | ||||
| #define NTREE_CHUNKSIZE_64 64 | #define NTREE_CHUNKSIZE_64 64 | ||||
| #define NTREE_CHUNKSIZE_128 128 | #define NTREE_CHUNKSIZE_128 128 | ||||
| #define NTREE_CHUNKSIZE_256 256 | #define NTREE_CHUNKSIZE_256 256 | ||||
| #define NTREE_CHUNKSIZE_512 512 | #define NTREE_CHUNKSIZE_512 512 | ||||
| #define NTREE_CHUNKSIZE_1024 1024 | #define NTREE_CHUNKSIZE_1024 1024 | ||||
| struct FieldInferencingInterface; | |||||
| /* the basis for a Node tree, all links and nodes reside internal here */ | /* the basis for a Node tree, all links and nodes reside internal here */ | ||||
| /* only re-usable node trees are in the library though, | /* only re-usable node trees are in the library though, | ||||
| * materials and textures allocate own tree struct */ | * materials and textures allocate own tree struct */ | ||||
| typedef struct bNodeTree { | typedef struct bNodeTree { | ||||
| ID id; | ID id; | ||||
| /** Animation data (must be immediately after id for utilities to use it). */ | /** Animation data (must be immediately after id for utilities to use it). */ | ||||
| struct AnimData *adt; | struct AnimData *adt; | ||||
| /** Runtime type information. */ | /** Runtime type information. */ | ||||
| struct bNodeTreeType *typeinfo; | struct bNodeTreeType *typeinfo; | ||||
| /** Runtime type identifier. */ | /** Runtime type identifier. */ | ||||
| char idname[64]; | char idname[64]; | ||||
| /** Runtime RNA type of the group interface. */ | /** Runtime RNA type of the group interface. */ | ||||
| struct StructRNA *interface_type; | struct StructRNA *interface_type; | ||||
| /** Grease pencil data. */ | /** Grease pencil data. */ | ||||
| struct bGPdata *gpd; | struct bGPdata *gpd; | ||||
| /** Node tree stores own offset for consistent editor view. */ | /** Node tree stores own offset for consistent editor view. */ | ||||
| float view_center[2]; | float view_center[2]; | ||||
| ListBase nodes, links; | ListBase nodes, links; | ||||
| /** Information about how inputs and outputs of the node group interact with fields. */ | |||||
| struct FieldInferencingInterface *field_inferencing_interface; | |||||
HooglyBoogly: The comment should mention that this is just runtime data based on the node declaration.
We… | |||||
| /** Set init on fileread. */ | /** Set init on fileread. */ | ||||
| int type, init; | int type, init; | ||||
| /** | /** | ||||
| * Sockets in groups have unique identifiers, adding new sockets always | * Sockets in groups have unique identifiers, adding new sockets always | ||||
| * will increase this counter. | * will increase this counter. | ||||
| */ | */ | ||||
| int cur_index; | int cur_index; | ||||
| ▲ Show 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | |||||
| /* ntree->update */ | /* ntree->update */ | ||||
| typedef enum eNodeTreeUpdate { | typedef enum eNodeTreeUpdate { | ||||
| NTREE_UPDATE = 0xFFFF, /* generic update flag (includes all others) */ | NTREE_UPDATE = 0xFFFF, /* generic update flag (includes all others) */ | ||||
| NTREE_UPDATE_LINKS = (1 << 0), /* links have been added or removed */ | NTREE_UPDATE_LINKS = (1 << 0), /* links have been added or removed */ | ||||
| NTREE_UPDATE_NODES = (1 << 1), /* nodes or sockets have been added or removed */ | NTREE_UPDATE_NODES = (1 << 1), /* nodes or sockets have been added or removed */ | ||||
| NTREE_UPDATE_GROUP_IN = (1 << 4), /* group inputs have changed */ | NTREE_UPDATE_GROUP_IN = (1 << 4), /* group inputs have changed */ | ||||
| NTREE_UPDATE_GROUP_OUT = (1 << 5), /* group outputs have changed */ | NTREE_UPDATE_GROUP_OUT = (1 << 5), /* group outputs have changed */ | ||||
| /* The field interface has changed. So e.g. an output that was always a field before is not | |||||
| * anymore. This implies that the field type inferencing has to be done again. */ | |||||
| NTREE_UPDATE_FIELD_INFERENCING = (1 << 6), | |||||
| /* group has changed (generic flag including all other group flags) */ | /* group has changed (generic flag including all other group flags) */ | ||||
| NTREE_UPDATE_GROUP = (NTREE_UPDATE_GROUP_IN | NTREE_UPDATE_GROUP_OUT), | NTREE_UPDATE_GROUP = (NTREE_UPDATE_GROUP_IN | NTREE_UPDATE_GROUP_OUT), | ||||
| } eNodeTreeUpdate; | } eNodeTreeUpdate; | ||||
| /* tree->execution_mode */ | /* tree->execution_mode */ | ||||
| typedef enum eNodeTreeExecutionMode { | typedef enum eNodeTreeExecutionMode { | ||||
| NTREE_EXECUTION_MODE_TILED = 0, | NTREE_EXECUTION_MODE_TILED = 0, | ||||
| NTREE_EXECUTION_MODE_FULL_FRAME = 1, | NTREE_EXECUTION_MODE_FULL_FRAME = 1, | ||||
| ▲ Show 20 Lines • Show All 1,505 Lines • Show Last 20 Lines | |||||
The comment should mention that this is just runtime data based on the node declaration.
We should really split the runtime data from bNodeTree sooner rather than later.