IDManagement: Update the Purge operator to display an interactive popup. #117304

Merged
Bastien Montagne merged 2 commits from mont29/blender:tmp-purge-as-popup into main 2024-02-09 17:01:42 +01:00

Make the 'purge' operation show an interactive popup by default, with a preview of the type and amount of data-blocks to be deleted.

Idea and initial UI/UX design are from @Harley (see PR !117242).

image

image

image

Some changes were also needed in BKE_lib_query_unused_ids_tag, to
address some new needs from this new feature, and already existing
issues:

  • Allow computing numbers of IDs to delete, without actually tagging
    them (existing issue, would leave dirty tagging behind in case of
    operator cancelling).
  • Allow getting numbers for local and linked IDs separately.

NOTE: These changes should be split in two commits (BKE_lib_query, and the outliner operator).

Make the 'purge' operation show an interactive popup by default, with a preview of the type and amount of data-blocks to be deleted. Idea and initial UI/UX design are from @Harley (see PR !117242). ![image](/attachments/83138c44-717a-41a0-bef2-6ab748b3122f) ![image](/attachments/a018ebcd-e41f-477d-b895-70550b42b5e5) ![image](/attachments/c7a9c7ab-ec0b-42f9-b346-8dab78dc135e) Some changes were also needed in `BKE_lib_query_unused_ids_tag`, to address some new needs from this new feature, and already existing issues: * Allow computing numbers of IDs to delete, without actually tagging them (existing issue, would leave dirty tagging behind in case of operator cancelling). * Allow getting numbers for local and linked IDs separately. NOTE: These changes should be split in two commits (BKE_lib_query, and the outliner operator).
Author
Owner

One main TODO that should be worked on in this PR is to allow a single call to BKE_lib_query_unused_ids_tag to generate all needed statistics. This call is not exactly cheap, having to do it three times is... suboptimal to say the least.

One main TODO that should be worked on in this PR is to allow a single call to `BKE_lib_query_unused_ids_tag` to generate all needed statistics. This call is not exactly cheap, having to do it three times is... suboptimal to say the least.

In my opinion, the design of the popup in #117242 is much better. I think generic "Ok" buttons should be avoided, and the layout and spacing of the UI elements is not that pleasant.

I think on a technical level an argument can be made that making this kind of dialog should not involve much code, and ideally either the existing mechanism should be made to have a better layout or creating custom dialogs should be simpler. But I do think the improved design is worth something.

In my opinion, the design of the popup in #117242 is much better. I think generic "Ok" buttons should be avoided, and the layout and spacing of the UI elements is not that pleasant. I think on a technical level an argument can be made that making this kind of dialog should not involve much code, and ideally either the existing mechanism should be made to have a better layout or creating custom dialogs should be simpler. But I do think the improved design is worth something.
Author
Owner

In my opinion, the design of the popup in #117242 is much better. I think generic "Ok" buttons should be avoided, and the layout and spacing of the UI elements is not that pleasant.

I think on a technical level an argument can be made that making this kind of dialog should not involve much code, and ideally either the existing mechanism should be made to have a better layout or creating custom dialogs should be simpler. But I do think the improved design is worth something.

Totally agree. This is why am saying that the WM_operator_props_dialog_popup high-level operator-aware code should be worked on first.

> In my opinion, the design of the popup in #117242 is much better. I think generic "Ok" buttons should be avoided, and the layout and spacing of the UI elements is not that pleasant. > > I think on a technical level an argument can be made that making this kind of dialog should not involve much code, and ideally either the existing mechanism should be made to have a better layout or creating custom dialogs should be simpler. But I do think the improved design is worth something. Totally agree. This is why am saying that the `WM_operator_props_dialog_popup` high-level operator-aware code should be worked on first.
Brecht Van Lommel reviewed 2024-01-19 18:07:04 +01:00
@ -2217,0 +2279,4 @@
uiItemR(layout, ptr, "do_recursive", UI_ITEM_NONE, nullptr, ICON_NONE);
label = IFACE_("To be deleted");

I don't think this total count is needed.

If it's needed to show recursive IDs as well, I think those should be behind that option.

I don't think this total count is needed. If it's needed to show recursive IDs as well, I think those should be behind that option.
Author
Owner

