diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-06 22:51:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-06 22:51:07 +0400 |
commit | c02526bdf97e2972971266ff0cec48482f719352 (patch) | |
tree | 2da36512d6ae968f9858f7e9a2887cf23ecceb71 /release/scripts | |
parent | c0b36a0be0474c5bd3a4859450d257099c8fe681 (diff) |
bugfix [#24157] AddPresetBase class writes incorrect values for float_vector properties
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/op/presets.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/release/scripts/op/presets.py b/release/scripts/op/presets.py index 4af27480669..aa3c306ce06 100644 --- a/release/scripts/op/presets.py +++ b/release/scripts/op/presets.py @@ -63,11 +63,16 @@ class AddPresetBase(): else: file_preset = open(filepath, 'w') file_preset.write("import bpy\n") - file_preset.write("from mathutils import *\n") for rna_path in self.preset_values: value = eval(rna_path) - file_preset.write("%s = %s\n" % (rna_path, repr(value))) + # convert thin wrapped sequences to simple lists to repr() + try: + value = value[:] + except: + pass + + file_preset.write("%s = %r\n" % (rna_path, value)) file_preset.close() |