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
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2011-02-21 21:18:37 +0300
committerLukas Toenne <lukas.toenne@googlemail.com>2011-02-21 21:18:37 +0300
commit4fb730d6d0f20db2d35b36237d5778a40bdec076 (patch)
treea6c92e6f77f19b7cd78e26d40028e80b3672ee3d /source/blender/makesdna
parent33887fa41dcc010a8543e8bc78d1b2de23fcd099 (diff)
Fixed do_versions for node groups which contain nodes that have changed sockets. do_versions is running before the lib_verify_nodetree function updates socket lists of nodes. This means that when adding unlinked sockets in do_versions to restore older node groups, the new sockets are not taken into account. To fix this a temporary node tree flag has been introduced, which delays actual group socket do_version until the group tree internal nodes have been updated. After that the unlinked group sockets are exposed (like old node groups did), then the external sockets look up the new index, so that external links to group instances are preserved.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_node_types.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 0a4c672273b..803e5418bcc 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -81,7 +81,7 @@ typedef struct bNodeSocket {
*/
struct bNodeStack *stack_ptr; /* constant input value */
short stack_index; /* local stack index or external input number */
- short pad;
+ short pad1;
float locx, locy;
@@ -89,6 +89,8 @@ typedef struct bNodeSocket {
int own_index; /* group socket identifiers, to find matching pairs after reading files */
struct bNodeSocket *groupsock;
+ int to_index; /* XXX deprecated, only used for restoring old group node links */
+ int pad2;
struct bNodeLink *link; /* a link pointer, set in nodeSolveOrder() */
} bNodeSocket;
@@ -218,8 +220,11 @@ typedef struct bNodeTree {
#define NTREE_EXEC_INIT 2
/* ntree->flag */
-#define NTREE_DS_EXPAND 1 /* for animation editors */
-#define NTREE_AUTO_EXPOSE 2 /* automatically make unhidden, unlinked group sockets external */
+#define NTREE_DS_EXPAND 1 /* for animation editors */
+/* XXX not nice, but needed as a temporary flag
+ * for group updates after library linking.
+ */
+#define NTREE_DO_VERSIONS 1024
/* data structs, for node->storage */