Now, these are just the sum of the local and linked numbers, so indeed not really that useful.

Now, these are just the sum of the local and linked numbers, so indeed not really that useful.
mont29 marked this conversation as resolved
@ -2253,0 +2331,4 @@
* `linked_ids_num` is the expected amount of linked IDs to be deleted with current settings
* (result may vary depending on `do_recursive` and `do_local_ids` settings).
*/
PropertyRNA *prop = RNA_def_int_array(ot->srna,

I don't think RNA properties should be used as a cache like this. Any reason not to store them in op->customdata?

If it's to use them in a Adjust Last Operation panel, I don't think this operator should show there.

I don't think RNA properties should be used as a cache like this. Any reason not to store them in `op->customdata`? If it's to use them in a Adjust Last Operation panel, I don't think this operator should show there.
Author
Owner

I don't think RNA properties should be used as a cache like this. Any reason not to store them in op->customdata?

Very good point.

If it's to use them in a Adjust Last Operation panel, I don't think this operator should show there.

I need to check, but I do hope this operator does not show there indeed.Otherwise, this will have to be fixed.

> I don't think RNA properties should be used as a cache like this. Any reason not to store them in `op->customdata`? Very good point. > If it's to use them in a Adjust Last Operation panel, I don't think this operator should show there. I need to check, but I do hope this operator does not show there indeed.Otherwise, this will have to be fixed.
mont29 marked this conversation as resolved
Author
Owner

@blender-bot build

@blender-bot build
Bastien Montagne requested review from Brecht Van Lommel 2024-02-06 18:28:41 +01:00
Bastien Montagne requested review from Harley Acheson 2024-02-06 18:28:42 +01:00
Bastien Montagne requested review from Julian Eisel 2024-02-06 18:28:42 +01:00
Bastien Montagne added the
Module
User Interface
Interest
Core
labels 2024-02-06 18:28:55 +01:00
Author
Owner

@Harley think the UI is now the same as the one in !117242?

Note that I did not port the new Manage Unused Data operation, this one can be committed separately.

@Harley think the UI is now the same as the one in !117242? Note that I did not port the new `Manage Unused Data` operation, this one can be committed separately.
Author
Owner

Also, I think these changes are worth having in 4.1 (including the new Manage Unused Data from !117242), do we all agree that even if they are not formally approved yet before BCon3, it can still be committed to the release branch, provided it is within a few days from now?

Also, I think these changes are worth having in 4.1 (including the new `Manage Unused Data` from !117242), do we all agree that even if they are not formally approved yet before BCon3, it can still be committed to the release branch, provided it is within a few days from now?
Author
Owner

@blender-bot build

@blender-bot build
Member

I apologize that the following will be maddening, because I know you were trying hard to copy what I did in #117242 and I really do appreciate that.

But #117242 is flawed. In hindsight I think props dialogs should have not have that layout with icon. With #117242 I was purposely making a bespoke thing so added some flourishes like the icon and made it look pretty like the other custom confirmation dialogs. I had the freedom to do anything and so used that license. But I think that icon was incorrect.

For confirmations they make sense. There is an action poised to go, so the dialog is an "are you sure?" So a "caution" icon makes sense.

But for properties dialogs the action isn't poised to go, but being created by the user right then in the dialog itself. I don't think that needs a caution or any other icon. In the same way that "Adjust Last Operation" wouldn't need caution.

I think if you just take out the changes to WM_operator_props_dialog_popup so it would not have an icon, nor be WM_POPUP_SIZE_LARGE. It would then calm this down a bit and get narrower. I think it just needs a spacing label to give a gap between the title and the rest of the content. It would look a bit more utilitarian, but I think that is what we probably want for these?

And the "Manage Unused Data" can just be a different menu item, rather than bundled in this like in mine.

I personally would make this a target for 4.2. Then it would a change introduced at the same time as other dialog changes planned for that version.

I apologize that the following will be maddening, because I know you were trying hard to copy what I did in #117242 and I really do appreciate that. But #117242 is flawed. In hindsight I think props dialogs should have not have that layout with icon. With #117242 I was purposely making a bespoke thing so added some flourishes like the icon and made it look pretty like the other custom confirmation dialogs. I had the freedom to do anything and so used that license. But I think that icon was incorrect. For confirmations they make sense. There is an action poised to go, so the dialog is an "are you sure?" So a "caution" icon makes sense. But for properties dialogs the action isn't poised to go, but being created by the user right then in the dialog itself. I don't think that needs a caution or any other icon. In the same way that "Adjust Last Operation" wouldn't need caution. I think if you just take out the changes to `WM_operator_props_dialog_popup` so it would not have an icon, nor be WM_POPUP_SIZE_LARGE. It would then calm this down a bit and get narrower. I think it just needs a spacing label to give a gap between the title and the rest of the content. It would look a bit more utilitarian, but I think that is what we probably want for these? And the "Manage Unused Data" can just be a different menu item, rather than bundled in this like in mine. I personally would make this a target for 4.2. Then it would a change introduced at the same time as other dialog changes planned for that version.
Brecht Van Lommel requested changes 2024-02-06 21:09:27 +01:00
Brecht Van Lommel left a comment
Owner

Using the regular props dialog is fine with me, it looks a little better than it did before too.

Using the regular props dialog is fine with me, it looks a little better than it did before too.
@ -695,0 +704,4 @@
std::array<int, INDEX_ID_MAX> *num_total;
std::array<int, INDEX_ID_MAX> *num_local;
std::array<int, INDEX_ID_MAX> *num_linked;

Maybe these 6 members could be moved into a struct that is defined in the BKE header? I don't feel particularly strongly about it, just would simplify argument passing a bit.

Maybe these 6 members could be moved into a struct that is defined in the BKE header? I don't feel particularly strongly about it, just would simplify argument passing a bit.

I was thinking you'd reference LibQueryUnusedIDsData in this struct directly.

I was thinking you'd reference `LibQueryUnusedIDsData` in this struct directly.
mont29 marked this conversation as resolved
@ -695,0 +715,4 @@
std::array<int, INDEX_ID_MAX> &num_local,
std::array<int, INDEX_ID_MAX> &num_linked)
{
BKE_main_relations_tag_set(bmain, MAINIDRELATIONS_ENTRY_TAGS_PROCESSED, false);

I think it would be more clear to call BKE_main_relations_tag_set outside of this. To me it's more clear if this struct just does counting, it's a bit unexpected to me that reset does more.

I think it would be more clear to call `BKE_main_relations_tag_set` outside of this. To me it's more clear if this struct just does counting, it's a bit unexpected to me that reset does more.
mont29 marked this conversation as resolved
@ -2251,2 +2321,4 @@
"Recursively check for indirectly unused data-blocks, ensuring that no orphaned "
"data-blocks remain after execution");
/* 'Cached' computed values.

This code can be removed now?

This code can be removed now?
mont29 marked this conversation as resolved
@ -21,3 +21,3 @@
# define RNA_MAX_ARRAY_LENGTH 64
#else
# define RNA_MAX_ARRAY_LENGTH 32
# define RNA_MAX_ARRAY_LENGTH 64

This change would also no longer be needed.

This change would also no longer be needed.
mont29 marked this conversation as resolved
Author
Owner

@blender-bot build

@blender-bot build
Author
Owner

@Harley no problem, this is trivial to undo. :)

I don't mind either waiting for 4.2 if you think it's more consistent with other UI changes.

@Harley no problem, this is trivial to undo. :) I don't mind either waiting for 4.2 if you think it's more consistent with other UI changes.
Bastien Montagne changed title from WIP: Quick prototype for showing Purge operator in a popup. to Updated the Purge operator to display an interactive popup. 2024-02-07 11:57:39 +01:00
Bastien Montagne changed title from Updated the Purge operator to display an interactive popup. to IDManagement: Update the Purge operator to display an interactive popup. 2024-02-07 11:57:54 +01:00
Brecht Van Lommel reviewed 2024-02-07 12:43:19 +01:00
@ -693,2 +694,4 @@
/* ***** IDs usages.checking/tagging. ***** */
struct UnusedIdsData {
Main *bmain;

This can be removed now.

This can be removed now.
Author
Owner

No, this is internal data not exposed in the header/public functions, it serves a different purpose as the public LibQueryUnusedIDsData one.

Will add a comment about it.

No, this is internal data not exposed in the header/public functions, it serves a different purpose as the public `LibQueryUnusedIDsData` one. Will add a comment about it.
Bastien Montagne requested review from Brecht Van Lommel 2024-02-07 12:45:52 +01:00
Brecht Van Lommel approved these changes 2024-02-07 13:44:32 +01:00
Brecht Van Lommel left a comment
Owner

Looks good to me overall now.

I think the design could be improved, but not strictly a blocker and maybe @Harley can do it.

