Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

[C++] Custom bezier spline plug-in shape disappearing after exiting Isolate Selected (MPxGeometryOverride)

[C++] Custom bezier spline plug-in shape disappearing after exiting Isolate Selected (MPxGeometryOverride)

matteo.dilena
Enthusiast Enthusiast
371 Views
1 Reply
Message 1 of 2

[C++] Custom bezier spline plug-in shape disappearing after exiting Isolate Selected (MPxGeometryOverride)

matteo.dilena
Enthusiast
Enthusiast

Hi all!

I recently updated a plug-in to fully support viewport 2.0 with MPxGeometryOverride, as it previously didn't draw correctly in viewport as soon as Parallel evaluation kicked in.

 

The (relatively small, but annoying) problem that I'm facing after that update though is that, sometimes, when I select a different object and isolate it, then exit from isolation, the computed plug-in spline disappears from viewport; it re-appears as soon as it's triggered by a selection or an animation, or any sort of update that triggers a change in its shape. This only seems to happen in DG mode, or Parallel Evaluation when there is no animation/controller tags involved.

 

I am using addUIDrawables() to draw the spline as it's so easy to setup that way, and for everything else I followed the footPrintNode_GeometryOverride example in the devkit.

 

Does that ring any bell to anyone?

Thanks so much for your help!

 

Matteo

0 Likes
372 Views
1 Reply
Reply (1)
Message 2 of 2

matteo.dilena
Enthusiast
Enthusiast

I realised I should have done more tests and come up with a more complete example of what's happening. I found two separate issues with isolate selected and MPxGeometryOverride, one of which is the one described in the first post, and I'm still not sure if they relate to the implementation or if they're Maya bugs.

 

First things first, the plug-in I'm referring to is an open source one, called Twist Spline, courtesy of Blur Studio, and I only recently contributed by porting the old draw API to the new Geometry Override as it was having draw issues. Here's the link to the GitHub repo https://github.com/blurstudio/TwistSpline

 

I made a couple of videos showing the separate issues: the first one happens when parallel evaluation is not yet triggered by any control tag or animation key, so the equivalent of DG mode (Serial and Parallel are not affected by it).

 

https://youtu.be/f_8s4usUG9A

 

The second issue relates instead to Parallel Evaluation. The cause there is the new Scheduling invisibility evaluator which, under the same condition as the other issue (isolating a control and moving it when the plug-in shape is not visible) doesn't update the outputs at all, not just the viewport drawing. Parallel + Partitioning works, and Serial works with both Partitioning and Scheduling.

 

https://youtu.be/OZiLU-BAz7Q

 

@brentmc  I see you're pretty active on this forum, so I wonder if you could take a look at the TwistSplineNode.cpp and drawOverride.cpp in the repo I linked above and maybe help with narrowing down if it's a Maya bug or a mistake on my end? I tried a few things already but I keep getting this, and the implementation looks similar than the one on the footPrintNode_GeometryOverride, but maybe I'm missing something somewhere else.

 

Thank you!

 

Matteo