-
Notifications
You must be signed in to change notification settings - Fork 6
Propagate traits to sources/inputs #451
Description
Some traits, such as the caching, need to be propagated to Compositor sources, Algorithm inputs, or the Interpolator source. Currently, nodes handle this individually and incompletely.
We will use a tag, such as sync or propagate, to mark which traits need to be propagated.
tl.bool(cache_ctrl).tag(propagate=True)
We discussed propagating these tagged traits at eval time if possible, ideally in Node.eval or in the various _eval methods if necessary. Note that Compositor sources are often instantiated as needed in different ways, so we need to make sure those cases are covered.
We also discussed specifying not just that a trait needs to be propagated, but where it needs to be propagated to for fine-grained control.
tl.bool(cache_ctrl).tag(propagate='sources')
tl.bool(cache_output).tag(propagate=['a', 'b'])
Traits should only propagate if it exists but has not been defined in the target node.