  • List of datablocks could be on own line below checkbox (ideally with a bit darker text). It's a bit strange to me to have it as part of the checkbox text.
  • The popup being this wide looks a bit strange, especially the very wide buttons. Feels like these properties dialog should be more narrow, or it should be like a confirmation popup and the buttons don't span the entire width. We could try making this more narrow and breaking the datablock numbers across multiple lines (say max 4 per line).
  • Nothing -> None. Not sure why, sounds more correct to me.
  • Capitalization of singular and plurar datablock names is inconsistent.
Looks good to me overall now. I think the design could be improved, but not strictly a blocker and maybe @Harley can do it. * List of datablocks could be on own line below checkbox (ideally with a bit darker text). It's a bit strange to me to have it as part of the checkbox text. * The popup being this wide looks a bit strange, especially the very wide buttons. Feels like these properties dialog should be more narrow, or it should be like a confirmation popup and the buttons don't span the entire width. We could try making this more narrow and breaking the datablock numbers across multiple lines (say max 4 per line). * Nothing -> None. Not sure why, sounds more correct to me. * Capitalization of singular and plurar datablock names is inconsistent.
Member

One thought is to measure the text here, so it can get wider as needed:

static int outliner_orphans_purge_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
  LibQueryUnusedIDsData *data = MEM_new<LibQueryUnusedIDsData>(__func__);
  op->customdata = data;

