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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-06 08:02:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-06 08:02:42 +0300
commit2f58535b78daa9a5dae3461d56956911085fcec0 (patch)
treeab612b2316131b42ced5becb6081501510c6316c /source/blender/editors/object/object_data_transfer.c
parentf38ad4c66bee4fd28dbfe3fa4662fb6f8eb7d1c5 (diff)
Cleanup: use if/else check for property poll
Diffstat (limited to 'source/blender/editors/object/object_data_transfer.c')
-rw-r--r--source/blender/editors/object/object_data_transfer.c51
1 files changed, 32 insertions, 19 deletions
diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c
index 0bd358e1063..99989f86381 100644
--- a/source/blender/editors/object/object_data_transfer.c
+++ b/source/blender/editors/object/object_data_transfer.c
@@ -563,32 +563,45 @@ static bool data_transfer_poll_property(const bContext *UNUSED(C),
return false;
}
- if (STREQ(prop_id, "use_object_transform") && use_auto_transform) {
- return false;
+ if (STREQ(prop_id, "use_object_transform")) {
+ if (use_auto_transform) {
+ return false;
+ }
}
- if (STREQ(prop_id, "max_distance") && !use_max_distance) {
- return false;
+ else if (STREQ(prop_id, "max_distance")) {
+ if (!use_max_distance) {
+ return false;
+ }
}
- if (STREQ(prop_id, "islands_precision") && !DT_DATATYPE_IS_LOOP(data_type)) {
- return false;
+ else if (STREQ(prop_id, "islands_precision")) {
+ if (!DT_DATATYPE_IS_LOOP(data_type)) {
+ return false;
+ }
}
-
- if (STREQ(prop_id, "vert_mapping") && !DT_DATATYPE_IS_VERT(data_type)) {
- return false;
+ else if (STREQ(prop_id, "vert_mapping")) {
+ if (!DT_DATATYPE_IS_VERT(data_type)) {
+ return false;
+ }
}
- if (STREQ(prop_id, "edge_mapping") && !DT_DATATYPE_IS_EDGE(data_type)) {
- return false;
+ else if (STREQ(prop_id, "edge_mapping")) {
+ if (!DT_DATATYPE_IS_EDGE(data_type)) {
+ return false;
+ }
}
- if (STREQ(prop_id, "loop_mapping") && !DT_DATATYPE_IS_LOOP(data_type)) {
- return false;
+ else if (STREQ(prop_id, "loop_mapping")) {
+ if (!DT_DATATYPE_IS_LOOP(data_type)) {
+ return false;
+ }
}
- if (STREQ(prop_id, "poly_mapping") && !DT_DATATYPE_IS_POLY(data_type)) {
- return false;
+ else if (STREQ(prop_id, "poly_mapping")) {
+ if (!DT_DATATYPE_IS_POLY(data_type)) {
+ return false;
+ }
}
-
- if (STR_ELEM(prop_id, "layers_select_src", "layers_select_dst") &&
- !DT_DATATYPE_IS_MULTILAYERS(data_type)) {
- return false;
+ else if (STR_ELEM(prop_id, "layers_select_src", "layers_select_dst")) {
+ if (!DT_DATATYPE_IS_MULTILAYERS(data_type)) {
+ return false;
+ }
}
/* Else, show it! */