UI: Rename Distort socket in the Lens Distortion compositing node #108234

Merged
Hans Goudey merged 1 commits from pioverfour/blender:dp_rename_distort_socket into main 2023-07-31 14:49:11 +02:00
2 changed files with 9 additions and 2 deletions

View File

@ -4521,5 +4521,12 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain)
}
}
}
FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
if (ntree->type == NTREE_COMPOSIT) {
version_node_socket_name(ntree, CMP_NODE_LENSDIST, "Distort", "Distortion");
}
}
FOREACH_NODETREE_END;
}
}

View File

@ -39,7 +39,7 @@ static void cmp_node_lensdist_declare(NodeDeclarationBuilder &b)
b.add_input<decl::Color>("Image")
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
.compositor_domain_priority(0);
b.add_input<decl::Float>("Distort")
b.add_input<decl::Float>("Distortion")
.default_value(0.0f)
.min(MINIMUM_DISTORTION)
.max(1.0f)
@ -159,7 +159,7 @@ class LensDistortionOperation : public NodeOperation {
float get_distortion()
{
const Result &input = get_input("Distort");
const Result &input = get_input("Distortion");
return clamp_f(input.get_float_value_default(0.0f), MINIMUM_DISTORTION, 1.0f);
}