You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow brush tips to have multiple outlines (e.g. for particle effects)
Rolling forward after rollback in f8502c0 (which incorrectly repeats a truncated version the original change description from ce4c535).
In `StrokeShapeBuilder`, this involves losing the assumption that the number of outlines is exactly equal to the number of brush tips, since particle brushes have more than one outline per tip. Without that assumption, it can also discard empty outlines a bit earlier.
In `BrushTipExtruder` this involves:
* Keeping a vector of outlines instead of a single outline (since the usual case is just one, this uses `absl::InlinedVector<StrokeOutline, 1>`).
* Keep track of the number of extrusion breaks in `Geometry`.
* Add accessors to `Geometry` to get the number of break-points and the index counts at the lastest break-point. Use those in `Restore` to restore the saved state and in `AppendNewIndices` to get the start points in the latest outline.
* Pull calls to `AppendNewIndices` and `Geometry::UpdateMeshDerivatives` into `ExtrudeBreakPoint` because the former computes the latest outline and the latter may update indices, so it needs to be called first.
* Similarly, move forward the "first mutated" indices in `Geometry::AddExtrusionBreak`, since those track the first mutated vertices that haven't been recorded in the outline. These are renamed to `first_mutated_{left,right}_index_offset_in_current_partition_`, since these no longer track the same thing as `first_mutated_left_index_` and `first_mutated_right_index_` (which still considers a whole stroke update).
In `InProgressStroke`, `GetIndexOutlines` is renamed to `GetCoatOutlines` for clarity, since that makes it clear what the index is referring to.
PiperOrigin-RevId: 712619312
0 commit comments