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:
authorHans Goudey <h.goudey@me.com>2021-04-19 20:25:25 +0300
committerHans Goudey <h.goudey@me.com>2021-04-19 20:25:25 +0300
commitb8b7b47a0062ec5cc95818e9fc6bf34d07a268b0 (patch)
treefd889d8575ba22f048cd808c8b8ca753a37b3db3 /source/blender/editors/include
parent6f761c7110af8f90457f8c13553c5e26d7bc270f (diff)
Fix T85223: Some modifier panels can dissapear in old files
The problem is that each uiBlock needs to be assigned a unique name, but when there can be multiple modifiers of the same type, we use the panel sort order for the unique part of the string. However, the most recent test file has 1200+ panels in the property editor, so 4 characters isn't enough for a unique string. That's not a situation I expected, but it makes sense, because we don't remove legacy panels with unused types when loading old files. So they tend to accumulate a bunch of unused panels. That's why this works fine with a new property editor, it doesn't all of the extra old panels. These panels must be stored for the expansion status and order, but arguably we could cull unused panels on save. However, simply increasing the length of the unique panel string is a valid fix in this situation. In the future, we can look into removing unused panels when saving.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/UI_interface.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 7a189139358..81872428038 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -1729,7 +1729,7 @@ struct Panel *UI_panel_add_instanced(const struct bContext *C,
struct PointerRNA *custom_data);
void UI_panels_free_instanced(const struct bContext *C, struct ARegion *region);
-#define INSTANCED_PANEL_UNIQUE_STR_LEN 4
+#define INSTANCED_PANEL_UNIQUE_STR_LEN 16
void UI_list_panel_unique_str(struct Panel *panel, char *r_name);
typedef void (*uiListPanelIDFromDataFunc)(void *data_link, char *r_idname);