diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-25 09:49:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-25 09:49:14 +0400 |
commit | 24e1ce25d14cbb61499d9b1229f1f35e9d3408f5 (patch) | |
tree | c14b238fd3350b2c4687f3b029c3c4a3fb846b5e /release | |
parent | 18f6bb04fa6bec6368a9d3e5253c041ba5c474b3 (diff) |
Use string escaping when renaming custom properties
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index a6060c63448..5dadf77ce92 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1081,12 +1081,12 @@ 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['%s']" % prop_old + exec_str = "del item[%r]" % prop_old # print(exec_str) exec(exec_str) # Reassign - exec_str = "item['%s'] = %s" % (prop, repr(value_eval)) + exec_str = "item[%r] = %s" % (prop, repr(value_eval)) # print(exec_str) exec(exec_str) self._last_prop[:] = [prop] @@ -1103,7 +1103,7 @@ class WM_OT_properties_edit(Operator): # If we have changed the type of the property, update its potential anim curves! if prop_type_old != prop_type: - data_path = '["%s"]' % prop + data_path = '["%s"]' % bpy.utils.escape_identifier(prop) done = set() def _update(fcurves): @@ -1114,9 +1114,9 @@ class WM_OT_properties_edit(Operator): def _update_strips(strips): for st in strips: - if st.type in {'CLIP'} and st.action: + if st.type == 'CLIP' and st.action: _update(st.action.fcurves) - elif st.type in {'META'}: + elif st.type == 'META': _update_strips(st.strips) adt = getattr(item, "animation_data", None) |