Commit Graph

21 Commits

Author SHA1 Message Date
Brecht Van Lommel
1c614f6cf6 2.5: layout.itemO now returns OperatorProperties to be filled in,
when passing properties=True as argument.

Other changes:
* uiItemR, uiItemFullR, uiItemFullO now accept a flag argument rather
  than multiple different "boolean" arguments, but still exposed as
  booleans to python.
* Fix RNA to support setting PROP_RNAPTR for return values.
2009-08-21 12:57:47 +00:00
Brecht Van Lommel
184ac26dd0 2.5: Headers
* 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.
2009-08-19 00:55:30 +00:00
Thomas Dinges
ddd7bfc91b 2.5 3DView:
* Ported Edit Menus to python.
Many thanks to Lorenzo Pierfederici (lento) for this patch.
2009-08-17 10:13:24 +00:00
Thomas Dinges
e3b2cdc8ea 2.5 3DView Header:
* 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".
2009-08-16 12:52:57 +00:00
Campbell Barton
573678df48 - replace rna context.mode_string with an enum context.mode, that way its self documenting and is used as a string from py anyway.
- 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.
2009-08-16 03:40:00 +00:00
Thomas Dinges
9bd5b486fb 2.5 3DView Header:
* "Object" Menu is now written in python.
2009-08-15 22:28:48 +00:00
Thomas Dinges
2b3d2b72ea 2.5 3DView:
* Renaming of edit mode context types. 
* Code cleanup.
2009-08-15 20:21:49 +00:00
Thomas Dinges
0ce5163cc0 2.5 3D_View:
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.
2009-08-15 19:40:09 +00:00
Campbell Barton
07ed542187 pedantic changes to python UI scripts
- SOFTBODY -> SOFT_BODY
- Use getattr() with enum value to get the modifier function rather then a lot of elif's
2009-08-06 13:15:23 +00:00
Thomas Dinges
3e5f46ebf9 2.5 Various fixes:
* Small code and layout cleanup in 3DView Side Panels.
* Added missing redraw notifier for changing world datablock and cursor location.
2009-07-26 08:53:23 +00:00
Brecht Van Lommel
5d240af42b 2.5: fix for use background image toggle in 3d view, it didn't
allocate the right data.
2009-07-25 22:22:47 +00:00
Thomas Dinges
a93619a8c4 2.5 3DView View Panel:
* Added Lines option.
* Made some settings use alignment. 

Logs: Of course i meant 4-Split in last commit message ;-)
2009-07-24 22:33:09 +00:00
Thomas Dinges
a1403f7fbb 2.5 3DView Properties Panel:
* 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.
2009-07-24 22:09:30 +00:00
William Reynish
bd628d9c0c UI
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.
2009-07-24 11:48:45 +00:00
Brecht Van Lommel
1f4fa869e4 2.5: RNA & UI
* 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.
2009-07-21 00:55:20 +00:00
Campbell Barton
587d408f61 patch from William
Cleaned up force fields panel, as well as the other fixes (sculpt, lamps)
2009-07-20 16:39:16 +00:00
Nicholas Bishop
d410135408 Sculpt+Paint/2.5:
* 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
2009-07-19 17:44:44 +00:00
Nicholas Bishop
036c0012e6 Sculpt/2.5:
* 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
2009-07-19 01:55:21 +00:00
Campbell Barton
a705f64245 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.
2009-07-17 12:26:40 +00:00
Thomas Dinges
99e369d38d 2.5 Buttons:
* Some Updates for n-key Areas in View3D and Image Editor and some tweaks in bone panels. Patch by William Reynish. Thanks!
2009-07-14 12:32:19 +00:00
Brecht Van Lommel
b775f1bb32 2.5:
* 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.
2009-07-11 13:32:20 +00:00