Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken Japanese text in search operator popups #601

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

Mysteryem
Copy link

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 in wrap_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, their bl_idnames 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
image

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 in `wrap_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, their `bl_idname`s have been used as the keys used by the string cache.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant