Nodes: Add Factor and Percentage subtypes for vector sockets

This patch adds support for the Factor and Percentage subtypes for
vector sockets. This is needed by the compositor, since it has some node
inputs that specify locations and sizes relative to image size, and
having factor and percentage subtypes for those improves the UX quite a
bit according to user feedback.

Pull Request: https://projects.blender.org/blender/blender/pulls/138805
This commit is contained in:
Omar Emara
2025-05-15 08:29:41 +02:00
committed by Omar Emara
parent 1a7b53ec0b
commit 79d37720de
6 changed files with 29 additions and 1 deletions

View File

@@ -48,6 +48,8 @@ subtype_idname = {
("BOOLEAN", "NONE"): "NodeSocketBool",
("ROTATION", "NONE"): "NodeSocketRotation",
("VECTOR", "NONE"): "NodeSocketVector",
("VECTOR", "FACTOR"): "NodeSocketVectorFactor",
("VECTOR", "PERCENTAGE"): "NodeSocketVectorPercentage",
("VECTOR", "TRANSLATION"): "NodeSocketVectorTranslation",
("VECTOR", "DIRECTION"): "NodeSocketVectorDirection",
("VECTOR", "VELOCITY"): "NodeSocketVectorVelocity",