Page MenuHome

Fix T64829: Active point of Curve objects is not displayed correctly
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on May 24 2019, 4:33 PM.

Details

Summary

two issues here:

  • when curves had multiple nurbs, the active vert is per nurb

[curve_create_edit_data_and_handles() wasnt taking that into account]

  • upon selection, tag curve ID_RECALC_COPY_ON_WRITE for batch cache

update

Diff Detail

Repository
rB Blender

Event Timeline

Jacques Lucke (JacquesLucke) added inline comments.
source/blender/draw/intern/draw_cache_impl_curve.c
759

please run make format

prevent two or more verts (from different nurbs but with the same "per nurb index") to be drawn active

Philipp Oeser (lichtwerk) marked an inline comment as done.May 24 2019, 4:57 PM

Tagging seems correct to me.

The offsets is a bit weird: applying offset for active point but not for selected? At least worth putting a comment about why is it so.

The offsets is a bit weird: applying offset for active point but not for selected? At least worth putting a comment about why is it so.

for selected, it goes for flag & SELECT (and that seems fine).
It is just when comparing v_idx [ongoing counter, not per nurb] with rdata->actvert [per nurb] where this fails...

Brecht Van Lommel (brecht) requested changes to this revision.May 28 2019, 3:05 PM
Brecht Van Lommel (brecht) added inline comments.
source/blender/draw/intern/draw_cache_impl_curve.c
791–793

There is another bug here. v_idx is not incremented when bezt->hide == true, while it should be since the cu->actvert index is not influenced by hiding.

I think the correct solution is to just pass a to beztriple_vflag_get, and remove v_idx and v_offs.

818

I think this case has the same bug, and could just pass a as well.

This revision now requires changes to proceed.May 28 2019, 3:05 PM
  • correct bpoint_vflag_get as well
  • fix hidden curve points

thx @Brecht Van Lommel (brecht) for spotting these!

Philipp Oeser (lichtwerk) marked 2 inline comments as done.May 28 2019, 3:50 PM
This revision is now accepted and ready to land.May 28 2019, 3:55 PM
This revision was automatically updated to reflect the committed changes.