Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2022-05-18 12:02:53 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-05-28 13:32:25 +0300
commit812a9728f89c87f8b27e634406225f2407d7beb6 (patch)
treea85ad400c4acbdb868c7b7968812ec978c37dced /source
parent314e5cb8899734347624ab23b458ccedab09a0dd (diff)
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
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/mesh/editmesh_select_similar.c8
1 files changed, 7 insertions, 1 deletions
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,