python access to operators now hides the _OT_ syntax, eg. SOME_OT_operator -> some...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 17 Jul 2009 12:26:40 +0000 (12:26 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 17 Jul 2009 12:26:40 +0000 (12:26 +0000)
commita705f6424567873b64f6309311106ec1e918b4e0
tree076fc80e7cdd8b19737a01a79c94c687dfca1b0f
parent1ef729358517248888073be71ba5d3b6e3d723ee
python access to operators now hides the _OT_ syntax, eg. SOME_OT_operator -> some.operator
this works for the calling operators from python and using the RNA api.

bpy.ops.CONSOLE_exec() is now bpy.ops.console.exec()

eg.
split.itemO("PARTICLE_OT_editable_set", text="Free Edit") becomes... split.itemO("particle.editable_set", text="Free Edit")

For now any operator thats called checks if its missing _OT_ and assumes its python syntax and converts it before doing the lookup.

bpy.ops is a python class in release/ui/bpy_ops.py which does the fake submodules and conversion, the C operator api is at bpy.__ops__

personally Id still rather rename C id-names not to contain the _OT_ text which would avoid the conversion, its called a lot since the UI has to convert the operators.
27 files changed:
release/ui/bpy_ops.py [new file with mode: 0644]
release/ui/buttons_data_lattice.py
release/ui/buttons_data_mesh.py
release/ui/buttons_data_modifier.py
release/ui/buttons_material.py
release/ui/buttons_object_constraint.py
release/ui/buttons_objects.py
release/ui/buttons_particle.py
release/ui/buttons_physics_cloth.py
release/ui/buttons_physics_fluid.py
release/ui/buttons_physics_softbody.py
release/ui/buttons_scene.py
release/ui/buttons_texture.py
release/ui/buttons_world.py
release/ui/space_console.py
release/ui/space_filebrowser.py
release/ui/space_image.py
release/ui/space_info.py
release/ui/space_outliner.py
release/ui/space_sequencer.py
release/ui/space_text.py
release/ui/space_view3d.py
release/ui/space_view3d_toolbar.py
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_rna.c
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/intern/wm_operators.c