diff options
author | Hans Goudey <h.goudey@me.com> | 2021-12-29 03:25:02 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-29 03:25:18 +0300 |
commit | c34ea3323a3aa4b9a08cf5c67c8a8b4a3056bae1 (patch) | |
tree | b20c351abc030e9e1acaac0de74650f08baaec4f /source/blender | |
parent | 7006d4f0fb7802e4859c1bb7f081aa4b54bb6765 (diff) |
Cleanup: Remove unused node tree "local sync" functions
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 9 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/node.cc | 43 | ||||
-rw-r--r-- | source/blender/nodes/composite/node_composite_tree.cc | 6 |
3 files changed, 0 insertions, 58 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 5c35ff69233..db3018b496d 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -414,7 +414,6 @@ typedef struct bNodeTreeType { /* calls allowing threaded composite */ void (*localize)(struct bNodeTree *localtree, struct bNodeTree *ntree); - void (*local_sync)(struct bNodeTree *localtree, struct bNodeTree *ntree); void (*local_merge)(struct Main *bmain, struct bNodeTree *localtree, struct bNodeTree *ntree); /* Tree update. Overrides `nodetype->updatetreefunc` ! */ @@ -525,13 +524,6 @@ void ntreeNodeFlagSet(const bNodeTree *ntree, const int flag, const bool enable) */ struct bNodeTree *ntreeLocalize(struct bNodeTree *ntree); /** - * Sync local composite with real tree. - * The local tree is supposed to be running, be careful moving previews! - * - * Is called by jobs manager, outside threads, so it doesn't happen during draw. - */ -void ntreeLocalSync(struct bNodeTree *localtree, struct bNodeTree *ntree); -/** * Merge local tree results back, and free local tree. * * We have to assume the editor already changed completely. @@ -954,7 +946,6 @@ void BKE_node_preview_remove_unused(struct bNodeTree *ntree); void BKE_node_preview_clear(struct bNodePreview *preview); void BKE_node_preview_clear_tree(struct bNodeTree *ntree); -void BKE_node_preview_sync_tree(struct bNodeTree *to_ntree, struct bNodeTree *from_ntree); void BKE_node_preview_merge_tree(struct bNodeTree *to_ntree, struct bNodeTree *from_ntree, bool remove_old); diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index 9975d4022c5..fb7e4e4c3be 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -2899,40 +2899,6 @@ void BKE_node_preview_clear_tree(bNodeTree *ntree) } } -static void node_preview_sync(bNodePreview *to, bNodePreview *from) -{ - /* sizes should have been initialized by BKE_node_preview_init_tree */ - BLI_assert(to->xsize == from->xsize && to->ysize == from->ysize); - - /* copy over contents of previews */ - if (to->rect && from->rect) { - int xsize = to->xsize; - int ysize = to->ysize; - memcpy(to->rect, from->rect, xsize * ysize * sizeof(char[4])); - } -} - -void BKE_node_preview_sync_tree(bNodeTree *to_ntree, bNodeTree *from_ntree) -{ - bNodeInstanceHash *from_previews = from_ntree->previews; - bNodeInstanceHash *to_previews = to_ntree->previews; - - if (!from_previews || !to_previews) { - return; - } - - bNodeInstanceHashIterator iter; - NODE_INSTANCE_HASH_ITER (iter, from_previews) { - bNodeInstanceKey key = BKE_node_instance_hash_iterator_get_key(&iter); - bNodePreview *from = (bNodePreview *)BKE_node_instance_hash_iterator_get_value(&iter); - bNodePreview *to = (bNodePreview *)BKE_node_instance_hash_lookup(to_previews, key); - - if (from && to) { - node_preview_sync(to, from); - } - } -} - void BKE_node_preview_merge_tree(bNodeTree *to_ntree, bNodeTree *from_ntree, bool remove_old) { if (remove_old || !to_ntree->previews) { @@ -3341,15 +3307,6 @@ bNodeTree *ntreeLocalize(bNodeTree *ntree) return ltree; } -void ntreeLocalSync(bNodeTree *localtree, bNodeTree *ntree) -{ - if (localtree && ntree) { - if (ntree->typeinfo->local_sync) { - ntree->typeinfo->local_sync(localtree, ntree); - } - } -} - void ntreeLocalMerge(Main *bmain, bNodeTree *localtree, bNodeTree *ntree) { if (ntree && localtree) { diff --git a/source/blender/nodes/composite/node_composite_tree.cc b/source/blender/nodes/composite/node_composite_tree.cc index 8de9b851c43..08dbd4ad6f0 100644 --- a/source/blender/nodes/composite/node_composite_tree.cc +++ b/source/blender/nodes/composite/node_composite_tree.cc @@ -125,11 +125,6 @@ static void localize(bNodeTree *localtree, bNodeTree *ntree) } } -static void local_sync(bNodeTree *localtree, bNodeTree *ntree) -{ - BKE_node_preview_sync_tree(ntree, localtree); -} - static void local_merge(Main *bmain, bNodeTree *localtree, bNodeTree *ntree) { bNode *lnode; @@ -210,7 +205,6 @@ void register_node_tree_type_cmp() tt->free_node_cache = free_node_cache; tt->foreach_nodeclass = foreach_nodeclass; tt->localize = localize; - tt->local_sync = local_sync; tt->local_merge = local_merge; tt->update = update; tt->get_from_context = composite_get_from_context; |