Fix T103911: Custom property edit gets wrong existing default
The array length was wrong for all types after 0e89d24318
, and
a typo meant that the boolean defaults were assigned to the int defaults.
This commit is contained in:
parent
12a3de96bb
commit
2a41e0822a
Notes:
blender-bot
2023-02-14 06:25:25 +01:00
Referenced by issue #103911, Issues with boolean custom property
|
@ -1587,8 +1587,9 @@ class WM_OT_properties_edit(Operator):
|
|||
elif self.property_type == 'STRING':
|
||||
self.default_string = rna_data["default"]
|
||||
elif self.property_type in {'BOOL', 'BOOL_ARRAY'}:
|
||||
self.default_int = self._convert_new_value_array(rna_data["default"], bool, 32)
|
||||
elif self.property_type in {'FLOAT_ARRAY', 'INT_ARRAY', 'BOOL_ARRAY'}:
|
||||
self.default_bool = self._convert_new_value_array(rna_data["default"], bool, 32)
|
||||
|
||||
if self.property_type in {'FLOAT_ARRAY', 'INT_ARRAY', 'BOOL_ARRAY'}:
|
||||
self.array_length = len(item[name])
|
||||
|
||||
# The dictionary does not contain the description if it was empty.
|
||||
|
|
Loading…
Reference in New Issue