diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-04-14 11:58:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-04-14 11:58:33 +0400 |
commit | 2eddf083e14a2798bd749df55ea5ce9ca336565c (patch) | |
tree | e0d5b2d5225618fb9fb3bf544abb066e0b1e990d /release/scripts | |
parent | 43500c9e140ed44aa2e5c29208bb87196a9dad75 (diff) |
avoid using exec()
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/op/presets.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/release/scripts/op/presets.py b/release/scripts/op/presets.py index 3272bdfb8ad..75766995a05 100644 --- a/release/scripts/op/presets.py +++ b/release/scripts/op/presets.py @@ -85,7 +85,9 @@ class ExecutePreset(bpy.types.Operator): def execute(self, context): # change the menu title to the most recently chosen option - exec("bpy.types.%s.bl_label=\'%s\'" % (self.properties.menu_idname, self.properties.preset_name)) + preset_class = getattr(bpy.types, self.properties.menu_idname) + preset_class.bl_label = self.properties.preset_name + print(10) # execute the preset using script.python_file_run bpy.ops.script.python_file_run(path=self.properties.path) |