Page MenuHome

Fix loopcut gizmo number cuts drawing.
Needs ReviewPublic

Authored by Anthony Edlin (krash) on Jun 8 2020, 11:07 PM.

Details

Summary

Fix loopcut gizmo only shows one loop in preview even when number of cuts setting of tool system is higher.

Used convention from other gizmos of subscribing to property and doing refresh in callback, then
implementing refresh function for gizmo group to update gizmos. In this case updating gizmo with number_cuts.

Diff Detail

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

Event Timeline

Anthony Edlin (krash) requested review of this revision.Jun 8 2020, 11:07 PM
Anthony Edlin (krash) created this revision.

Add op_type check.

Anthony Edlin (krash) retitled this revision from Fix loopcut gizmo only shows one loop in preview even when number of cuts setting of tool system is higher. to Fix loopcut gizmo number cuts drawing..Jun 9 2020, 5:00 AM
Anthony Edlin (krash) edited the summary of this revision. (Show Details)
Campbell Barton (campbellbarton) requested changes to this revision.Jun 9 2020, 5:54 AM
Campbell Barton (campbellbarton) added inline comments.
source/blender/blenkernel/intern/idprop.c
735–768 ↗(On Diff #25658)

This enables sloppy lookups on data, where it's not clear that the author intended.

I'd rather not add this function, the users of the ID properties should look up data at a known location.

This revision now requires changes to proceed.Jun 9 2020, 5:54 AM

The view3d_gizmo_preselect_type.c shouldn't be hard coded to lookup the MESH_OT_loopcut.

Instead, the user of the gizmo should have a property used to display the number of cuts.

I'm not sure if this is simple to support in a way that updates when this setting changes, it should be possible to support it though.

Used convention from other gizmos of subscribing to property and doing refresh in callback, then
implementing refresh function for gizmo group to update gizmos. In this case updating gizmo with number_cuts.

Updated with clang_format

Anthony Edlin (krash) edited the summary of this revision. (Show Details)Apr 4 2021, 7:45 PM