  /* Compute expected amounts of deleted IDs and store them in 'cached' operator properties. */
  outliner_orphans_purge_check(C, op);

  PointerRNA *ptr = op->ptr;

  PropertyRNA *prop = RNA_struct_find_property(ptr, "do_local_ids");
  std::string label = RNA_property_ui_name(prop);
  unused_label_gen(label, data->num_local);

  const uiStyle *style = UI_style_get_dpi();
  int text_width = int(BLF_width(style->widget.uifont_id, label.c_str(), BLF_DRAW_STR_DUMMY_MAX));

  prop = RNA_struct_find_property(ptr, "do_linked_ids");
  label = RNA_property_ui_name(prop);
  unused_label_gen(label, data->num_linked);
  text_width = std::max(text_width, int(BLF_width(style->widget.uifont_id, label.c_str(), BLF_DRAW_STR_DUMMY_MAX)));

  /* The dialog width is unscaled. */
  const int dialog_width = std::max(int((text_width + (2 * UI_UNIT_X)) / UI_SCALE_FAC), 300);

  return WM_operator_props_dialog_popup(
      C, op, dialog_width, IFACE_("Purge Unused Data From This File"), IFACE_("Delete"));
}
One thought is to measure the text here, so it can get wider as needed: ``` static int outliner_orphans_purge_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/) { LibQueryUnusedIDsData *data = MEM_new<LibQueryUnusedIDsData>(__func__); op->customdata = data; /* Compute expected amounts of deleted IDs and store them in 'cached' operator properties. */ outliner_orphans_purge_check(C, op); PointerRNA *ptr = op->ptr; PropertyRNA *prop = RNA_struct_find_property(ptr, "do_local_ids"); std::string label = RNA_property_ui_name(prop); unused_label_gen(label, data->num_local); const uiStyle *style = UI_style_get_dpi(); int text_width = int(BLF_width(style->widget.uifont_id, label.c_str(), BLF_DRAW_STR_DUMMY_MAX)); prop = RNA_struct_find_property(ptr, "do_linked_ids"); label = RNA_property_ui_name(prop); unused_label_gen(label, data->num_linked); text_width = std::max(text_width, int(BLF_width(style->widget.uifont_id, label.c_str(), BLF_DRAW_STR_DUMMY_MAX))); /* The dialog width is unscaled. */ const int dialog_width = std::max(int((text_width + (2 * UI_UNIT_X)) / UI_SCALE_FAC), 300); return WM_operator_props_dialog_popup( C, op, dialog_width, IFACE_("Purge Unused Data From This File"), IFACE_("Delete")); } ```
Author
Owner
  • List of datablocks could be on own line below checkbox (ideally with a bit darker text). It's a bit strange to me to have it as part of the checkbox text.
  • The popup being this wide looks a bit strange, especially the very wide buttons. Feels like these properties dialog should be more narrow, or it should be like a confirmation popup and the buttons don't span the entire width. We could try making this more narrow and breaking the datablock numbers across multiple lines (say max 4 per line).

