Maybe we can remove the assert? pbvh type of active object is grid, which is expected
No, unfortunately that's part of the reason I didn't just submit a patch for it. The code path that is…
Oh, whoops, sorry @PratikPB2123, meant to confirm this when I created it, just wanted to make this issue so I remembered to get around to it later in this week.
As a note, I placed the operator in the "Cleanup" menu similar to where it is for the legacy grease pencil. Let me know if there's someplace better for it.
average_data_grids
Yeah, I think it is a defensive stance to take, though I interpret it with a slightly different spin - given time constraints that exist for any sort of feature development, I think making it easy…
The corresponding legacy API being used here was BKE_gpencil_layer_frame_get
which appears to exhibit the same behavior (i.e. a frame that is prior to scene.r.cfra
)