Breaking Changes
Monkey Patching
Any code that monkey patched the execution model is likely to stop working. Note that the performance of execution with this PR exceeds that with the most popular monkey patches, so many of them will be unnecessary.Optional Input Validation
Prior to this PR, only nodes that were connected to outputs exclusively through a string of"required"
inputs were actually validated. If you had custom nodes that were only ever connected to "optional"
inputs, you previously wouldn’t have been seeing that they failed validation.
If your nodes’ outputs could already be connected to
"required"
inputs, it is unlikely that anything in this section applies to you. It will primarily apply to custom node authors who use custom types and exclusively use "optional"
inputs.-
Use of reserved Additional Parameters like
min
andmax
on types that aren’t comparable (e.g. dictionaries) in order to configure custom widgets.-
Change the additional parameters used to non-reserved keys like
uiMin
anduiMax
. (Recommended Solution) -
Define a custom VALIDATE_INPUTS function with this input so validation of it is skipped. (Quick Solution)
-
Change the additional parameters used to non-reserved keys like
-
Use of composite types (e.g.
CUSTOM_A,CUSTOM_B
)- (When used as output) Define and use a wrapper like
MakeSmartType
seen here in the PR’s unit tests - (When used as input) Define a customVALIDATE_INPUTS function that takes a
input_types
argument so type validation is skipped. - (Supports both, convenient) Define and use the
@VariantSupport
decorator seen here in the PR’s unit tests
- (When used as output) Define and use a wrapper like
-
The use of lists (e.g.
[1, 2, 3]
) as constants in the graph definition (e.g. to represent a constVEC3
input). This would have required a front-end extension before. Previously, lists of size exactly2
would have failed anyway — they would have been treated as broken links.- Wrap the lists in a dictionary like
{ "value": [1, 2, 3] }
- Wrap the lists in a dictionary like
Execution Order
Execution order has always changed depending on which nodes happen to have which IDs, but it may now change depending on which values are cached as well. In general, the execution order should be considered non-deterministic and subject to change (beyond what is enforced by the graph’s structure). Don’t rely on the execution order. HIC SUNT DRACONESNew Functionality
Validation Changes
A number of features were added to theVALIDATE_INPUTS
function in order to lessen the impact of the Optional Input Validation mentioned above.
- Default validation will now be skipped for inputs which are received by the
VALIDATE_INPUTS
function. - The
VALIDATE_INPUTS
function can now take**kwargs
which causes all inputs to be treated as validated by the node creator. - The
VALIDATE_INPUTS
function can take an input namedinput_types
. This input will be a dict mapping each input (connected via a link) to the type of the connected output. When this argument exists, type validation for the node’s inputs is skipped.