* Fix header menu spacing bug, and make it consistent for all headers.
* For consistency, always put menus first in the header, then any enums
to switch the type of data displayed.
* Node editor header ported to python layout. Still quite a few
operators missing to make the menus complete.
* RNA wrapped node editor, and added use_nodes property to material
and scene.
* Sculpt Menu is now written in python.
* Select Menus are only for Object, Edit and Particle Mode, added code to check on that, fixed Console warnings.
* Fixed a typo in armature buttons, reported in IRC by "ebrain".
- view3d use select menus use the context.mode enum value.
- if selectmenu in dir(bpy.types) # creates a list of 1400+ strings, does a lookup and throws them away, better avoid this for redrawing.
Patch [#19031] (2.5) python menus for the view3d header
by Lorenzo Pierfederici (lento). Thanks!
* Added CTX_data_mode_string() to find out in which mode we're in.
* Added some "select" menus as a test.
This patch makes it basically possible to wrap the 3D View menus to python.
* Some Code cleanup.
* Added 3-Split Operator into the panel and some options (which don't work yet)
* Added RNA for RegionView3D lock and box options.
Added cursor location to the view panel in 3D view.
Removed the Shade Smooth/Flat buttons from mesh data for two reasons:
These kinds of tools are more appropriate in the tools area, and the context would not always match the selected datablock, if you have multiple objects selected, or if you're viewing the mesh data tab in 'pinned' mode.
The shade smooth/flat buttons are in the edit mode tools area now.
* Revert lamp sampling/buffers change. The right enum items should
be defined in RNA, not the layout, so that it works in outliner,
python api too.
* Also changed type popup to radio buttons again, and removed the
icons. This is more consistent, and I don't think it's a good idea
to start using icons for these things, too much clutter.
* Replace Mesh with Normals panel in the mesh buttons.
* Remove Material panel from mesh buttons.
* Added name fields for shape/vgroup/vcol/uv.
* Spacing tweak to Object and Bone names.
* Fix some naming conflicts in RNA, with "name" and "type" properties
being defined twice in the same struct.
* context.scene.tool_settings -> context.tool_settings.
* Moved brush NKEY panel from C to Python. Could use some UI review :)
* Added a NULL check in bpy_internal_import.c, was crashing here on Python errors
* Added RNA for vpaint brush and for weight paint
* Added context for vpaint/wpaint similar to edit_object and sculpt_object
* Added pointer RNA for the sculpt brush
* Converted sculpt settings panel (in the NKEY area) from C to Python
* For Python UI, needed context for whether sculpt is enabled or not; discussed this with Brecht and added sculpt_object to scene context
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.
* Code to start moving 3D view header and panels to python, at
the moment the View menu and one empty panel is in python. The
C header code is wrapped in one template, so parts of that can
be moved over while still keeping things working.
* Fix for mistake in RNA enum commit yesterday, and some warning
fixes.