Page MenuHome

Proposed fix for T62101
ClosedPublic

Authored by Antonio Vazquez (antoniov) on Jul 5 2019, 11:06 PM.

Details

Summary

Following the advices of @Germano Cavalcante (mano-wii) , I have exposed as a workaround the free function to be called from draw manager for selection.

Now, the free function is not called for selection inside gpencil draw_scene, but it's called from draw_manager.c.

The real fix would be create a new Scene_finish callback in draw manager, but as the release of 2.80 is almost here, we fix this with a workaround that must be removed when new callback is in place.

Diff Detail

Event Timeline

Antonio Vazquez (antoniov) edited the summary of this revision. (Show Details)
source/blender/draw/intern/draw_manager.c
2385

Not sure here if I must use ViewportEngineData *data = drw_viewport_engine_data_ensure(engine);

This revision is now accepted and ready to land.Jul 5 2019, 11:09 PM
source/blender/draw/intern/draw_manager.c
2385

I don't think so. This function creates a data. In doubt just check if data is NULL.
But I believe that in this case it is always created.

source/blender/draw/intern/draw_manager.c
2385

Yes, I have added a check of NULL

Did you see my comment on the bug report?

Other possible fix is to move all these resources to a per layer storage (DRW_view_layer_engine_data_get) and discard only in cache_init.

I think this is better workaround than this patch.

That said, given the little time we have, I can let this pass. But I would like to have a high priority task to fix this mess ASAP after 2.80 release. Because this one it going to backfire at some point.