bugfix [#23182] Using self.report() inside poll() gives crash
poll() function is now a static method in python, this is more correct, matching C where the operator is not created to run poll.
def poll(self, context): ...
is now...
@staticmethod
def poll(context): ...
Pythons way of doing static methods is a bit odd but cant be helped :|
This does make subclassing poll functions with COMPAT_ENGINES break, so had to modify quite a few scripts for this.
This commit is contained in:
@@ -1135,7 +1135,8 @@ class Export3DS(bpy.types.Operator):
|
||||
wm.add_fileselect(self)
|
||||
return {'RUNNING_MODAL'}
|
||||
|
||||
def poll(self, context): # Poll isnt working yet
|
||||
@staticmethod
|
||||
def poll(context): # Poll isnt working yet
|
||||
return context.active_object != None
|
||||
|
||||
# Add to a menu
|
||||
|
||||
Reference in New Issue
Block a user