Fix old files with changed node socket type not loading correctly.
This would lead to sock.default_value pointing to the wrong data type, possibly causing crashes. Unfortunately, this bug will still exist for older Blender versions that try to load newer files, which makes changing the type of a node socket problematic.
This commit is contained in:
@@ -446,6 +446,7 @@ struct bNodeSocket *nodeInsertStaticSocket(struct bNodeTree *ntree, struct bNode
|
||||
struct bNodeSocket *next_sock, const char *identifier, const char *name);
|
||||
void nodeRemoveSocket(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *sock);
|
||||
void nodeRemoveAllSockets(struct bNodeTree *ntree, struct bNode *node);
|
||||
void nodeModifySocketType(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *sock, int type, int subtype);
|
||||
|
||||
struct bNode *nodeAddNode(const struct bContext *C, struct bNodeTree *ntree, const char *idname);
|
||||
struct bNode *nodeAddStaticNode(const struct bContext *C, struct bNodeTree *ntree, int type);
|
||||
|
||||
Reference in New Issue
Block a user