[Bf-committers] Some changes in 3D view header (and general RNA-generated UI)

Bastien Montagne montagne29 at wanadoo.fr
Sat May 11 15:11:05 CEST 2013


Hi devs,

Here is a patch that was first intended to fix [#35224] "Transform 
orientation - order inconsistency" : http://www.pasteall.org/42132/diff

It’s not a big deal in itself, but as it affects quite a few areas, I 
thought it would be better to post it here, so that all core devs have a 
chance to give it a look.

This patch adds several fixes/enhancements/simplifications (deduplications):
* Its main goal is to remove as much "manual UI" from 3D view header as 
possible. In current state, it moves mode selector and all transform 
manipulators/orientations stuff to RNA (leaving basically only edit mesh 
select modes with custom handlers, as they have some quite specific 
features).
* To achieve this, three main modifications were done:
** enum-operator-generated menus are now PULLDOWN 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).

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

Also done a few optimizations here and there (among other, 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 ;) ).

Best regards,
Bastien


More information about the Bf-committers mailing list