Page MenuHome

Addon: Bolt Factory: Preserve smoothing options when changing a bolt
ClosedPublic

Authored by Robert Meerman (meermanr) on Jan 7 2021, 6:42 PM.

Details

Summary

Prior to this patch the effect of applying the "Shade Smooth" object operator and the value of "Vertex > Auto Smooth" were lost when changing an existing bolt (via context-menu's "Change Bolt").

This patch preserves both.

A simple heuristic is used to detect if "Shade Smooth" has been used: the value of use_smooth of the first polygon in the mesh (prior to activating "Change Bolt"). Experiment has shown that "Shade Smooth" / "Shade Flat" are equivalent to setting use_smooth to True/False (respectively) on every polygon in the mesh.

(No heuristic is needed for Auto Smooth, as it is a top-level property of mesh data blocks)

Diff Detail

Event Timeline

Robert Meerman (meermanr) requested review of this revision.Jan 7 2021, 6:42 PM
Robert Meerman (meermanr) created this revision.
This revision is now accepted and ready to land.Jan 8 2021, 12:03 PM

This patch has an approved status yet it was not committed yet. So I'm assuming the other reviewers are blocking. Updating the reviewers list to reflect that. This way the patch show as pending still.

This revision now requires review to proceed.Mar 26 2021, 5:20 PM
This revision is now accepted and ready to land.Feb 12 2022, 11:01 PM

Thanks for the patch meermanr. Sorry for the late commit

Committed with b0502cd83ca3