Moved it under, and made it darker (although the 'disabled' layout trick might make it too dark now?). Would rather avoid splitting in multiple lines if we can, this is not exactly trivial.

  • Nothing -> None. Not sure why, sounds more correct to me.

Done.

  • Capitalization of singular and plural data-block names is inconsistent.

This is.... somewhat orthogonal, the 'plural' name of IDTypeInfo is currently not supposed to be used in UI at all. Will likely need an new set of strings. For now for this PR, would say either leaves as-is, or always use singular form.

One thought is to measure the text here, so it can get wider as needed:

Added something like that, now when there is nothing to delete the popup is as narrow as possible (limited by title width):

image

> * List of datablocks could be on own line below checkbox (ideally with a bit darker text). It's a bit strange to me to have it as part of the checkbox text. > * The popup being this wide looks a bit strange, especially the very wide buttons. Feels like these properties dialog should be more narrow, or it should be like a confirmation popup and the buttons don't span the entire width. We could try making this more narrow and breaking the datablock numbers across multiple lines (say max 4 per line). Moved it under, and made it darker (although the 'disabled' layout trick might make it too dark now?). Would rather avoid splitting in multiple lines if we can, this is not exactly trivial. > * Nothing -> None. Not sure why, sounds more correct to me. Done. > * Capitalization of singular and plural data-block names is inconsistent. This is.... somewhat orthogonal, the 'plural' name of IDTypeInfo is currently not supposed to be used in UI at all. Will likely need an new set of strings. For now for this PR, would say either leaves as-is, or always use singular form. > One thought is to measure the text here, so it can get wider as needed: Added something like that, now when there is nothing to delete the popup is as narrow as possible (limited by title width): ![image](/attachments/3b40696a-d4b9-41bc-9143-2496a933ecc7)
Brecht Van Lommel reviewed 2024-02-08 16:35:02 +01:00
@ -2172,0 +2178,4 @@
max_messages_width,
BLF_width(style->widget.uifont_id, unused_message.c_str(), BLF_DRAW_STR_DUMMY_MAX));
return int(std::max(max_messages_width, 150.0f));

Use 300 like other dialogs, this looks too narrow.

Use 300 like other dialogs, this looks too narrow.
mont29 marked this conversation as resolved
@ -2217,0 +2292,4 @@
uiLayout *column = uiLayoutColumn(layout, true);
uiItemR(column, ptr, "do_local_ids", UI_ITEM_NONE, nullptr, ICON_NONE);
uiLayout *row = uiLayoutRow(column, true);
uiLayoutSetActive(row, false);

Actually testing, I don't think this is needed. The text is already darker than the checkbox text without this, so no need.

Actually testing, I don't think this is needed. The text is already darker than the checkbox text without this, so no need.
mont29 marked this conversation as resolved
@ -2217,0 +2301,4 @@
column = uiLayoutColumn(layout, true);
uiItemR(column, ptr, "do_linked_ids", UI_ITEM_NONE, nullptr, ICON_NONE);
row = uiLayoutRow(column, true);
uiLayoutSetActive(row, false);

Same.

Same.
mont29 marked this conversation as resolved
Member

FWIW, here is a before and after comparison with the horizontal rule I was going to propose adding to props dialogs after #117310. To me it seems to do a good job of separating the title part from the rest. With confirmations it seems okay that the title and message text can be seen as a group, but for these I think it would be nice to separate these sections.

