Page MenuHome

Fix T72721: Add visibility flags updates to the PBVH
Needs ReviewPublic

Authored by Pablo Dobarro (pablodp606) on Thu, Feb 6, 10:09 PM.

Details

Summary

Currently, there its a function that sets manually the fully_hidden flag
of the nodes from the visibility operators in paint_hide.c. The undo
code was not updating the flag, so the visibility state of the nodes was
incorrect after preforming undo operations. This sometimes was drawing
fully hidden nodes with empty buffers, causing artifacts in the
geometry.

I added a function to mark nodes which visibility state changed (similar
as we are updating the mask flags and the nodes bounding boxes). This
way, the tools, operators and undo code don't have to update the
visibility flags, making everything much simpler to understand and
maintain.

I did not remove the flag update code from the current visibility
operators in this patch, but after reimplementing them (and all the new
ones) in the new visibility system, all visibility updates should be
done using this method and the BKE_pbvh_node_fully_hidden_set function
should be removed.

Diff Detail

Repository
rB Blender
Branch
T72721 (branched from master)
Build Status
Buildable 6519
Build 6519: arc lint + arc unit

Event Timeline

I added Bastien to the review as this is related to undo and might impact on his work.

@Jeroen Bakker (jbakker) i don't think this will affect my work, undo speedup project works only on memfile (aka global) undo, not the undos used by the various editing modes. :)

source/blender/blenkernel/intern/subdiv_ccg.c
626–628

Those changes seem unrelated to that patch?