3 Commits

Author SHA1 Message Date
Jacques Lucke
2323bd2691 Refactor: Nodes: extract value inferencer construction
This extracts the construction of the `SocketValueInferencer` out of
`SocketUsageInferencer`. This leads to better separation of concerns and gives
the caller more flexibility. In the future, I especially want to get information
about which group input values were required to determine the usage of other
group inputs. This might help with caching the inferenced values.

Pull Request: https://projects.blender.org/blender/blender/pulls/147352
2025-10-04 15:18:24 +02:00
Jacques Lucke
c51eb5b233 Refactor: Nodes: improve InferenceValue abstraction to better support non-primitive values
Currently, `InferenceValue` contains either a primitive value or is in the
"unknown" state. Previously, all code had the assumption that when the value is
not unknown, it is a primitive value. However, that may not be true anymore when
we support inferencing through e.g. bundles and closures as those are not
"primitive". This assumption is removed now, non-primitive values have not been
added yet though.

Pull Request: https://projects.blender.org/blender/blender/pulls/145532
2025-09-01 22:42:57 +02:00
Jacques Lucke
d685fdbf99 Refactor: Nodes: extract socket value inferencer from usage inferencer
Value and usage inferencing can be done independently. Usage-inferencing uses
the value-inferencing but not the other way around. Extracting value-inferencing
makes the separation more clear and also simplifies potentially reusing the
value-inferencing code later on.

Pull Request: https://projects.blender.org/blender/blender/pulls/145492
2025-09-01 21:07:10 +02:00