UI: Cleanup Dialog to Manage Orphaned Data #106653

Merged
Harley Acheson merged 22 commits from Harley/blender:ManageData into main 2024-01-17 01:09:21 +01:00
1 changed files with 18 additions and 18 deletions
Showing only changes of commit 05b3712d0f - Show all commits

View File

@ -2330,8 +2330,8 @@ static std::string orphan_desc(bContext *C, bool local, bool linked, bool recurs
}
desc.append<>(std::to_string(num_tagged[i]) + " ");
Harley marked this conversation as resolved Outdated

No reason to use append on strings afaik, just use += operator?

That kind of formatting could also benefit from using fmt::format from our extern/fmtlib library.

No reason to use `append` on strings afaik, just use `+=` operator? That kind of formatting could also benefit from using `fmt::format` from our `extern/fmtlib` library.
desc.append(num_tagged[i] > 1 ?
TIP_(BKE_idtype_idcode_to_name_plural(BKE_idtype_idcode_from_index(i))) :
TIP_(BKE_idtype_idcode_to_name(BKE_idtype_idcode_from_index(i))));
TIP_(BKE_idtype_idcode_to_name_plural(BKE_idtype_idcode_from_index(i))) :
TIP_(BKE_idtype_idcode_to_name(BKE_idtype_idcode_from_index(i))));
}
}
if (desc.empty()) {
@ -2393,22 +2393,22 @@ static uiBlock *wm_block_create_orphans_cleanup(bContext *C, ARegion *region, vo
0,
"Delete unused linked data");
uiDefButBitC(block,
UI_BTYPE_CHECKBOX,
1,
0,
"Include Indirectly Unused (Recursive)",
0,
0,
0,
UI_UNIT_Y,
&purge_data->recursive,
0,
0,
0,
0,
"Recursively check for indirectly unused data, ensuring that no unused data "
"remains after execution");
uiDefButBitC(
block,
UI_BTYPE_CHECKBOX,
1,
0,
"Include indirect data",
0,
0,
Harley marked this conversation as resolved Outdated

Now getting into nitpicky territory...

This is using title case while "Local data" and "Linked data" are not. "unused" is implied for "Local data" and "Linked data", so why use it here? Clarifications like "(Recursive)" are not something we normally do in the UI, that seems like it should be in the tooltip.

I suggest "Include indirect data".

Now getting into nitpicky territory... This is using title case while "Local data" and "Linked data" are not. "unused" is implied for "Local data" and "Linked data", so why use it here? Clarifications like "(Recursive)" are not something we normally do in the UI, that seems like it should be in the tooltip. I suggest "Include indirect data".
0,
UI_UNIT_Y,
&purge_data->recursive,
0,
0,
0,
0,
"Recursively check for indirectly unused data, ensuring that no unused data remains");
uiItemS_ex(layout, 2.0f);