diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-08-09 15:32:55 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-08-09 15:32:55 +0400 |
commit | dd75ec490761640571a0d8e53a0d439091f2736f (patch) | |
tree | 25b3966862febbf3ee8c81ed45f7045c99f84016 /release/scripts/templates/operator.py | |
parent | 02b0967bd11dd6fd2454b37182d9f94ea451b603 (diff) | |
parent | c026b8066ddc1c42144d2e5132384ea7c1211050 (diff) |
Merged changes in the trunk up to revision 31190.
Diffstat (limited to 'release/scripts/templates/operator.py')
-rw-r--r-- | release/scripts/templates/operator.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/release/scripts/templates/operator.py b/release/scripts/templates/operator.py index e20b92c9b6a..5a525784b51 100644 --- a/release/scripts/templates/operator.py +++ b/release/scripts/templates/operator.py @@ -23,7 +23,8 @@ class ExportSomeData(bpy.types.Operator): description="Choose between two items", default='OPT_A') - def poll(self, context): + @classmethod + def poll(cls, context): return context.active_object != None def execute(self, context): @@ -54,9 +55,6 @@ class ExportSomeData(bpy.types.Operator): return self.execute(context) - -bpy.types.register(ExportSomeData) - # Only needed if you want to add into a dynamic menu menu_func = lambda self, context: self.layout.operator("export.some_data", text="Example Exporter...") bpy.types.INFO_MT_file_export.append(menu_func) |