Using Falloff with custom deformer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello folks,
I've been dipping my toes more into the C++ API the last couple of months, and I'm pretty keen on adding support for the new features in Maya. I realized that the iterators works nicely with component tags, so that was super easy, but I'm having more issue with using a falloff input.
I've been looking at the example falloff code, but I'm not really understanding how I could use it in my deform function and I'm not really getting it. From what I can see I need to use a MFalloffContext to actually extract the values. In the example this is done as part of the Return of the SmoothFalloff class, but the output is just falloff data.
And I can't seem to create an MFalloffContext outside of the class return. How would I go about extracting the float array, but having it in my deform/compute so that I could use it with the rest of my code?
I find it a bit weird to include an example of using the falloffs, but not showing how to use it on a deformer. Though thank you for the smooth falloff node, it's pretty useful 🙂