Blender Git Commit Log

Git Commits -> Revision a705f64

Revision a705f64 by Campbell Barton (master)
July 17, 2009, 12:26 (GMT)
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.

Commit Details:

Full Hash: a705f6424567873b64f6309311106ec1e918b4e0
SVN Revision: 21662
Parent Commit: 1ef7293
Lines Changed: +485, -305

1 Added Path:

/release/ui/bpy_ops.py (+107, -0) (View)

26 Modified Paths:

/release/ui/buttons_data_lattice.py (+1, -1) (Diff)
/release/ui/buttons_data_mesh.py (+21, -21) (Diff)
/release/ui/buttons_data_modifier.py (+3, -3) (Diff)
/release/ui/buttons_material.py (+3, -3) (Diff)
/release/ui/buttons_objects.py (+2, -2) (Diff)
/release/ui/buttons_object_constraint.py (+4, -4) (Diff)
/release/ui/buttons_particle.py (+16, -16) (Diff)
/release/ui/buttons_physics_cloth.py (+9, -9) (Diff)
/release/ui/buttons_physics_fluid.py (+3, -3) (Diff)
/release/ui/buttons_physics_softbody.py (+2, -2) (Diff)
/release/ui/buttons_scene.py (+4, -4) (Diff)
/release/ui/buttons_texture.py (+3, -3) (Diff)
/release/ui/buttons_world.py (+1, -1) (Diff)
/release/ui/space_console.py (+7, -4) (Diff)
/release/ui/space_filebrowser.py (+7, -7) (Diff)
/release/ui/space_image.py (+44, -44) (Diff)
/release/ui/space_info.py (+13, -13) (Diff)
/release/ui/space_outliner.py (+6, -6) (Diff)
/release/ui/space_sequencer.py (+59, -59) (Diff)
/release/ui/space_text.py (+36, -36) (Diff)
/release/ui/space_view3d.py (+20, -20) (Diff)
/release/ui/space_view3d_toolbar.py (+38, -38) (Diff)
/source/blender/python/intern/bpy_interface.c (+1, -1) (Diff)
/source/blender/python/intern/bpy_rna.c (+19, -1) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+54, -4) (Diff)
/source/blender/windowmanager/WM_api.h (+2, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021