bugfix [#23182] Using self.report() inside poll() gives crash
authorCampbell Barton <ideasman42@gmail.com>
Thu, 5 Aug 2010 16:05:30 +0000 (16:05 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 5 Aug 2010 16:05:30 +0000 (16:05 +0000)
commit163f6055d26383b7fa11df00da09ef63efb8cb6c
treed552a9ad0ce4c64a95088264021914008bf8fdf9
parent5d18274cacef89fe4e290dbae8427122028ba868
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.
54 files changed:
release/scripts/io/export_3ds.py
release/scripts/io/export_fbx.py
release/scripts/io/export_mdd.py
release/scripts/io/export_ply.py
release/scripts/io/import_shape_mdd.py
release/scripts/io/netrender/operators.py
release/scripts/io/netrender/ui.py
release/scripts/op/fcurve_euler_filter.py
release/scripts/op/mesh.py
release/scripts/op/object.py
release/scripts/op/object_align.py
release/scripts/op/sequencer.py
release/scripts/op/uv.py
release/scripts/op/uvcalc_follow_active.py
release/scripts/op/uvcalc_smart_project.py
release/scripts/templates/operator.py
release/scripts/templates/operator_simple.py
release/scripts/templates/operator_uv.py
release/scripts/ui/properties_data_armature.py
release/scripts/ui/properties_data_armature_rigify.py
release/scripts/ui/properties_data_bone.py
release/scripts/ui/properties_data_camera.py
release/scripts/ui/properties_data_curve.py
release/scripts/ui/properties_data_empty.py
release/scripts/ui/properties_data_lamp.py
release/scripts/ui/properties_data_lattice.py
release/scripts/ui/properties_data_mesh.py
release/scripts/ui/properties_data_metaball.py
release/scripts/ui/properties_game.py
release/scripts/ui/properties_material.py
release/scripts/ui/properties_object.py
release/scripts/ui/properties_object_constraint.py
release/scripts/ui/properties_particle.py
release/scripts/ui/properties_physics_cloth.py
release/scripts/ui/properties_physics_field.py
release/scripts/ui/properties_physics_fluid.py
release/scripts/ui/properties_physics_smoke.py
release/scripts/ui/properties_physics_softbody.py
release/scripts/ui/properties_render.py
release/scripts/ui/properties_scene.py
release/scripts/ui/properties_texture.py
release/scripts/ui/properties_world.py
release/scripts/ui/space_console.py
release/scripts/ui/space_image.py
release/scripts/ui/space_logic.py
release/scripts/ui/space_sequencer.py
release/scripts/ui/space_text.py
release/scripts/ui/space_userpref.py
release/scripts/ui/space_userpref_keymap.py
release/scripts/ui/space_view3d.py
release/scripts/ui/space_view3d_toolbar.py
source/blender/makesrna/intern/rna_ui.c
source/blender/makesrna/intern/rna_wm_api.c
source/blender/python/intern/bpy_rna.c