Blender Git Loki

Git Commits -> Revision 127c39b

Revision 127c39b by Bastien Montagne (master)
May 12, 2013, 13:16 (GMT)
Fix for [#35224] Transform Orientation - order inconsistency

Fix turned out to remove as much "manual UI" from 3D view header as possible. Mode selector and all transform manipulators/orientations stuff are now RNA-based UI (leaving basically only edit mesh select modes with custom handlers, as they have some quite specific features).

To achieve this, four main modifications were done:
* enum-operator-generated menus are now MENU (i.e. dropdown lists) in headers too.
* All bit-flag enums expanded in ROW buttons now have a handling consistent with e.g. layers, or what we already have for transform manipulators, i.e. clicking select only one element, shift-click to select multiple ones.
* Consequently, the three RNA booleans manipulators flags are merged into a single bit-flag enum (yes, this is also an API change, though I doubt many scripts use it).
* Now the width of enum-based dropdown lists is computed from longest item name in enum, no more from a dummy place holder string (when no label/name is given).

All this allows to remove some code from 3DView/transform areas, that was actually mostly duplicating RNA/operator one.

Also done a few optimizations here and there (among others, do not pass &numitems to RNA_property_enum_items() when you do not need it, saves at least an iteration over enum items to count them).

Many thanks to Brecht for the reviews!

Commit Details:

Full Hash: 127c39b8a44df962b1ac20578497b387319efe87
SVN Revision: 56706
Parent Commit: 5fcf9b1
Lines Changed: +187, -363

11 Modified Paths:

/source/blender/editors/include/ED_transform.h (+0, -4) (Diff)
/source/blender/editors/include/UI_interface.h (+2, -2) (Diff)
/source/blender/editors/interface/interface.c (+8, -8) (Diff)
/source/blender/editors/interface/interface_layout.c (+107, -69) (Diff)
/source/blender/editors/interface/interface_regions.c (+8, -1) (Diff)
/source/blender/editors/object/object_edit.c (+20, -19) (Diff)
/source/blender/editors/space_view3d/view3d_header.c (+20, -141) (Diff)
/source/blender/editors/transform/transform.c (+1, -28) (Diff)
/source/blender/editors/transform/transform_orientations.c (+0, -69) (Diff)
/source/blender/makesrna/intern/rna_object.c (+4, -4) (Diff)
/source/blender/makesrna/intern/rna_space.c (+17, -18) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021