Page MenuHome

Fix T76690: Incorrect liquid particle count displayed
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on May 27 2020, 1:58 PM.

Details

Summary

That solves the issue for me. I'm not sure if I can use the depsgraph
just like that or if I have to call some other method beforehand.

@Sergey Sharybin (sergey), can I assume that the depsgraph is evaluated in drawing code?

Diff Detail

Repository
rB Blender

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.May 27 2020, 1:58 PM
Jacques Lucke (JacquesLucke) created this revision.

Viewport drawing must have depsgraph evaluated. I think same is true for panels drawing as well.

I think in some areas we do copy such counters from evaluated to original datablock for active (DEG_is_active) depgraph (i.e. cfra in particle_system_update, BKE_object_eval_boundbox). This could be better approach here too: will avoid hash lookup for evaluated datablock from panel redraw function.

  • copy particle count back to original object

I was wondering whether this could confuse other code. If we don't copy back
all particle data to the original data block, totpart could be out
of sync with the number of particles stored in the original particle system.

It seemed to work fine in my simple test though. So maybe it's not an issue.

Looks fine to me. We should probably also backport this into the LTS.

This revision is now accepted and ready to land.Jul 15 2020, 11:50 AM