poll() as a python '@staticmethod' was too limiting and didnt allow useful base class poll functions in many cases.
now rna functions that dont have a 'self' are automatically assumed '@classmethods'. de-duplicated poll functions and made some minor tweaks too.
This commit is contained in:
@@ -246,8 +246,8 @@ class TEXT_MT_edit_to3d(bpy.types.Menu):
|
||||
class TEXT_MT_edit(bpy.types.Menu):
|
||||
bl_label = "Edit"
|
||||
|
||||
@staticmethod
|
||||
def poll(context):
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return (context.space_data.text)
|
||||
|
||||
def draw(self, context):
|
||||
|
||||
Reference in New Issue
Block a user