Commit: 812a9728f89c87f8b27e634406225f2407d7beb6 Author: Philipp Oeser Date: Wed May 18 11:02:53 2022 +0200 Branches: master https://developer.blender.org/rB812a9728f89c87f8b27e634406225f2407d7beb6
Select Similar: hide 'compare' from UI when not used When the 'compare' is not used for the resulting selection, just hide it. This is the case for 'Vertex Groups' atm (where only membership is taken into account). Similar to rB9dc9692b0979. Differential Revision: https://developer.blender.org/D14979 =================================================================== M source/blender/editors/mesh/editmesh_select_similar.c =================================================================== diff --git a/source/blender/editors/mesh/editmesh_select_similar.c b/source/blender/editors/mesh/editmesh_select_similar.c index 3f05c27e8fa..c931cb4948b 100644 --- a/source/blender/editors/mesh/editmesh_select_similar.c +++ b/source/blender/editors/mesh/editmesh_select_similar.c @@ -1370,8 +1370,14 @@ static bool edbm_select_similar_poll_property(const bContext *UNUSED(C), const char *prop_id = RNA_property_identifier(prop); const int type = RNA_enum_get(op->ptr, "type"); + /* Only show compare when it is used. */ + if (STREQ(prop_id, "compare")) { + if (type == SIMVERT_VGROUP) { + return false; + } + } /* Only show threshold when it is used. */ - if (STREQ(prop_id, "threshold")) { + else if (STREQ(prop_id, "threshold")) { if (!ELEM(type, SIMVERT_NORMAL, SIMEDGE_BEVEL, _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
