Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2012-01-21 15:15:01 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-01-21 15:15:01 +0400
commit2c9f5f1f7c6153db67d892d09946fbb2455f4c73 (patch)
tree3a581c04e7816a3e3e10242c6f270dfc46bc519e /source
parentc5d7f8e4169543ccfaad51002e69ebc896f61e3e (diff)
Added DNA_DEPRECATED attribute to some old data in bNodeSocket. DNA_DEPRECATED is disabled in writefile.c now to allow forward compatibility code writing to deprecated member data.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/writefile.c5
-rw-r--r--source/blender/makesdna/DNA_node_types.h10
2 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 1231a076502..ae4bc936193 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -89,6 +89,9 @@ Any case: direct data is ALWAYS after the lib block
#include "BLI_winstuff.h"
#endif
+/* allow writefile to use deprecated functionality (for forward compatibility code) */
+#define DNA_DEPRECATED_ALLOW
+
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_actuator_types.h"
@@ -653,7 +656,7 @@ static void write_node_socket(WriteData *wd, bNodeSocket *sock)
/* forward compatibility code, so older blenders still open */
sock->stack_type = 1;
-
+
if(sock->default_value) {
bNodeSocketValueFloat *valfloat;
bNodeSocketValueVector *valvector;
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index fe4f6905f42..4a3e5b2ca0c 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -85,19 +85,21 @@ typedef struct bNodeSocket {
/* execution data */
short stack_index; /* local stack index */
- short stack_type; /* deprecated, kept for forward compatibility */
+ /* XXX deprecated, kept for forward compatibility */
+ short stack_type DNA_DEPRECATED;
int pad3;
void *cache; /* cached data from execution */
/* internal data to retrieve relations and groups */
int own_index; /* group socket identifiers, to find matching pairs after reading files */
- int to_index DNA_DEPRECATED; /* XXX deprecated, only used for restoring old group node links */
+ /* XXX deprecated, only used for restoring old group node links */
+ int to_index DNA_DEPRECATED;
struct bNodeSocket *groupsock;
struct bNodeLink *link; /* a link pointer, set in ntreeUpdateTree */
- /* DEPRECATED only needed for do_versions */
- bNodeStack ns; /* custom data for inputs, only UI writes in this */
+ /* XXX deprecated, socket input values are stored in default_value now. kept for forward compatibility */
+ bNodeStack ns DNA_DEPRECATED; /* custom data for inputs, only UI writes in this */
} bNodeSocket;
/* sock->type */