Cleanup: Use const argument, rename variables

The const argument makes sense because these are the "source"
sockets, even though a const cast is necessary at one point.
The name "interface_socket" is an improvement over "stemp"
because the latter sounds like "temporary", or it confuses
the old socket template system with a node group's interface.
This commit is contained in:
2021-12-10 14:54:32 -06:00
parent 7c2fb00e66
commit a8b730e04c
4 changed files with 47 additions and 34 deletions

View File

@@ -164,20 +164,20 @@ typedef struct bNodeSocketType {
void (*interface_draw)(struct bContext *C, struct uiLayout *layout, struct PointerRNA *ptr);
void (*interface_draw_color)(struct bContext *C, struct PointerRNA *ptr, float *r_color);
void (*interface_register_properties)(struct bNodeTree *ntree,
struct bNodeSocket *stemp,
struct bNodeSocket *interface_socket,
struct StructRNA *data_srna);
void (*interface_init_socket)(struct bNodeTree *ntree,
struct bNodeSocket *stemp,
const struct bNodeSocket *interface_socket,
struct bNode *node,
struct bNodeSocket *sock,
const char *data_path);
void (*interface_verify_socket)(struct bNodeTree *ntree,
struct bNodeSocket *stemp,
const struct bNodeSocket *interface_socket,
struct bNode *node,
struct bNodeSocket *sock,
const char *data_path);
void (*interface_from_socket)(struct bNodeTree *ntree,
struct bNodeSocket *stemp,
struct bNodeSocket *interface_socket,
struct bNode *node,
struct bNodeSocket *sock);