Page MenuHome

Curve: Force pretesselate modifier to output a Mesh output
ClosedPublic

Authored by Clément Foucault (fclem) on Apr 29 2020, 6:28 PM.

Details

Summary

This is to improve the case of T71055 where curves share the same batch
cache when they shouldn't.

This however, does not help to fix edit mode display.

The real fix would be to have a similar handling to what the mesh modifiers
do and duplicate the whole Curve data. But this is too much work/change for
the 2.83 release.

Diff Detail

Repository
rB Blender

Event Timeline

Clément Foucault (fclem) requested review of this revision.Apr 29 2020, 6:28 PM
Clément Foucault (fclem) created this revision.

While this doesn't see mto be a regression since 2.82 is good to fix nevertheless!

I think this is an acceptable solution. Just make the comment include all crucial technical bits.

source/blender/blenkernel/intern/displist.c
1137–1139

The comment is not complete, and task reference does not give any clear technical insight.

Comment should state:

  • Batch cache is stored in Object::data (no need of "now", avoid referring old/new things in code. The code is a snapshot. All the rest you can figure our from git history)
  • Object::data always points to CoW version of the initial Curve, modifiers evaluation does NOT decouple modified result from this CoW datablock.
  • Easiest is to create Mesh since we have all the boiler plate code for his.

Comment should also state that modified Curve is to be decoupled from the input of the modifier stack similar to how it's done for meshes.

This revision is now accepted and ready to land.Apr 30 2020, 3:48 PM