diff options
author | Pablo Vazquez <pablovazquez> | 2022-05-11 12:54:14 +0300 |
---|---|---|
committer | Pablo Vazquez <pablo@blender.org> | 2022-05-11 14:21:59 +0300 |
commit | eef98e66cf9e726ae262a7bb7f734d01b9577812 (patch) | |
tree | aa88e5d1a3015eb44ffc9171ead06691a4905333 /source/blender/blenkernel/BKE_mesh.h | |
parent | 6bd270f3af7dff3cd3223966b65a9f73a492df1d (diff) |
Mesh: Add Auto Smooth option to Shade Smooth operator
Add a property to the **Shade Smooth** operator to quickly enable the Mesh `use_auto_smooth` option.
The `Angle` property is exposed in the **Adjust Last Operation** panel to make it easy to tweak on multiple objects without having to go to the Properties editor.
The operator is exposed in the `Object` menu and `Object Context Menu`.
=== Demo ===
{F13066173, size=full}
Regarding the implementation, there are multiple ways to go about this (like making a whole new operator altogether), but I think a property is the cleanest/simplest.
I imagine there are simpler ways to achieve this without duplicating the `use_auto_smooth` property in the operator itself (getting it from the Mesh props?), but I couldn't find other operators doing something similar.
Reviewed By: #modeling, mont29
Differential Revision: https://developer.blender.org/D14894
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 091f30825ae..3e06a9d9e9c 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -204,6 +204,7 @@ bool BKE_mesh_material_index_used(struct Mesh *me, short index); void BKE_mesh_material_index_clear(struct Mesh *me); void BKE_mesh_material_remap(struct Mesh *me, const unsigned int *remap, unsigned int remap_len); void BKE_mesh_smooth_flag_set(struct Mesh *me, bool use_smooth); +void BKE_mesh_auto_smooth_flag_set(struct Mesh *me, bool use_auto_smooth, float auto_smooth_angle); /** * Needed after converting a mesh with subsurf optimal display to mesh. |