diff options
author | Hans Goudey <h.goudey@me.com> | 2022-11-11 04:14:48 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-11-11 04:41:13 +0300 |
commit | 9465b109af0b70244a36f9e68493e316d9f8b56f (patch) | |
tree | c4d933bf09f8313071556063156538ec3356b24c /source/blender/nodes/texture | |
parent | 026d21a225521670c6b5083da9da61227da69e65 (diff) | |
parent | ca1642cd0c5cdf634fe2022c955d93983de95934 (diff) |
Merge branch 'master' into refactor-mesh-position-genericrefactor-mesh-position-generic
Diffstat (limited to 'source/blender/nodes/texture')
25 files changed, 43 insertions, 39 deletions
diff --git a/source/blender/nodes/texture/nodes/node_texture_at.c b/source/blender/nodes/texture/nodes/node_texture_at.c index 74f279d65c7..e2e635b7d92 100644 --- a/source/blender/nodes/texture/nodes/node_texture_at.c +++ b/source/blender/nodes/texture/nodes/node_texture_at.c @@ -45,7 +45,7 @@ void register_node_type_tex_at(void) tex_node_type_base(&ntype, TEX_NODE_AT, "At", NODE_CLASS_DISTORT); node_type_socket_templates(&ntype, inputs, outputs); node_type_size(&ntype, 140, 100, 320); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_bricks.c b/source/blender/nodes/texture/nodes/node_texture_bricks.c index bfd43560c2d..b68bf4fcb8d 100644 --- a/source/blender/nodes/texture/nodes/node_texture_bricks.c +++ b/source/blender/nodes/texture/nodes/node_texture_bricks.c @@ -106,8 +106,8 @@ void register_node_type_tex_bricks(void) tex_node_type_base(&ntype, TEX_NODE_BRICKS, "Bricks", NODE_CLASS_PATTERN); node_type_socket_templates(&ntype, inputs, outputs); node_type_size_preset(&ntype, NODE_SIZE_MIDDLE); - node_type_init(&ntype, init); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.initfunc = init; + ntype.exec_fn = exec; ntype.flag |= NODE_PREVIEW; nodeRegisterType(&ntype); diff --git a/source/blender/nodes/texture/nodes/node_texture_checker.c b/source/blender/nodes/texture/nodes/node_texture_checker.c index 08f87cb7875..d66eb7e6953 100644 --- a/source/blender/nodes/texture/nodes/node_texture_checker.c +++ b/source/blender/nodes/texture/nodes/node_texture_checker.c @@ -56,7 +56,7 @@ void register_node_type_tex_checker(void) tex_node_type_base(&ntype, TEX_NODE_CHECKER, "Checker", NODE_CLASS_PATTERN); node_type_socket_templates(&ntype, inputs, outputs); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; ntype.flag |= NODE_PREVIEW; nodeRegisterType(&ntype); diff --git a/source/blender/nodes/texture/nodes/node_texture_combine_color.c b/source/blender/nodes/texture/nodes/node_texture_combine_color.c index 459553bc950..e6a8080bb48 100644 --- a/source/blender/nodes/texture/nodes/node_texture_combine_color.c +++ b/source/blender/nodes/texture/nodes/node_texture_combine_color.c @@ -69,8 +69,8 @@ void register_node_type_tex_combine_color(void) tex_node_type_base(&ntype, TEX_NODE_COMBINE_COLOR, "Combine Color", NODE_CLASS_OP_COLOR); node_type_socket_templates(&ntype, inputs, outputs); - node_type_exec(&ntype, NULL, NULL, exec); - node_type_update(&ntype, update); + ntype.exec_fn = exec; + ntype.updatefunc = update; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_common.c b/source/blender/nodes/texture/nodes/node_texture_common.c index 96345b00a82..8ff4ad61387 100644 --- a/source/blender/nodes/texture/nodes/node_texture_common.c +++ b/source/blender/nodes/texture/nodes/node_texture_common.c @@ -155,8 +155,10 @@ void register_node_type_tex_group(void) node_type_size(&ntype, 140, 60, 400); ntype.labelfunc = node_group_label; - node_type_group_update(&ntype, node_group_update); - node_type_exec(&ntype, group_initexec, group_freeexec, group_execute); + ntype.group_update_func = node_group_update; + ntype.init_exec_fn = group_initexec; + ntype.free_exec_fn = group_freeexec; + ntype.exec_fn = group_execute; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_compose.c b/source/blender/nodes/texture/nodes/node_texture_compose.c index e36bc248ed1..d41566be74c 100644 --- a/source/blender/nodes/texture/nodes/node_texture_compose.c +++ b/source/blender/nodes/texture/nodes/node_texture_compose.c @@ -45,7 +45,7 @@ void register_node_type_tex_compose(void) tex_node_type_base( &ntype, TEX_NODE_COMPOSE_LEGACY, "Combine RGBA (Legacy)", NODE_CLASS_OP_COLOR); node_type_socket_templates(&ntype, inputs, outputs); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_coord.c b/source/blender/nodes/texture/nodes/node_texture_coord.c index e74dfd378d9..1babea310f4 100644 --- a/source/blender/nodes/texture/nodes/node_texture_coord.c +++ b/source/blender/nodes/texture/nodes/node_texture_coord.c @@ -35,7 +35,7 @@ void register_node_type_tex_coord(void) tex_node_type_base(&ntype, TEX_NODE_COORD, "Coordinates", NODE_CLASS_INPUT); node_type_socket_templates(&ntype, NULL, outputs); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_curves.c b/source/blender/nodes/texture/nodes/node_texture_curves.c index dee4531746f..bdee2adb1ba 100644 --- a/source/blender/nodes/texture/nodes/node_texture_curves.c +++ b/source/blender/nodes/texture/nodes/node_texture_curves.c @@ -52,9 +52,10 @@ void register_node_type_tex_curve_time(void) tex_node_type_base(&ntype, TEX_NODE_CURVE_TIME, "Time", NODE_CLASS_INPUT); node_type_socket_templates(&ntype, NULL, time_outputs); node_type_size_preset(&ntype, NODE_SIZE_LARGE); - node_type_init(&ntype, time_init); + ntype.initfunc = time_init; node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); - node_type_exec(&ntype, node_initexec_curves, NULL, time_exec); + ntype.init_exec_fn = node_initexec_curves; + ntype.exec_fn = time_exec; nodeRegisterType(&ntype); } @@ -101,9 +102,10 @@ void register_node_type_tex_curve_rgb(void) tex_node_type_base(&ntype, TEX_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR); node_type_socket_templates(&ntype, rgb_inputs, rgb_outputs); node_type_size_preset(&ntype, NODE_SIZE_LARGE); - node_type_init(&ntype, rgb_init); + ntype.initfunc = rgb_init; node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); - node_type_exec(&ntype, node_initexec_curves, NULL, rgb_exec); + ntype.init_exec_fn = node_initexec_curves; + ntype.exec_fn = rgb_exec; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_decompose.c b/source/blender/nodes/texture/nodes/node_texture_decompose.c index 2d42fa4602e..ae7e80a6aab 100644 --- a/source/blender/nodes/texture/nodes/node_texture_decompose.c +++ b/source/blender/nodes/texture/nodes/node_texture_decompose.c @@ -64,7 +64,7 @@ void register_node_type_tex_decompose(void) tex_node_type_base(&ntype, TEX_NODE_DECOMPOSE_LEGACY, "Separate RGBA", NODE_CLASS_OP_COLOR); node_type_socket_templates(&ntype, inputs, outputs); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_distance.c b/source/blender/nodes/texture/nodes/node_texture_distance.c index e236b6743a6..19918a9896e 100644 --- a/source/blender/nodes/texture/nodes/node_texture_distance.c +++ b/source/blender/nodes/texture/nodes/node_texture_distance.c @@ -46,7 +46,7 @@ void register_node_type_tex_distance(void) tex_node_type_base(&ntype, TEX_NODE_DISTANCE, "Distance", NODE_CLASS_CONVERTER); node_type_socket_templates(&ntype, inputs, outputs); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c index 989d94953f7..454b58f4665 100644 --- a/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c +++ b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c @@ -94,7 +94,7 @@ void register_node_type_tex_hue_sat(void) tex_node_type_base(&ntype, TEX_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR); node_type_socket_templates(&ntype, inputs, outputs); node_type_size_preset(&ntype, NODE_SIZE_MIDDLE); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_image.c b/source/blender/nodes/texture/nodes/node_texture_image.c index e94c78b41ea..8b859421762 100644 --- a/source/blender/nodes/texture/nodes/node_texture_image.c +++ b/source/blender/nodes/texture/nodes/node_texture_image.c @@ -94,9 +94,9 @@ void register_node_type_tex_image(void) tex_node_type_base(&ntype, TEX_NODE_IMAGE, "Image", NODE_CLASS_INPUT); node_type_socket_templates(&ntype, NULL, outputs); - node_type_init(&ntype, init); + ntype.initfunc = init; node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; ntype.labelfunc = node_image_label; ntype.flag |= NODE_PREVIEW; diff --git a/source/blender/nodes/texture/nodes/node_texture_invert.c b/source/blender/nodes/texture/nodes/node_texture_invert.c index 6343f5f2caa..526d47bef9c 100644 --- a/source/blender/nodes/texture/nodes/node_texture_invert.c +++ b/source/blender/nodes/texture/nodes/node_texture_invert.c @@ -49,7 +49,7 @@ void register_node_type_tex_invert(void) tex_node_type_base(&ntype, TEX_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR); node_type_socket_templates(&ntype, inputs, outputs); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_math.c b/source/blender/nodes/texture/nodes/node_texture_math.c index 5867d6b91e1..505ba51b4d8 100644 --- a/source/blender/nodes/texture/nodes/node_texture_math.c +++ b/source/blender/nodes/texture/nodes/node_texture_math.c @@ -322,8 +322,8 @@ void register_node_type_tex_math(void) tex_node_type_base(&ntype, TEX_NODE_MATH, "Math", NODE_CLASS_CONVERTER); node_type_socket_templates(&ntype, inputs, outputs); ntype.labelfunc = node_math_label; - node_type_exec(&ntype, NULL, NULL, exec); - node_type_update(&ntype, node_math_update); + ntype.exec_fn = exec; + ntype.updatefunc = node_math_update; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c index cd6b54c4cf8..15ca2280fe1 100644 --- a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c +++ b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c @@ -56,7 +56,7 @@ void register_node_type_tex_mix_rgb(void) tex_node_type_base(&ntype, TEX_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR); node_type_socket_templates(&ntype, inputs, outputs); ntype.labelfunc = node_blend_label; - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_output.c b/source/blender/nodes/texture/nodes/node_texture_output.c index b300ba9ef77..b640880ba9b 100644 --- a/source/blender/nodes/texture/nodes/node_texture_output.c +++ b/source/blender/nodes/texture/nodes/node_texture_output.c @@ -83,7 +83,7 @@ static void unique_name(bNode *node) BLI_strncpy(new_name, name, sizeof(tno->name)); name = new_name; } - sprintf(new_name + new_len - 4, ".%03d", ++suffix); + BLI_sprintf(new_name + new_len - 4, ".%03d", ++suffix); } if (new_name[0] != '\0') { @@ -138,9 +138,9 @@ void register_node_type_tex_output(void) tex_node_type_base(&ntype, TEX_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT); node_type_socket_templates(&ntype, inputs, NULL); node_type_size_preset(&ntype, NODE_SIZE_MIDDLE); - node_type_init(&ntype, init); + ntype.initfunc = init; node_type_storage(&ntype, "TexNodeOutput", node_free_standard_storage, copy); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; ntype.flag |= NODE_PREVIEW; ntype.no_muting = true; diff --git a/source/blender/nodes/texture/nodes/node_texture_proc.c b/source/blender/nodes/texture/nodes/node_texture_proc.c index d925c9f3554..f23c4f55820 100644 --- a/source/blender/nodes/texture/nodes/node_texture_proc.c +++ b/source/blender/nodes/texture/nodes/node_texture_proc.c @@ -254,9 +254,9 @@ static void init(bNodeTree *UNUSED(ntree), bNode *node) tex_node_type_base(&ntype, TEX_NODE_PROC + TEXTYPE, Name, NODE_CLASS_TEXTURE); \ node_type_socket_templates(&ntype, name##_inputs, outputs); \ node_type_size_preset(&ntype, NODE_SIZE_MIDDLE); \ - node_type_init(&ntype, init); \ + ntype.initfunc = init; \ node_type_storage(&ntype, "Tex", node_free_standard_storage, node_copy_standard_storage); \ - node_type_exec(&ntype, NULL, NULL, name##_exec); \ + ntype.exec_fn = name##_exec; \ ntype.flag |= NODE_PREVIEW; \ \ nodeRegisterType(&ntype); \ diff --git a/source/blender/nodes/texture/nodes/node_texture_rotate.c b/source/blender/nodes/texture/nodes/node_texture_rotate.c index 0bd2de76a9c..b31adefcbba 100644 --- a/source/blender/nodes/texture/nodes/node_texture_rotate.c +++ b/source/blender/nodes/texture/nodes/node_texture_rotate.c @@ -81,7 +81,7 @@ void register_node_type_tex_rotate(void) tex_node_type_base(&ntype, TEX_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT); node_type_socket_templates(&ntype, inputs, outputs); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_scale.c b/source/blender/nodes/texture/nodes/node_texture_scale.c index d565146cf09..93a4db7677c 100644 --- a/source/blender/nodes/texture/nodes/node_texture_scale.c +++ b/source/blender/nodes/texture/nodes/node_texture_scale.c @@ -54,7 +54,7 @@ void register_node_type_tex_scale(void) tex_node_type_base(&ntype, TEX_NODE_SCALE, "Scale", NODE_CLASS_DISTORT); node_type_socket_templates(&ntype, inputs, outputs); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_separate_color.c b/source/blender/nodes/texture/nodes/node_texture_separate_color.c index a482a3f3421..030f7d79043 100644 --- a/source/blender/nodes/texture/nodes/node_texture_separate_color.c +++ b/source/blender/nodes/texture/nodes/node_texture_separate_color.c @@ -95,8 +95,8 @@ void register_node_type_tex_separate_color(void) tex_node_type_base(&ntype, TEX_NODE_SEPARATE_COLOR, "Separate Color", NODE_CLASS_OP_COLOR); node_type_socket_templates(&ntype, inputs, outputs); - node_type_exec(&ntype, NULL, NULL, exec); - node_type_update(&ntype, update); + ntype.exec_fn = exec; + ntype.updatefunc = update; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_texture.c b/source/blender/nodes/texture/nodes/node_texture_texture.c index 79cd8bbb1df..163a6516a58 100644 --- a/source/blender/nodes/texture/nodes/node_texture_texture.c +++ b/source/blender/nodes/texture/nodes/node_texture_texture.c @@ -78,7 +78,7 @@ void register_node_type_tex_texture(void) tex_node_type_base(&ntype, TEX_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT); node_type_socket_templates(&ntype, inputs, outputs); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; ntype.flag |= NODE_PREVIEW; nodeRegisterType(&ntype); diff --git a/source/blender/nodes/texture/nodes/node_texture_translate.c b/source/blender/nodes/texture/nodes/node_texture_translate.c index 7ce7722938d..a8c12116097 100644 --- a/source/blender/nodes/texture/nodes/node_texture_translate.c +++ b/source/blender/nodes/texture/nodes/node_texture_translate.c @@ -50,7 +50,7 @@ void register_node_type_tex_translate(void) tex_node_type_base(&ntype, TEX_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT); node_type_socket_templates(&ntype, inputs, outputs); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_valToNor.c b/source/blender/nodes/texture/nodes/node_texture_valToNor.c index 492aadf3281..d0fc5229e06 100644 --- a/source/blender/nodes/texture/nodes/node_texture_valToNor.c +++ b/source/blender/nodes/texture/nodes/node_texture_valToNor.c @@ -66,7 +66,7 @@ void register_node_type_tex_valtonor(void) tex_node_type_base(&ntype, TEX_NODE_VALTONOR, "Value to Normal", NODE_CLASS_CONVERTER); node_type_socket_templates(&ntype, inputs, outputs); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c index e41e83555fc..b2acef407e2 100644 --- a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c +++ b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c @@ -50,9 +50,9 @@ void register_node_type_tex_valtorgb(void) tex_node_type_base(&ntype, TEX_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTER); node_type_socket_templates(&ntype, valtorgb_in, valtorgb_out); node_type_size_preset(&ntype, NODE_SIZE_LARGE); - node_type_init(&ntype, valtorgb_init); + ntype.initfunc = valtorgb_init; node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, NULL, NULL, valtorgb_exec); + ntype.exec_fn = valtorgb_exec; nodeRegisterType(&ntype); } @@ -91,7 +91,7 @@ void register_node_type_tex_rgbtobw(void) tex_node_type_base(&ntype, TEX_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTER); node_type_socket_templates(&ntype, rgbtobw_in, rgbtobw_out); - node_type_exec(&ntype, NULL, NULL, rgbtobw_exec); + ntype.exec_fn = rgbtobw_exec; nodeRegisterType(&ntype); } diff --git a/source/blender/nodes/texture/nodes/node_texture_viewer.c b/source/blender/nodes/texture/nodes/node_texture_viewer.c index 72da751f8ef..1f31d62ed38 100644 --- a/source/blender/nodes/texture/nodes/node_texture_viewer.c +++ b/source/blender/nodes/texture/nodes/node_texture_viewer.c @@ -38,7 +38,7 @@ void register_node_type_tex_viewer(void) tex_node_type_base(&ntype, TEX_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT); node_type_socket_templates(&ntype, inputs, NULL); - node_type_exec(&ntype, NULL, NULL, exec); + ntype.exec_fn = exec; ntype.no_muting = true; ntype.flag |= NODE_PREVIEW; |