mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-27 05:46:59 +00:00
feat(bevy_components): added handling of wrong string for unit structs
* allows detection of more wrong values for components
This commit is contained in:
parent
253a76f2bc
commit
00695a18d8
@ -227,7 +227,7 @@ class OT_rename_component(Operator):
|
||||
else:
|
||||
self.report({'INFO'}, "Sucessfully renamed component")
|
||||
|
||||
# TODO: clear data after we are done
|
||||
#clear data after we are done
|
||||
self.original_name = ""
|
||||
context.window_manager.bevy_component_rename_helper.original_name = ""
|
||||
|
||||
|
@ -224,8 +224,9 @@ def property_group_value_from_custom_property_value(property_group, definition,
|
||||
|
||||
|
||||
else:
|
||||
pass
|
||||
if len(value) > 2: #a unit struct should be two chars long :()
|
||||
#print("struct with zero fields")
|
||||
raise Exception("input string too big for a unit struct")
|
||||
|
||||
elif type_info == "Tuple":
|
||||
custom_property_values = parse_tuplestruct_string(value, start_nesting=1 if len(nesting) == 1 else 1)
|
||||
|
Loading…
Reference in New Issue
Block a user