Age | Commit message (Collapse) | Author |
|
item theme).
Issue goes back since we stopped using LISTROW button to draw item's name (i.e. since we have custom buttons in list items!).
This commit:
* Adds a new flag to uiBlock, UI_BLOCK_LIST_ITEM, to mark blocks used for each list item.
* Adds a new button type, LISTLABEL, which basically behaves exactly as LABEL, but uses wcol_list_item color set.
* When uiItemL is called, it checks whether current block has UI_BLOCK_LIST_ITEM set, and if so, switch produced button to LISTLABEL type.
* Adds a new helper func, ui_layout_list_set_labels_active, called after the active list item has been "drawn", to set all LISTLABEL buttons as UI_SELECT.
Note custom widget_state_label() was removed, in interface_widgets.c, as it did nothing more than default widget_state().
Thanks to Brecht for the review and advices.
|
|
shortcut.
|
|
used to compute its button's size!
|
|
refactoring.
|
|
|
|
|
|
Issue was caused by wrong array length used
for result of name_uiprefix_id, which shall
actually be 1 byte bugger than MAX_ID_NAME.
Reported by Sebastian Koenig in IRC.
|
|
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!
|
|
|
|
work anymore. This was due to a bugfix to show missing shortcut keys for e.g. the
mesh > vertices > separate menu. Both should work now.
|
|
|
|
when strings use 'PROP_NEVER_NULL' we still want them to show an unlink button.
|
|
also set ShapeKey.relative_key to never-null.
|
|
you can specify precision=0 for this, and use -1 for the default 2.
|
|
remove unused function uiEmboss()
|
|
right-aligned layouts show an annoying gap. If the layout is right-aligned, make the text button align right as well, so text is drawn at the right side of the alloted rect.
|
|
|
|
intended
Finally, I've figured out a way to get the ID Selector Template to only show the
icon for the type of ID block (i.e. the intended design), instead of icon+text.
This improves the layout a bit, as previously the type selector and ID-block
pointer and label would all be the same sizes (roughly 1/3rd of the overall
width each), which meant that there wasn't much room left to actually see which
datablock had been selected.
Additionally, I've fixed a few more layout types which still didn't correctly
propagate the red-alert flags.
|
|
(operators, panels and menus).
Thanks to Campell and Brecht for the reviews!
|
|
in the UI
This is the second part of the fixes for [#32492], making it easier to identify
which part of a driver (i.e. which of its targets) is causing problems
A number of additional/related changes needed to be made:
* Red-alert status for layouts is now propagated down to child layouts when they
are created. This is needed as otherwise some of the templates used in the Graph
Editor driver settings won't actually get the red-alert status flushed down to
them. Also, note that this status needs to be set before any widgets are added
to the layout, or else the settings aren't applied when the relevant widgets get
created.
* "Single Property" RNA-Paths resulting in out of bounds array access will now
trigger an error status and appropriate warnings
TODO:
* The error tagging doesn't get applied immediately after variables are created,
or their types changed
* There was also some other weirdness involved when a higher-value flag (1<<10)
was used for this setting, which needs further attention
|
|
second fix from this report which makes the menu show tips even when 'bl_property' isn't set.
|
|
|
|
can't not have an active UV map.
|
|
|
|
also - when expanding rna enums into existing menus - don't nest inside a row/column.
|
|
Blender's data link button (typically with menu and searching options)
now has a X icon to clear its contents.
Before you had to click, delete text, enter.
For example:
- Object Parent
- Modifier objects or vertexgroups
This fix saves each user 100 clicks per day, with 100k users
that's 3 billion clicks per year!
|
|
|
|
from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!
This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!
To make all this work, other changes were also necessary:
* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.
* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.
* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.
* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
Note: not sure whether we should add that one to all UILayout's prop funcs?
Note: will update addons using template list asap.
|
|
|
|
|
|
tooltips was wrongly bound to iface option, not tooltips one, and recent changes in r53119 were incorectly using BLF_pgettext, made them simpler by using CTX_IFACE_ macro).
Also fixed CTX_FOO_ macros when building without i18n, those were kinda wrong.
And hid i18n ui section in userpreferences when built without its support too.
|
|
translate the single name that ends up being used.
|
|
|
|
Nice formatted version (pictures soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability
Short list of main changes:
- Transparent region option (over main region), added code to blend in/out such panels.
- Min size window now 640 x 480
- Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake.
- Macbook retina support, use command line --no-native-pixels to disable it
- Timeline Marker label was drawing wrong
- Trackpad and magic mouse: supports zoom (hold ctrl)
- Fix for splash position: removed ghost function and made window size update after creation immediate
- Fast undo buffer save now adds UI as well. Could be checked for regular file save even...
Quit.blend and temp file saving use this now.
- Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)"
- New Userpref option "Keep Session" - this always saves quit.blend, and loads on start.
This allows keeping UI and data without actual saves, until you actually save.
When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header)
- Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v).
Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards.
- User preferences (themes, keymaps, user settings) now can be saved as a separate file.
Old option is called "Save Startup File" the new one "Save User Settings".
To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still.
- OSX: fixed bug that stopped giving mouse events outside window.
This also fixes "Continuous Grab" for OSX. (error since 2009)
|
|
custom context storage from the original uiLayout yet. Fix by Campbell Barton (ideasman_42).
|
|
|
|
|
|
socket menu, and make the normal animatable.
|
|
preset menu.
If this is needed we can add the reset button back as an option for certain operators,
but AFAICS any operator with enough settings that resetting them all would be annoying - could have presets enabled.
|
|
|
|
|
|
after 2.62*
having context different for menu vs submenu is quite confusing, now they are both: WM_OP_INVOKE_REGION_WIN
this changes WM_menu_invoke behavior.
|
|
|
|
|
|
|
|
|
|
from Sunny Gogoi (darkowlzz)
|
|
|
|
|
|
|