diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-10 22:21:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-10 22:21:33 +0400 |
commit | 7c0216c7a0d853d2d98a900e946f25beac6d9954 (patch) | |
tree | 25b0a2193335b4485817b11d0334299d4c5928f9 /release/scripts/ui/space_info.py | |
parent | 76b17eaac58bd65e84190c9c4b48e18ce9bc6737 (diff) |
minor adjustments to python scripts to make them easier to run outside of blender.
Diffstat (limited to 'release/scripts/ui/space_info.py')
-rw-r--r-- | release/scripts/ui/space_info.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/ui/space_info.py b/release/scripts/ui/space_info.py index 618cd3c51c9..db9e4df8967 100644 --- a/release/scripts/ui/space_info.py +++ b/release/scripts/ui/space_info.py @@ -27,7 +27,7 @@ class INFO_HT_header(bpy.types.Header): layout = self.layout wm = context.manager - if wm and len(wm.operators): + if wm and wm.operators: last_op = wm.operators[-1] else: last_op = None @@ -131,7 +131,7 @@ class INFO_MT_file_import(bpy.types.Menu): bl_label = "Import" def draw(self, context): - if "collada_import" in dir(bpy.ops.wm): + if hasattr(bpy.types, "WM_OT_collada_import"): self.layout.operator("wm.collada_import", text="COLLADA (.dae)") @@ -140,7 +140,7 @@ class INFO_MT_file_export(bpy.types.Menu): bl_label = "Export" def draw(self, context): - if "collada_export" in dir(bpy.ops.wm): + if hasattr(bpy.types, "WM_OT_collada_export"): self.layout.operator("wm.collada_export", text="COLLADA (.dae)") |