Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
| Context not available. | |||||
| # Now here is the *ugly* hack! | # Now here is the *ugly* hack! | ||||
| # Unfortunately, all classes we want to access are not available from bpy.types (OperatorProperties subclasses | # Unfortunately, all classes we want to access are not available from bpy.types (OperatorProperties subclasses | ||||
| # are not here, as they have the same name as matching Operator ones :( ). So we use __subclasses__() calls | # are not here, as they have the same name as matching Operator ones :( ). So we use __subclasses__() calls | ||||
| # to walk through all rna hierachy. | # to walk through all rna hierarchy. | ||||
| # But unregistered classes remain listed by relevant __subclasses__() calls (be it a Py or BPY/RNA bug), | # But unregistered classes remain listed by relevant __subclasses__() calls (be it a Py or BPY/RNA bug), | ||||
| # and obviously the matching RNA struct exists no more, so trying to access their data (even the identifier) | # and obviously the matching RNA struct exists no more, so trying to access their data (even the identifier) | ||||
| # quickly leads to segfault! | # quickly leads to segfault! | ||||
| Context not available. | |||||
| def extract_strings_split(node): | def extract_strings_split(node): | ||||
| """ | """ | ||||
| Returns a list args as returned by 'extract_strings()', but split into groups based on separate_nodes, this way | Returns a list args as returned by 'extract_strings()', but split into groups based on separate_nodes, this way | ||||
| expressions like ("A" if test else "B") wont be merged but "A" + "B" will. | expressions like ("A" if test else "B") won't be merged but "A" + "B" will. | ||||
| """ | """ | ||||
| estr_ls = [] | estr_ls = [] | ||||
| nds_ls = [] | nds_ls = [] | ||||
| Context not available. | |||||