Page MenuHome

GPencil: Fix unreported missing Onion filter by Material
ClosedPublic

Authored by Antonio Vazquez (antoniov) on Sat, Jun 20, 12:32 PM.

Details

Summary

During the refactor, the filter by material was removed. This filter allows to hide in the onion ghost any stroke of the material.

Also I did some cleanup and renamed the flag to GP_MATERIAL_HIDE_ONIONSKIN

Diff Detail

Repository
rB Blender

Event Timeline

Antonio Vazquez (antoniov) requested review of this revision.Sat, Jun 20, 12:32 PM
Antonio Vazquez (antoniov) created this revision.
This revision is now accepted and ready to land.Sat, Jun 20, 2:34 PM
Clément Foucault (fclem) requested changes to this revision.Sat, Jun 20, 2:36 PM

hmmm After a second though I'm not so sure. what if you have two object sharing the GPData but not the same material (using object material) The visibility could be different so you need to hide it at draw time and not inside the iter loop which is also used to extract the VBO data.

This revision now requires changes to proceed.Sat, Jun 20, 2:36 PM

@Clément Foucault (fclem) This property is at material level, so if you disable this for the material, all object sharing the same material must do the same. I have checked and having two objects sharing same datablock share the same materials...if not share the material is not a problem, so I think the fix works.


This is the case I am talking about. Remember the material can be different even if using the same bGPData when using Object linking and not ObData linking. It seems that multiuser datablock cannot display in onion skinning (why?) so I cannot show the failure case.

Even then, I still think you should filter at drawtime (in gpencil_stroke_cache_populate) and not in the main loop.

  • GPencil: Change the filtering for Marerial Onion switch

@Clément Foucault (fclem) I think now is working as you requested. I have tested and works with linked datablocks with different materials.

This revision is now accepted and ready to land.Sun, Jun 21, 11:42 AM