Fix broken Japanese text in search operator popups #601
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Another issue with dynamic enum properties.
Without ensuring that Python kept reference to the strings in the enum for each search operator, strings containing Japanese characters were displaying random memory. Attempting to select an option would actually try to use that random memory as the string to set, so the issue was not purely visual.
This patch wraps all search operators' enum
items
functions inwrap_dynamic_enum_items
to ensure that Python keeps reference to the strings.wrap_dynamic_enum_items
has been modified specifically for search operators to allow for instances that are not part of a scene or otherwise do not hold the property they reference. To keep the caches of names unique per search operator, theirbl_idname
s have been used as the keys used by the string cache.Thanks to MdNight_(Kilia FinClub) for reporting the bug on discord.
This fixes shape keys/bones/etc. showing up in search operator popups like this