Page MenuHome

GPencil: Move modifiers evaluation to Depsgrah (T66924)

Authored by Antonio Vazquez (antoniov) on Sat, Aug 10, 1:03 PM.



Related to:

Before, the evaluation of modifers were done in draw manager. The reason of the old design was grease pencil was designed before depsgraph was in place.

This commit moves this logic to depsgraph to follow general design and reduce Draw Manager complexity. Also, this is required in order to use modifiers in Edit modes.

Really, there is nothing really new in the creation of derived data, only the logic has been moved to depsgraph, but the main logic is the same. In order to get a reference to the original stroke and points, a pointer is added to Runtime data as part of the evaluated data. These pointers allow to know and use the original data.

As the modifiers now are evaluated in Depsgraph, the evaluated stroke is usable in Edit modes, so now it's possible to work with the evaluated version instead to use a "ghost" of the final image over the original geometry as work today.

Diff Detail

Event Timeline

@Matias Mendiola (mendio) @Daniel Martinez Lara (pepeland) Could you apply this patch in master and test the modifiers. We have already tested this for months in GP branch, but I want to be sure the patch is fine.

Antonio Vazquez (antoniov) edited the summary of this revision. (Show Details)
Antonio Vazquez (antoniov) edited the summary of this revision. (Show Details)
Antonio Vazquez (antoniov) planned changes to this revision.Tue, Aug 13, 1:07 PM

I have decided prepare a patch with depsgraph code only, and keep brush sculpt and select in separated patch.