diff options
author | Jacques Lucke <jacques@blender.org> | 2020-03-06 15:29:58 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-03-06 15:31:15 +0300 |
commit | 50d5050e9c4561d6528a2ac18ad3fbbaa9df6576 (patch) | |
tree | 045c57b22d09f034509cacf4ea737bfd2a7e5df4 /release | |
parent | 63bb2007d88b88824094447a745fa21d5fb2f61b (diff) |
Nodes: fix writing socket default values to file
Previously, `writedata` was used to store `bNodeSocket->default_value`.
There are a couple of issues with that:
* Breaks if someone tries to load the file on a big endian system (afaik).
* There is a `/* do not use for structs */` comment on `writedata`.
* Depends on `MEM_allocN_len` which should be avoided in my opinion.
* Now it is more apparent, that this should be handled by callbacks as well.
The part in `readfile.c` should work just fine still. I could also do a case
distinction there, but the code would be the same for every case for now.
Just `sock->default_value = newdataadr(fd, sock->default_value);`.
This might change, if we want to store more complex socket type specific data
that does not fit into a single struct.
Differential Revision: https://developer.blender.org/D7039
Reviewers: brecht
Diffstat (limited to 'release')
0 files changed, 0 insertions, 0 deletions