Fix T46619: Levels node becomes Undefined
authorCampbell Barton <ideasman42@gmail.com>
Thu, 29 Oct 2015 23:49:22 +0000 (10:49 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 29 Oct 2015 23:57:02 +0000 (10:57 +1100)
regression caused by 79c345ac

source/blender/blenkernel/intern/node.c
source/blender/nodes/composite/nodes/node_composite_levels.c

index d3460dcb4816eae77b2e6972a55adda5254200df..68d9609e0697c44a670f0f472099ef07fd618e56 100644 (file)
@@ -3424,6 +3424,10 @@ void node_type_size_preset(struct bNodeType *ntype, eNodeSizePreset size)
        }
 }
 
+/**
+ * \warning Nodes defining a storage type _must_ allocate this for new nodes.
+ * Otherwise nodes will reload as undefined (T46619).
+ */
 void node_type_storage(bNodeType *ntype,
        const char *storagename,
        void (*freefunc)(struct bNode *node),
index ffee10528ee9e01ac6f1cb05bbd1b7523632cbda..65e5b2fedf1da11401853ee068d2eaa9ddec1184 100644 (file)
@@ -57,7 +57,6 @@ void register_node_type_cmp_view_levels(void)
        cmp_node_type_base(&ntype, CMP_NODE_VIEW_LEVELS, "Levels", NODE_CLASS_OUTPUT, NODE_PREVIEW);
        node_type_socket_templates(&ntype, cmp_node_view_levels_in, cmp_node_view_levels_out);
        node_type_init(&ntype, node_composit_init_view_levels);
-       node_type_storage(&ntype, "ImageUser", NULL, NULL);
 
        nodeRegisterType(&ntype);
 }