image

Mentioning here so you can weigh in with an example we are now very familiar with.

FWIW, here is a before and after comparison with the horizontal rule I was going to propose adding to props dialogs after #117310. To me it seems to do a good job of separating the title part from the rest. With confirmations it seems okay that the title and message text can be seen as a group, but for these I think it would be nice to separate these sections. ![image](/attachments/e2f511be-1123-4351-9d6a-bf0769a9681c) Mentioning here so you can weigh in with an example we are now very familiar with.

Yes, the separator helps here, and seems good to add for all dialogs that have both a title and properties.

Yes, the separator helps here, and seems good to add for all dialogs that have both a title and properties.
Author
Owner

@blender-bot build

@blender-bot build
Brecht Van Lommel approved these changes 2024-02-08 18:15:30 +01:00
Harley Acheson approved these changes 2024-02-08 18:38:06 +01:00
Harley Acheson left a comment
Member

I think this is great! It makes so much more sense to do this in this way, rather than my bespoke dialog.

Although I think if you guys are rushing to get this into 4.1 then I think I would push for that horizontal rule as well.

I think this is great! It makes so much more sense to do this in this way, rather than my bespoke dialog. Although I think if you guys are rushing to get this into 4.1 then I think I would push for that horizontal rule as well.
Author
Owner

@brecht do you think this could go in 4.1? If yes, indeed I think the ruler under the title should also be done in 4.1.

Otherwise we can commit this to main, am fine with both solutions.

@brecht do you think this could go in 4.1? If yes, indeed I think the ruler under the title should also be done in 4.1. Otherwise we can commit this to main, am fine with both solutions.

Maybe best to leave it for 4.2, in the general spirit of trying to respect the release scheduler better.

Maybe best to leave it for 4.2, in the general spirit of trying to respect the release scheduler better.
Bastien Montagne force-pushed tmp-purge-as-popup from 5286023150 to 15024cd96f 2024-02-09 15:26:12 +01:00 Compare
Author
Owner

@blender-bot build

@blender-bot build
Bastien Montagne merged commit 0fd8f29e88 into main 2024-02-09 17:01:42 +01:00
Bastien Montagne deleted branch tmp-purge-as-popup 2024-02-09 17:01:44 +01:00
Member

Hey @mont29 I have some feedback on how this works in practice now:
Now that this functionality has been merged into a single operator it's important to choose sensible defaults. Imo when it comes to 'purging unused data' it's reasonable to do this recursively by default. The way it works right now, you'll probably be left with unused data after the operation. Personally, since the recursive functionality has been introduced, I hardly ever used the non-recursive version again.

So both for convenience and also for logical consistency with the name of the operator I'd change the default of the recursive toggle to be True.
CC @Mets

Hey @mont29 I have some feedback on how this works in practice now: Now that this functionality has been merged into a single operator it's important to choose sensible defaults. Imo when it comes to 'purging unused data' it's reasonable to do this recursively by default. The way it works right now, you'll probably be left with unused data after the operation. Personally, since the recursive functionality has been introduced, I hardly ever used the non-recursive version again. So both for convenience and also for logical consistency with the name of the operator I'd change the default of the recursive toggle to be True. CC @Mets
Author
Owner

@SimonThommes I agree. It does not make any sense to have the same naming as in the Outliner, but with different default options. Will fix, thanks for the suggestion!

@SimonThommes I agree. It does not make any sense to have the same naming as in the Outliner, but with different default options. Will fix, thanks for the suggestion!
Author
Owner
@SimonThommes done as b56457aa5ea9d4.
Contributor

I am confused. The improvement of purge operators is gravely needed, but I don't understand how the most crucial feature is omitted - actually knowing what I am about to delete?!

Original design by @Harley addressed this. User would be aware which exact datablocks are getting deleted. But this one doesn't do that.

It's frustrating that this is finally getting touched after being so needed for years, but the change fails to address the main concern about being able to know which data I am deleting before I delete it. If it just tells me "10 materials" I have absolutely no clue if those 10 materials contain some important ones I forgot to mark as fake user.

