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:
authorMiguel Porces <cmporces>2019-03-16 20:54:00 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-16 22:21:16 +0300
commit5797a5fc65c87b69460d910a82d219b5e3ea12ad (patch)
tree98ffac5a6ad2904d916987720460765b763d2e50 /source/blender/blenkernel/BKE_node.h
parentb9af4efe41712680d554a389d771e83c66fce5c4 (diff)
Fix ID user counting issues with NodeCustomGroup.
User counting now happens before init() and after free() methods, so that the ID users are in a valid state when Python might modify them. ID user counting was moved into node.c and simplified. Patch by Miguel with further refactoring by Brecht. Ref D4370.
Diffstat (limited to 'source/blender/blenkernel/BKE_node.h')
-rw-r--r--source/blender/blenkernel/BKE_node.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 6e6ec31aa6a..951962d26f1 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -337,6 +337,7 @@ void ntreeUserDecrefID(struct bNodeTree *ntree);
struct bNodeTree *ntreeFromID(const struct ID *id);
void ntreeMakeLocal(struct Main *bmain, struct bNodeTree *ntree, bool id_in_mainlist, const bool lib_local);
+void ntreeFreeLocalNode(struct bNodeTree *ntree, struct bNode *node);
void ntreeFreeLocalTree(struct bNodeTree *ntree);
struct bNode *ntreeFindType(const struct bNodeTree *ntree, int type);
bool ntreeHasType(const struct bNodeTree *ntree, int type);
@@ -445,10 +446,8 @@ struct bNode *nodeAddStaticNode(const struct bContext *C, struct bNodeTree *ntre
void nodeUnlinkNode(struct bNodeTree *ntree, struct bNode *node);
void nodeUniqueName(struct bNodeTree *ntree, struct bNode *node);
-/* Frees the node itself, without affect to anything else. */
-void nodeFreeNode(struct bNodeTree *ntree, struct bNode *node);
-/* Will additionally cleanup things like f-curves which uses this node. */
-void nodeDeleteNode(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node);
+/* Delete node, associated animation data and ID user count. */
+void nodeRemoveNode(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node, bool do_id_user);
struct bNode *BKE_node_copy_ex(struct bNodeTree *ntree, struct bNode *node_src, const int flag);
@@ -502,6 +501,7 @@ void ntreeTagUsedSockets(struct bNodeTree *ntree);
/* Node Clipboard */
void BKE_node_clipboard_init(struct bNodeTree *ntree);
void BKE_node_clipboard_clear(void);
+void BKE_node_clipboard_free(void);
bool BKE_node_clipboard_validate(void);
void BKE_node_clipboard_add_node(struct bNode *node);
void BKE_node_clipboard_add_link(struct bNodeLink *link);