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:
@@ -132,6 +132,10 @@ class PropertyPanel():
|
||||
bl_label = "Custom Properties"
|
||||
bl_default_closed = True
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
bool(eval("context.%s" % cls._context_path))
|
||||
|
||||
def draw(self, context):
|
||||
draw(self.layout, context, self._context_path)
|
||||
|
||||
|
Reference in New Issue
Block a user