I am confused. The improvement of purge operators is gravely needed, but I don't understand how the most crucial feature is omitted - actually knowing what I am about to delete?! Original design by @Harley addressed this. User would be aware which exact datablocks are getting deleted. But this one doesn't do that. It's frustrating that this is finally getting touched after being so needed for years, but the change fails to address the main concern about being able to know which data I am deleting before I delete it. If it just tells me "10 materials" I have absolutely no clue if those 10 materials contain some important ones I forgot to mark as fake user.
Author
Owner

@Rawalanche the issue here is purely UI-related: How do you show potentially hundreds of different IDs to be deleted to the user in a useful way?

The immediately unused data can be found in details in the Outliner 'Orphaned' view. For the others, we do not have a solution (aka UI/UX design) currently afaik.

@Rawalanche the issue here is purely UI-related: How do you show potentially hundreds of different IDs to be deleted to the user in a useful way? The immediately unused data can be found in details in the Outliner 'Orphaned' view. For the others, we do not have a solution (aka UI/UX design) currently afaik.
Contributor

@Rawalanche the issue here is purely UI-related: How do you show potentially hundreds of different IDs to be deleted to the user in a useful way?

The immediately unused data can be found in details in the Outliner 'Orphaned' view. For the others, we do not have a solution (aka UI/UX design) currently afaik.

Either scrollable list or at the very least icon/button you can hover over to show popover with a text list. If you make a point that seeing large amount (potentially hundreds) of different IDs us not useful to the user, then you are making a point that Outliner 'Orphaned' view is pretty much useless and should not exist.

> @Rawalanche the issue here is purely UI-related: How do you show potentially hundreds of different IDs to be deleted to the user in a useful way? > > The immediately unused data can be found in details in the Outliner 'Orphaned' view. For the others, we do not have a solution (aka UI/UX design) currently afaik. Either scrollable list or at the very least icon/button you can hover over to show popover with a text list. If you make a point that seeing large amount (potentially hundreds) of different IDs us not useful to the user, then you are making a point that Outliner 'Orphaned' view is pretty much useless and should not exist.

I'm not sure which original @Harley design this is referring to. Maybe the Managed Unused Data operator that landed separately in #118435?

I'm not sure which original @Harley design this is referring to. Maybe the Managed Unused Data operator that landed separately in #118435?
Member

@Rawalanche

I'm not seeing any difference between what I originally proposed and what we have now. My original dialog also only showed "10 Objects, 3 Materials, ..." etc.

In my original proposal the new "Purge" dialog also included a button on it, "Manage" that opened Outliner Orphan Data view in a new window. My thoughts at the time were that if you saw "10 materials" and were unsure you could click that button and delete things, or not, in a more detailed manner. I also liked that the one item could mean the removal of the File / Cleanup menu so bringing this up a level.

But we all decided that combining the two things on the one dialog was awkward and arbitrary. So now we have everything I proposed, but just in two different items in the Cleanup menu. And with the added bonus that the Purge dialog was coded in a far better way by Bastien.

Is there something else about this, or the way they are combined, that you don't like? I'm not sure that we'd want to put more details on the Purge dialog since this would remain a binary "delete or not" choice. If we had to list each item with a checkbox then you as well just use the "Manage Unused Data" instead.

Or am I missing something?

@Rawalanche I'm not seeing any difference between what I originally proposed and what we have now. My original dialog also only showed "10 Objects, 3 Materials, ..." etc. In my original proposal the new "Purge" dialog also included a button on it, "Manage" that opened Outliner Orphan Data view in a new window. My thoughts at the time were that if you saw "10 materials" and were unsure you could click that button and delete things, or not, in a more detailed manner. I also liked that the one item could mean the removal of the File / Cleanup menu so bringing this up a level. But we all decided that combining the two things on the one dialog was awkward and arbitrary. So now we have everything I proposed, but just in two different items in the Cleanup menu. And with the added bonus that the Purge dialog was coded in a far better way by Bastien. Is there something else about this, or the way they are combined, that you don't like? I'm not sure that we'd want to put more details on the Purge dialog since this would remain a binary "delete or not" choice. If we had to list each item with a checkbox then you as well just use the "Manage Unused Data" instead. Or am I missing something?
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#117304
No description provided.