Page MenuHome
Paste P1533

(An Untitled Masterwork)
ActivePublic

Authored by Jacques Lucke (JacquesLucke) on Jul 14 2020, 4:50 PM.
diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py
index 662c1d908fc..04f9c67bb2e 100644
--- a/release/scripts/modules/rna_prop_ui.py
+++ b/release/scripts/modules/rna_prop_ui.py
@@ -295,14 +295,14 @@ def draw(layout, context, context_member, property_type, use_edit=True):
show_array_ui = to_list and not is_rna and 0 < len(val) <= MAX_DISPLAY_ROWS
if show_array_ui and isinstance(val[0], (int, float)):
- row.prop(rna_item, '["%s"]' % escape_identifier(key), text="")
+ row.prop(rna_item, '["%s"]' % key, text="")
elif to_dict or to_list:
row.label(text=val_draw, translate=False)
else:
if is_rna:
row.prop(rna_item, key, text="")
else:
- row.prop(rna_item, '["%s"]' % escape_identifier(key), text="")
+ row.prop(rna_item, '["%s"]' % key, text="")
if use_edit:
row = split.row(align=True)
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index fc11e4a0a87..be0d0144623 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1279,17 +1279,11 @@ class WM_OT_properties_edit(Operator):
prop_type_old = type(item[prop_old])
rna_idprop_ui_prop_clear(item, prop_old)
- exec_str = "del item[%r]" % prop_old
- # print(exec_str)
- exec(exec_str)
+ del item[prop_old]
# Reassign
- exec_str = "item[%r] = %s" % (prop, repr(value_eval))
- # print(exec_str)
- exec(exec_str)
-
- exec_str = "item.property_overridable_library_set('[\"%s\"]', %s)" % (prop, self.is_overridable_library)
- exec(exec_str)
+ item[prop] = value_eval
+ item.property_overridable_library_set('[\"%s\"]' % prop, self.is_overridable_library)
rna_idprop_ui_prop_update(item, prop)
@@ -1376,8 +1370,7 @@ class WM_OT_properties_edit(Operator):
item = eval("context.%s" % data_path)
# retrieve overridable static
- exec_str = "item.is_property_overridable_library('[\"%s\"]')" % (self.property)
- self.is_overridable_library = bool(eval(exec_str))
+ self.is_overridable_library = item.is_property_overridable_library('["%s"]' % self.property)
# default default value
prop_type, is_array = rna_idprop_value_item_type(self.get_value_eval())