CurvesPrimitive clients : Support WrapMode enum#6855
Conversation
| """ | ||
| When converting Pinned curves to NonPeriodic, adds the "phantom" vertices | ||
| so that the curves continue to interpolate to their original endpoints. | ||
| """, |
There was a problem hiding this comment.
The only thing this makes me wonder is whether it would make sense to have an expand option that affects the conversion from periodic to non-periodic ( either broadening the scope of this plug, or adding a second one ). I guess the practical answer is that while adding phantom vertices to periodic curve that has been converted to non-periodic is a mathematically very similar operation, it's far less likely that a user would have need of it.
There was a problem hiding this comment.
Yeah, I do think this would be a nice to have. I think the ideal might be to generalise it completely to a single preserveShape boolean, where we also adjust vertex positions to account for any change to the basis matrix. I had a request in with our resident maths expert to see what that would entail, but haven't heard back yet 😝.
I think all that can wait though - as you say, periodic curves don't seem to come up much.
Always use a map from value to name, so we don't repeat ourselves and don't allocate duplicates of the StringData.
In this case `PrimitiveEvaluator::create()` creates a CurvesPrimitiveEvaluator which stores a preprocessed primitive, and we need to make sure to use primitive variables from that rather than from the original primitive.
f6656d3 to
2c86aac
Compare
Treating OptionalValuePlug as a terminal is consistent with the way we treat NameValuePlug. With that done, promoting the documentation from the `value` plug fixes the test failure, but also makes the tooltip available more easily in the UI, without having to turn the `enabled` switch on.
Companion PR to ImageEngine/cortex#1526. This adds support for rendering pinned curves, and a new CurvesInterpolation node for changing the basis and wrap of existing curves.