Viewport 2.0 update bug with setDependentsDirty

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello.
I've found a bit strange bug while writing a custom deformer (implementation can be found in the attached file). It's a very simple deformer which just moves points up by an attribute.
When I define attribute dependencies via attributeAffects in initialize function, then everything is alright, that's ok.
When I use setDependentsDirty to define dependencies between attributes I get unexpected slow down in Viewport 2.0 (see profiler image attached). This bug isn't present in legacy viewport.
I really don't know the reason and this bug occurs in every Maya (I tried 2013-2019). It's annoying and disappointing thing. Help me, please!
To reproduce bug:
1. Compile deformer.cpp using clang or vs studio.
2. Load Maya and attach the deformer to a mesh (deformer -type mydeformer).
3. Try both cases (via attributeAffects and setDependentsDirty).
You'll see that attributeAffects version is much faster.
PS: I should use setDependencyDirty anyway.