TypedObjectPlugBinding : Add CompoundData->CompoundObject conversion #6029
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@danieldresser-ie, this is one possible approach to solving the DeadlineDispatcher userData problem reported on the Discord. I'm not sure how much I like it - see what you think...
This allows
CompoundObjectPlug.setValue( compoundData )
to work, meaning we can remove theattributesCompatibility.py
shim that was doing this manually for justAttributes.extraAttributes
.What I don't like about this is the mismatch between the C++ and Python APIs : it's still not possible to call
CompoundObjectPlug::setValue( CompoundData )
in C++. And that's also mismatched withCompoundObjectPlug::setFrom()
which is implemented to allow connections from CompoundDataPlug. Still, it seems like progress compared to the compatibility shim.The immediate motivation for this is that it's not currently possible to have
userDefault
metadata for a CompoundObjectPlug, because metadata values must all beData
. This allows the registation of a CompoundData value which is converted to a CompoundObject when applied to the plug.