Age | Commit message (Collapse) | Author |
|
RNA
* Added the relevant active_*_index properties, with proper
get/set/range, updates and notifiers.
* Context.tool_settings.
* ToolSettings.vertex_group_weight.
Operators
* MESH_OT_uv_texture_add/remove
* MESH_OT_vertex_color_add/remove
* MESH_OT_sticky_add/remove
* OBJECT_OT_vertex_group_add/remove/assign/remove_from/
select/deselect/copy/copy_to_linked
* OBJECT_OT_shape_key_add/remove
UI
* Some updates and cleanups in list template code.
Known issue: when going in & out of editmode, uv textures and vertex
colors dissappear. I thought me->edit_mesh would be NULL when not in
edit mode but it is not?
|
|
Search Menu: added feature that on opening, it shows the
current ID block, and selects it. Same can be used for other
searches, just pass on pointer to active item for the search
callback.
Also fixed arrow triangle draw for search.
|
|
* Fix issue with icon not being left-aligned in text field.
* Put modifier tab after data tab in buttons header.
|
|
* Search popup + autocomplete for bones, vertex groups, etc. This
is done with layout.item_pointerR, specifying an RNA collection to
take the items from. Used by constraints and modifiers.
* Some tests with the List template, ignore those for now..
|
|
check Save Image or Export PLY operator for example.
Also these code changes:
* Added some RNA collection iterator macros to simplify code.
* Fix bpy.props.BoolProperty not working correct.
* Merge uiDefAutoButsRNA/uiDefAutoButsRNA_single into one.
|
|
* RNA_struct_name_get_alloc function to get the name from a
pointer, instead of having to deal with name property.
* CTX_data_pointer_get_type to get data from context with
a check for the RNA type.
|
|
Medium sized Color Picker; consisting of number sliders, row buttons to
select rgb/hsv/hex, HS circle and V slider. It opens persistant, like
old picker.
This one opens default, other two can be accessed with ALT or SHIFT click.
On todo;
- eyedropper tool back
- method for click-drag to make mini picker appear
Note for UI coders (brecht :), added a UI_HIDDEN flag in buttons, to
support switching buttons in menus. Hidden buttons are not activated nor
drawn.
|
|
|
|
* Make Directional Order menus the default again.
* Scale up contents panels that do not use layout system.
* Fix for enum size and uncesseray colon in some cases.
* For item_menu_enumO, show icons if specified in RNA in
the menu (e.g. in the add modifier menu if there were
icons specified).
|
|
Logic editing back!
Test screenie:
http://download.blender.org/institute/rt9.jpg
I gave the buttons a bit more width, added nicer linkline draw.
Not working yet:
- theme colors for sensor/actuator types (was old button colors)
- moving sensors up/down (used bad pupmenu... better is icons like
used for modifiers)
- Linkline mouse-over select. Currently deleting a link goes by
drawing the same line again.
Needs to be fully tested for functionality too, leave that to the GE
department. :)
I noted there's bad button hacking with reading button values,
like check_state_mask(). uiBut structure was not meant to be exported
outside of interface module.
|
|
|
|
Revert revision #20879:
Enable non reordering menus option, it was disabled without explanation (?).
This changed the order of all header menus with the header at the bottom,
this doesn't seem acceptable to me. Additionaly, it doesn't make sense to
me that this would be the same option as the toolbox shape, they should be
separate options.
Here's the rationale from 2005 by Ton:
I didn't add the commenting out of correcting pulldown menu order, which
is based on location of the originating button in the UI. This uncommenting
didn't solve anything, since button definitions itself can be flipped too.
(Example: the data brose menus in top bar need to be corrected).
I can imagine the order flipping is sometimes annoying, but it still has
reasons to be there;
- the most important / most used items are always closest to the mouse.
(like opening properties panel, or "Add new" for material.
- it follows muscle memory and 'locus of attention' (mouse position).
- menus are configured to open to the top for bottom headers, and to the
bottom for top headers. We can expect the UI is configured consistantly
for headers, so in general the menus will appear consistant as well.
Where menu flipping fails is especially for alphabetic listings, like in
the menu button of fileselect. However, that one should be configured to
open by default to the bottom, so ordering is consistant as well.
|
|
* Added option for panel to be closed by default.
* Added support for RNA property and enum icons in buttons.
* Remove some deprecated RNA menu code.
* Fix issue with newly created panels not being inserted in the
right place.
* Fix issue with 3-split layout not being divided correctly.
* FIx issue with menu items not drawing correct using python UI.
|
|
|
|
Quick Color picker alternative!
- only a color circle + value slider
- exits immediate after use, or slight mouse move outside picker
- use scrollwheel to change HSV 'value'. Also works while picking.
- added nicer AA'ed cursor in picker
- All color swatches change 'value' on ALT+Wheel mouse-over
Old picker is still there, under SHIFT+click on swatch. Needs
evaluation... part of UI keymap? Per button type? Or divide
picker in left/right? Or just have all those old picker buttons
in another panel... I'm not to fond of this giant old popup.
|
|
First version of search-based ID browsing. Now only in use for the
top bar screen/scene browse. The python buttons will follow.
Also made search button colors match the theme colors from menu back.
Todos for browse-search:
- "Add new" will disappear, and become a separate icon button in the
row of widgets (like X, delete).
- Drawing the preview icons in menu
- Make search menu dynamic, with configurable number of items? And/or
multi-collumn... for now it's static
- Search menu should popup with last active ID visible and selected
|
|
Preview renders:
- Added proper button type (BUT_EXTRA) for preview buttons, to
handle drawing better. It now first draws an alpha mask, to
ensure the preview is correctly fitting inside the widget style.
It then draws the outline.
- Added protection for executing preview renders while regular
rendering, that's not going to work...
|
|
* Accept None as NULL pointers through python function calls.
* Added type callback for pointers back, it's useful still in
some cases. Made Object.data editable using this, the pointer
type varying based on object type.
* Wrap pin ID pointer in buttons space.
* Added subclasses for text and surface curve ID blocks, to
organize data better and get proper icons.
* Added RNA_type_to_ID_code and ID_code_to_RNA_type functions.
* Update RNA_access.h with new RNA types.
|
|
Nice goodie: Preview renders!
- Added new preview.blend, allowing super wide cinemascope previews
- Draws nicely blended inside widget type, rounded corners
- Preview now renders using all available cpus/cores.
- Uses - hopefully rock stable - method, which doesn't copy or
allocate anything for previews, but just uses render API calls.
- Multiple previews are possible! But, added provision in Jobs
manager to only render one preview job at a time. If you start
more preview jobs, they're suspended until it's their turn.
Bugfix: new buttons context code crashed when going full-window.
Tweaks are still needed for notifiers. I have to figure out still
how to retrieve SpaceButs button view types...
|
|
Further work on new "text search" button.
- Now allows to browse items (mouse, arrow key)
- Assigns active value
- Uses different backdrop to distinguish from popup menus
- Cleaned API for it, so it can be used nicely generic
Also added a search menu, which shows all currently working
operators: CTRL+ALT+F. (mind the looks, it needs some tweaks!)
To make a menu activating a button I've added a new event...
could use some tweaks.
Important note: the callback to pass on "old string" for text
button (bone rename) couldn't work yet, added first code for new
callback, but has to be worked on further. When bone rename gets
added it can be tested.
|
|
* Make modifier and constraint templates use left/right alignment for
buttons in the header.
* Added mdef bind operator as an example of how to use local context
for a modifier, and add some code I forgot to commit last time to
make this system actually work.
|
|
Part one of new text button type: SEARCH_MENU
This opens a popup showing all matches for a typed string, nice
for object names, materials, operators, and so on.
Warning: Currently menu doesn't function yet! Only draws choices.
As test I've added an operator search button in top bar. It only
shows operators that can be used in this context now. Also that
is part of the WIP, tomorrow more fun :)
|
|
Added a system for adding a "local" context in a UI layout.
This way you can define for example within a modifier panel
all operators to get the modifier in the context.
In the layout code:
uiLayoutSetContextPointer(layout, "modifier", &ptr)
layout.set_context_pointer("modifier", md)
In the operator:
ptr = CTX_data_pointer_get(C, "modifier")
md = context.modifier
|
|
* Added Constraints template and Add Constraint operator.
* Added toggle=True/False parameter to uiItemR, to get a
toggle button (actual button) rather than an "option"
button (checkbox)
* Added OPTION/OPTIONN button type, to distinguish with
TOG/TOGN.
RNA:
* Make all modifier pointers editable, including correct updates.
* Added notifiers and updates to constraints.
* Fix a stack corruption, pointed out by Andrea, and potentially
causing crashes.
|
|
* template_modifier creates the modifier box, and returns a layout
to put the buttons in.
* Only the armature modifier is now done with python code, all other
modifiers use C code. To convert a modifier to python, remove the
corresponding C code and create a function in DATA_PT_modifiers.
* Some modifiers still require some RNA work to get it working well,
especially to make pointers editable. Mostly that is a matter of
defining an own _set callback and put some of the modifier C code
into it.
* Still various buttons that don't work, like for hooks or mesh
deform binding.
* Fix for crashing decimate modifier (still disabled).
* Removed UI_BUT_NO_HILITE, HMENU.
* Make uiLayoutBox work with align.
|
|
Undid fix from matt to prevent tog button alignment, this is not
working that way... made UI look very bad (like layer buttons)
The new code has 'toggle' and 'option' button types, with the
latter being the new style, and first for icon rows, layers, etc.
Purpose is that RNA or py api would allow to distinguish.
|
|
- Made Normal (Sphere) button draw with nice AA
(check in node editor)
- Bugfix in alignment code, collumns were not drawing OK
- Picker buttons draw swatches again, and made them work.
|
|
|
|
* Fix buttons jumping around when resizing and zoom. Part of this was
adding a tiny a 0.001f offset in UI_view2d_view_ortho, otherwise the
rounding is unpredictable (used to be 0.375f, but that was disabled).
* Fix various issues with zooming, panning panels. V2D_LOCKOFS_X/Y is
now taken into account in more places in the view2d code, to avoid
zooming into the center or panning out of the view.
* Remove "Free" align mode in buttons window (it's not really useful).
* View3D/Graph/Image editors now use the same PanelType system as the
buttons window, means some deprecated panel code could be removed.
* Some small visual tweaks for panels.
* View 2D Reset operator (Home key), to reset zoom and panning for panels.
* Added argument to set number buttons as sliders (slider=True for itemR).
* Ignore labels for button alignment (doesn't look right).
* Fix some use of context.main in py scripts, should get data from active
object instead.
* Fix autotexspace -> auto_texspace in py script.
|
|
* Buttons are now created first, and after that the layout is computed.
This means the layout engine now works at button level, and makes it
easier to write templates. Otherwise you had to store all info and
create the buttons later.
* Added interface_templates.c as a separate file to put templates in.
These can contain regular buttons, and can be put in a Free layout,
which means you can specify manual coordinates, but still get nested
correct inside other layouts.
* API was changed to allow better nesting. Previously items were added
in the last added layout specifier, i.e. one level up in the layout
hierarchy. This doesn't work well in always, so now when creating things
like rows or columns it always returns a layout which you have to add
the items in. All py scripts were updated to follow this.
* Computing the layout now goes in two passes, first estimating the
required width/height of all nested layouts, and then in the second
pass using the results of that to decide on the actual locations.
* Enum and array buttons now follow the direction of the layout, i.e.
they are vertical or horizontal depending if they are in a column or row.
* Color properties now get a color picker, and only get the additional
RGB sliders with Expand=True.
* File/directory string properties now get a button next to them for
opening the file browse, though this is not implemented yet.
* Layout items can now be aligned, set align=True when creating a column,
row, etc.
* Buttons now get a minimum width of one icon (avoids squashing icon
buttons).
* Moved some more space variables into Style.
|
|
Cleanup of conventions for icon placement in menus.
Old code only allowed 1 icon per menu, forcing to pass on the sublevel
menu icon with exception handling.
Now sublevel icons are drawn automatically, allowing to add an icon
before name too. (Check shift+a menu)
|
|
Two fixes:
- objects in editmode now update data on saving .blend
- uifonts and uistyles were not freed yet on reading files
yet.
|
|
* Made separator item work horizontal & vertical.
* Add colon (:) automatic for int/float/enum/string.
* Added space variables to uiStyle and use them in the
layout engine.
* Added initial World buttons by Thomas Dinges, thanks!
* Added some code for modifiers in the Object Data context.
This will become a template though.
* Use a common poll() callback in the scripts to reduce code.
|
|
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
|
|
Fixes:
- HSV picker didn't work. Old option "No Hilite" for buttons made it not
being checked for input anymore. Needs to be on attention list!
- Node editor wasn't drawing buttons correctly. Two things to keep track
off:
- Use wmLoadIdentity(), not glLoadIdentity()
- I've added a wmPushMatrix() and wmPopMatrix() version for correct
wm-compatible push/pop. Only one level for now.
|
|
The Python API to define Panels and Operators is based on subclassing,
this makes that system more generic, and based on RNA. Hopefully that
will make it easy to make various parts of Blender more extensible.
* The system simply uses RNA properties and functions and marks them
with REGISTER to make them part of the type registration process.
Additionally, the struct must provide a register/unregister callback
to create/free the PanelType or similar.
* From the python side there were some small changes, mainly that
registration now goes trough bpy.types.register instead of
bpy.ui.addPanel.
* Only Panels have been wrapped this way now. Check rna_ui.c to see
how this code works. There's still some rough edges and possibilities
to make it cleaner, though it works without any manual python code.
* Started some docs here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNATypeRegistration
* Also changed some RNA_property and RNA_struct functions to not
require a PointerRNA anymore, where they were not required (which
is actually the cause of most changed files).
|
|
* For new buttons spaces, automatically set horizontal/vertical
align depending on size, instead of free.
* Cleaned up the UI panel API. There's now a new uiBeginPanel
function which takes a panel type, and a uiEndPanel which takes
the final size. uiNewPanel* functions will be phased out.
* Animate the re-alignment when a panel size changes, e.g. when
enabling dupliframes.
* Load ui scripts from the release/ folder first if it is
available. This makes it easier to edit ui scripts, since it
will directly use the original files which avoids having to
run the build system.
* Improve editing of panel types while blender is open. That
means fixing some issues with lacking updates, overlaps, strange
ordering. It even does an animation now when the panel resizes.
|
|
Fixed & upgraded tooltips to new drawing system.
Also fixed small error in menu shadows. Rounding of shadow below
menu went wrong.
|
|
More cleanup!
- removed old UI font completely, including from uiBeginBlock
- emboss hints for uiBlock only have three types now;
Regular, Pulldown, or "Nothing" (only icon/text)
- removed old font path from Userdef
- removed all old button theme hinting
- removed old "auto block" to merge buttons in groups
(was only in use for radiosity buttons)
And went over all warnings. One hooray for make giving clean output :)
Well, we need uniform definitions for warnings, so people at least fix
them... here's the real bad bugs I found:
- in mesh code, a call to editmesh mixed *em and *me
- in armature, ED_util.h was not included, so no warnings for wrong call
to ED_undo_push()
- The extern Py api .h was not included in the bpy_interface.c, showing
a several calls using different args.
Further just added the missing includes, and removed unused vars.
|
|
Various ui fixes:
- panel drawing now correctly follows scaled view
- made imagewindow buttons using TH_PANEL color back (was too dark)
- click on open/close panel was wrong
- menu items disabling now draws correct
- curve/hsv widgets didn't draw on right locations
- numsliders have nicer interior slider decoration
- new type TOGBUT to enforce old style toggle button (not new type
'option button' with checkmark
- (temp) disabled live updating while using Curve widget, was
too slow to be fun. Needs general solution :)
|
|
* Template slots are no longer specified per item, but are
a state now, set with uiTemplateSlot.
* Some renaming of Layout functions for consistency.
* Fix for roundbox in stack template, now is always behind
the other buttons.
* Improved python API for layout:
http://www.pasteall.org/5008/python
|
|
Grand cleanup:
- removal of FTF and ftfont dir
- removal of text.c which wrapped it
- wrapped old text drawing code temporarily, need to decide how 'style'
will behave per editor when you draw strings outside interface code....
wouldn't be very useful to set fonts locally all over?
|
|
More font style work;
- hooked up almost all ui buttons code to new font
system, including text clipping
- panel headers scale now too to smaller fonts
- added further style hints, for shadow/emboss. Is all going to
be in UI designer control!
- for fun; changed layout engine to spread vertical buttons in
window width
Next: removal of all usage of old font system, using 'styles'.
Will also move font blurring to blenfont module.
|
|
WIP commit for UI drawing.
- Hooked up Diego's new Font API
- Added Style definitions for fonts, currently it uses
a different font for panel titles to show it.
- Styles are in Userdef now too, still not finished
- Userdef "DPI" will offer global control over font size,
to match monitor size/resolution. It's meant to scale
widgets and headers too btw, later.
- Lots of code removed for old fonts, but that's unfinished.
On todo: too much to mention, will continue happily tomorrow!
|
|
- Widgets now draw projected themselves, putting window/region matrix
on 1:1 pixelspace. This allows zoomable buttons, but crispy.
- Note: text in smaller buttons dont get clipped correct now, WIP
- Fixed error with button types in some menus.
- removed temp UI_2_50 define hack.
|
|
- fixed pixel offset error for listview (outliner)
- removed a lot of old drawing code
- put back special widgets Normal, Curve, Colorband
|
|
- I key over a button inserts a keyframe.
- Alt+I removes a keyframe.
- With right mouse button a menu with these options pops up.
- Buttons are colored green if the property is animated, yellow
if it is on a keyframe. I followed the colors from the UI
mockups, but the flicker on keyframes seems too distracting in
practice?
- This only works for properties on the ID itself at the moment,
path callbacks need to be filled in for all structs but mesh
still.
- It doesn't work when you're over a related label, that needs to
be made to work.
- I made it insert keyframes outside of any keyingset. Not sure
how this is supposed to integrate?
|
|
Next part of UI drawing migration coding.
Now all calls go via the new wrapper; apart from some special types
(Colorband, HSV picking, Curve, Normal) they draw OK.
Also added new menu system, nicer shadow, and using same AA code.
Used dark theme suggestion from William btw. Don't get afraid, it'll all
be tweakable. :)
Next steps:
- move over all special button types
- make external calls for AA draw (nodes for example)
- remove old draw code
- make new colors save in theme
I also have to check on how to treat icons in buttons; this is a bit
cumbersome in cases.
Then the layout system comes back on agenda, will go over this with
Brecht tomorrow.
So; all WIP, be patient!
|
|
Added number slider drawing.
Color for dark part will be themeable. :) (optional rgb?)
|
|
* Added support for RNA pointer buttons. It's like the existing
ID pointer buttons but with an icon, and autocomplete works.
There's some drawing issues currently but don't want to
interfere with the refactoring here. Also todo is support for
things like vertex groups or bones.
|