Converts an EnumProperty node to JSON format.
(node)
| 241 | |
| 242 | |
| 243 | def __convert_enum(node): |
| 244 | """Converts an EnumProperty node to JSON format.""" |
| 245 | name = __get_attribute(node, 'Name') |
| 246 | logging.debug('Found EnumProperty named %s', name) |
| 247 | |
| 248 | converted_values = [] |
| 249 | |
| 250 | for value in node.getElementsByTagName('EnumValue'): |
| 251 | converted = __convert_node(value) |
| 252 | |
| 253 | converted['value'] = converted['name'] |
| 254 | converted['name'] = name |
| 255 | |
| 256 | # Modify flags when there is an argument child |
| 257 | __with_argument(value, converted) |
| 258 | |
| 259 | converted_values.append(converted) |
| 260 | |
| 261 | return converted_values |
| 262 | |
| 263 | |
| 264 | def __convert_bool(node): |
nothing calls this directly
no test coverage detected
searching dependent graphs…