diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-12-22 15:07:46 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-12-22 15:07:46 +0300 |
commit | 74138fb2d4ac9f0504c8f9f575bf392b49fc7488 (patch) | |
tree | c383efca92710d0a4b3ffce5ad74ac7758f64ce8 /source/blender/nodes/texture | |
parent | 2529300f691109b9575ea75ae8367209751c3738 (diff) | |
parent | d2bf60cc17a961789d7c415fc3d2af14afa50f62 (diff) |
Merge branch 'master' into temp-abc-features
Diffstat (limited to 'source/blender/nodes/texture')
5 files changed, 2 insertions, 42 deletions
diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c index 14597050524..1125936aded 100644 --- a/source/blender/nodes/texture/node_texture_tree.c +++ b/source/blender/nodes/texture/node_texture_tree.c @@ -132,24 +132,9 @@ static void localize(bNodeTree *UNUSED(localtree), bNodeTree *UNUSED(ntree)) } #endif -static void local_sync(bNodeTree *localtree, bNodeTree *ntree) -{ - BKE_node_preview_sync_tree(ntree, localtree); -} - -static void local_merge(Main *UNUSED(bmain), bNodeTree *localtree, bNodeTree *ntree) -{ - BKE_node_preview_merge_tree(ntree, localtree, true); -} - static void update(bNodeTree *ntree) { ntree_update_reroute_nodes(ntree); - - if (ntree->update & NTREE_UPDATE_NODES) { - /* clean up preview cache, in case nodes have been removed */ - BKE_node_preview_remove_unused(ntree); - } } static bool texture_node_tree_socket_type_valid(bNodeTreeType *UNUSED(ntreetype), @@ -175,8 +160,6 @@ void register_node_tree_type_tex(void) tt->foreach_nodeclass = foreach_nodeclass; tt->update = update; tt->localize = localize; - tt->local_sync = local_sync; - tt->local_merge = local_merge; tt->get_from_context = texture_get_from_context; tt->valid_socket_type = texture_node_tree_socket_type_valid; diff --git a/source/blender/nodes/texture/node_texture_util.c b/source/blender/nodes/texture/node_texture_util.c index fe8e68bfc42..1ba693bf4a4 100644 --- a/source/blender/nodes/texture/node_texture_util.c +++ b/source/blender/nodes/texture/node_texture_util.c @@ -63,10 +63,6 @@ static void tex_call_delegate(TexDelegate *dg, float *out, TexParams *params, sh { if (dg->node->need_exec) { dg->fn(out, params, dg->node, dg->in, thread); - - if (dg->cdata->do_preview) { - tex_do_preview(dg->preview, params->previewco, out, dg->cdata->do_manage); - } } } @@ -123,19 +119,6 @@ void params_from_cdata(TexParams *out, TexCallData *in) out->mtex = in->mtex; } -void tex_do_preview(bNodePreview *preview, - const float coord[2], - const float col[4], - bool do_manage) -{ - if (preview) { - int xs = ((coord[0] + 1.0f) * 0.5f) * preview->xsize; - int ys = ((coord[1] + 1.0f) * 0.5f) * preview->ysize; - - BKE_node_preview_set_pixel(preview, col, xs, ys, do_manage); - } -} - void tex_output(bNode *node, bNodeExecData *execdata, bNodeStack **in, diff --git a/source/blender/nodes/texture/node_texture_util.h b/source/blender/nodes/texture/node_texture_util.h index 84d2c5c903a..473cef81359 100644 --- a/source/blender/nodes/texture/node_texture_util.h +++ b/source/blender/nodes/texture/node_texture_util.h @@ -121,10 +121,6 @@ void tex_output(bNode *node, bNodeStack *out, TexFn texfn, TexCallData *data); -void tex_do_preview(bNodePreview *preview, - const float coord[2], - const float col[4], - bool do_manage); void params_from_cdata(TexParams *out, TexCallData *in); diff --git a/source/blender/nodes/texture/nodes/node_texture_output.c b/source/blender/nodes/texture/nodes/node_texture_output.c index 19e24c9f82a..50f41239581 100644 --- a/source/blender/nodes/texture/nodes/node_texture_output.c +++ b/source/blender/nodes/texture/nodes/node_texture_output.c @@ -37,7 +37,7 @@ static bNodeSocketTemplate inputs[] = { static void exec(void *data, int UNUSED(thread), bNode *node, - bNodeExecData *execdata, + bNodeExecData *UNUSED(execdata), bNodeStack **in, bNodeStack **UNUSED(out)) { @@ -54,7 +54,6 @@ static void exec(void *data, else { tex_input_rgba(&target->tr, in[0], ¶ms, cdata->thread); } - tex_do_preview(execdata->preview, params.co, &target->tr, cdata->do_manage); } else { /* 0 means don't care, so just use first */ diff --git a/source/blender/nodes/texture/nodes/node_texture_viewer.c b/source/blender/nodes/texture/nodes/node_texture_viewer.c index 18b11b86d6f..1c22561bec4 100644 --- a/source/blender/nodes/texture/nodes/node_texture_viewer.c +++ b/source/blender/nodes/texture/nodes/node_texture_viewer.c @@ -36,7 +36,7 @@ static bNodeSocketTemplate outputs[] = { static void exec(void *data, int UNUSED(thread), bNode *UNUSED(node), - bNodeExecData *execdata, + bNodeExecData *UNUSED(execdata), bNodeStack **in, bNodeStack **UNUSED(out)) { @@ -48,7 +48,6 @@ static void exec(void *data, params_from_cdata(¶ms, cdata); tex_input_rgba(col, in[0], ¶ms, cdata->thread); - tex_do_preview(execdata->preview, params.previewco, col, cdata->do_manage); } } |