mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix #4793. Bug where autodetected patch UI failed with new signature typing.
This commit is contained in:
@@ -121,12 +121,16 @@ class UpdateIfcPatchArguments(bpy.types.Operator):
|
||||
for arg_name in inputs:
|
||||
arg_info = inputs[arg_name]
|
||||
new_attr = patch_args.add()
|
||||
data_type = arg_info.get("type", "str")
|
||||
if isinstance(data_type, list):
|
||||
data_type = [dt for dt in data_type if dt != "NoneType"][0]
|
||||
new_attr.data_type = {
|
||||
"Literal": "string",
|
||||
"str": "string",
|
||||
"float": "float",
|
||||
"int": "integer",
|
||||
"bool": "boolean",
|
||||
}[arg_info.get("type", "str")]
|
||||
}[data_type]
|
||||
new_attr.name = arg_name
|
||||
new_attr.set_value(arg_info.get("default", new_attr.get_value_default()))
|
||||
return {"FINISHED"}
|
||||
|
||||
Reference in New Issue
Block a user