Age | Commit message (Collapse) | Author |
|
* Split Info and User preferences into two separate spaces.
* Renamed Buttons Window to Properties also in RNA identifiers.
|
|
unregister func.
- use RNA_struct_blender_type_set to set the type to NULL before its freed
There is a memory error here when reloading scripts - ui_handler_panel_region, need to look into theis further.
|
|
* Fix issue where it would automatically scroll when collapsing panels.
* Fix panel dragging not taking zoom level into account.
* Fix enum menu having too small default width in headers.
* Fix tooltips not showing shortcuts etc. if there was not tooltip
defined for the button.
* Fix some refresh issues with color ramps.
* Add a bit more space between columns in the layout engine.
* Make scrollers darker so they are less distracting, and highlight
instead of reverse shading when dragging.
|
|
|
|
* Added basic infrastructure to layout user preferences. The
intention is that you open a user preferences space in place
of the buttons space, and have panels there.
* The existing sections don't have to be followed, it's easy
to create different ones, just change the user_pref_sections
enum in RNA.
* This will get separated from the info header later.
|
|
* Fix poll() callback changes in recent commit, note that these have
to work with pinned context too.
* Hide header for context panels in py layout.
* Don't jump back when collapsing a panel, allow the view to be
over some empty space until you scroll back.
* Fix follow context icon, order had to be reversed in icon file.
* ID template now has icon as part of browse button instead of
outside the buttons.
|
|
* Context panel now draws without header, with arrows, no scene name.
* Softbody vertex group search popup.
* Improve names for autogenerated shortcut keys in menus.
* Make most Select menus in the 3D view header work.
* Fix armature border select selection syncing.
* Add POSE_OT_select_constraint_target,
MESH_OT_select_by_number_vertices, MESH_OT_select_vertex_path.
* Merge mesh select similar into one operator.
* Don't give MESH_OT_select_random Space hotkey.
* Add DAG_object_flush_update to many mesh edit tools, not calling this
will crash with modifiers.
* RNA_def_enum_funcs for dynamic enums in operators, but not very useful
without context yet.
* Fix refresh issue with image window header + editmode.
* Fix drawing of shadow mesh for image painting.
* Remove deprecated uiDefMenuButO and uiDefMenuSep functions.
* Remove keyval.c, code is in wm_keymap.c already.
* Rename WM_operator_redo to WM_operator_props_popup.
|
|
Cleanup of scroller drawing in 2D windows.
Before:
http://download.blender.org/institute/rt11.jpg
After:
http://download.blender.org/institute/rt12.jpg
Will add 'zoom' widget circles later, as mockupped here:
http://www.reynish.com/files/blender25/fcurve_scrollbar.png
Also note the scale values are inside scroller; drawing it
on top conflicts with current frame item and markers.
Currently scroller disappear entirely when view is total.
For Joshua:
To make sliders behave nicely, the boundbox (v2d->tot) has to
be refreshed on each change. I've added it in graph drawing
now, but it could be notifier based I guess... not sure what
the correct anim api call would be. Can discuss tomorrow!
On todo:
Layout config hints so people can make scroller positions swap.
|
|
* start of filebrowser RNA
* system files, bookmarks, etc. now nicely inside panels to allow collapsing etc.
* filebrowser header now defined in space_filebrowser.py
TODO:
* button type for bookmarks etc. not final yet, at least should get centered still. Suggestions welcome here.
|
|
Bugreport; on dragging area edges, the mouse-release event was
swallowed by the panel animation handler. Thanks Pablo Vazquez
for report. :)
|
|
Part one (of probably many :) of Operator review/validation.
Nothing final nor defined, it's reseach :)
- Added tool buttons in "Toolbar" (Tkey). Just four examples
for objectmode, and six for mesh editmode.
(Review in progress is operator internal state vs context, what
do redo exactly, undo vs redo syncing, when op->invoke or not,
etc. This has to be pinned down exactly and frozen asap)
- On undo, clear redo-operator-stack for now (won't work)
- Added call to better detect active/current view3d region.
ED_view3d_context_rv3d(C)
- Fixed some operators that missed correct redo (add-prim etc).
Later more fun!
|
|
* Fix issue with panel header line not always being hidden
for the first panel.
* Fix graying out of aligned buttons being off by one pixel,
did not find a nice solution for it though, so just added
-1/+1 in the code.
|
|
* 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.
|
|
Small fixes:
- Preview render now accepts resize of 1 pixel without re-render,
solves re-renders on scrolling window or dragging panel, because
of float rounding.
- Panel dragging outline was off 0.5 pixel, showed as fat AA lines
- On switching tab, the preview gets re-rendered
|
|
* First step for buttons context browsing, read-only still.
* Drawn in a panel now, though this should become a separate region.
* Path of the context is constructed as an array of RNA pointers and
then used for drawing and context lookups from python.
|
|
* Hide enable button in horizontal collapsed panels.
* Fix enable button not being in correct position when zooming.
* Fix n-key panels layout being messed up.
|
|
|
|
* 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.
|
|
|
|
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.
|
|
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).
|
|
|
|
* Forgot to finish this code yesterday, dragging panels was
broken. This is fixed and new panels are now inserted after
the last added one, inbetween others rather than at the end.
|
|
* 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.
|
|
- Fun for testers: Added "Redo Operator" Panel in view3d 'nkey' region.
It's going to be part of tools UI I know, but this will give good
tests of what goes on with operators. I had to add small fixes in
Transform for it already. :)
One important issue to note is that it lists every operator, also from
non-3D-window ops. Needs checked or classified somehow.
- Fix: removed bad 2.4x hack from how pulldown menus were defined. Made
widget code cleaner, and will show menus like SHIFT+A correct now.
|
|
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 :)
|
|
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!
|
|
- Updated panel tabbing code to at least make it work again
- And some more minor UI tweaks
|
|
- 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.
|
|
- 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?
|
|
Some more work on UI drawing code, added a generic structure
for how widgets will be defined. It's still a wrapper on top
of old buttons. Docs follow still.
Some visual improvements;
- more button types supported (check render buttons)
- pressed state is shown
- better 'panel' triangle AA, and new divider style
Still a lot of work here. I expect the next days/weeks to
be much more coding too, had to catch up with a lot of other
Blender stuff. There's more (excitement) going on than code. :)
|
|
* Fix sometimes non-working close/open button.
* Fix panels being a bit out of the view on startup.
* Fix too large totrct region for view2d.
* Fix wrong panel order when changing vertical <-> horizontal.
* Fix wrong panel positions after switching contexts.
* Fix an access of freed memory when collapsing panels.
* Free align mode works again.
* Animations work again.
|
|
* Added a PanelType and HeaderType for registering panels
and headers in regions. When the region draws, it will
then automatically draw the ones that were registerd with
poll and draw callbacks.
Used for text header, properties and object buttons now.
|
|
* As a test, used by:
* Object buttons, tried to make it match the mockup.
* Text window header.
* Text window properties panel.
* Panel interaction with view2d is still problematic, need to make
this work properly still.
* Templates are very basic, the ones there are simple but already
can follow the object buttons mockup quite closely.
* It's based on a three level system: panels, templates and items.
To get an idea of what that means in practice, see:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/UI_LayoutEngine#Panels.2C_Templates_and_Items
|
|
Useful goodies: most buttons for Image window back.
Not every button works! But what you can do:
- press Nkey to show/hide options
- use curves, with realtime updating
- image properties panel, load, browsing layers,
setting types
- paint panel
- plus new paint color picker panel! (why it wasn't
there in 2.4x is probably obvious, but now it can!)
Hrm... radial control should be added here too, and a nice
paint size cursor?
|
|
*** Proof of concept! ****
3D window Panels back, in own designated region for now.
Activate or hide it with Nkey.
Note that Background Image doesn't work yet, Transform
Orientations probably need tests by Martin, Sculpt options
have to be recoded there by Nicholas.
The UI design sessions will of course review all of this!
We'll have to solve a lot of related topics;
- navigation (where) and context (what)
- non-overlapping layouts vs floating panels/bars
- properties vs tools (toolbars)
- drop panels and make nice (semi-automated) list views?
I've also done experiments with making the main 3d view
stay 'behind' the buttons region. That makes popping buttons
in and out less distracting, but also makes it obscuring
the view... it's not in this commit, it didn't work proper :)
To get that work it has to be handled by the internal
compositor, then it even can have fancy transparency in back.
Anyhoo, time enough to play with this a while. Especially for
Image window (paint) it can work well too.
|
|
Bugfix: mouse key checks should use KM_PRESS checks now.
Interface toggle button didnt work for that reason. :)
|
|
* Cleaned up UI_interface.h a bit, and added some comments to
organize things a bit and indicate what should be used when.
* uiMenu* functions can now be used to create menus for headers
too, this is done with a uiDefMenuBut, which takes a pointer
to a uiMenuCreateFunc, that will then call uiMenu* functions.
* Renamed uiMenuBegin/End to uiPupMenuBegin/End, as these are
specific to making popup menus. Will convert the other
conformation popup menu functions to use this too so we can
remove some code.
* Extended uiMenu functions, now there is is also:
BooleanO, FloatO, BooleanR, EnumR, LevelEnumR, Separator.
* Converted image window headers to use uiMenu functions, simplifies
menu code further here. Did not remove the uiDefMenu functions as
they are used in sequencer/view3d in some places now (will fix).
* Also tried to simplify and fix bounds computation a bit better
for popup menus. It tried to find out in advance what the size
of the menu was but this is difficult with keymap strings in
there, now uiPopupBoundsBlock can figure this out afterwards and
ensure the popup is within the window bounds. Will convert some
other functions to use this too.
|
|
Timers: added extra 'event type' argument to call to add a timer:
WM_event_add_window_timer(win, event_type, interval)
This way other timer systems don't generate overhead on the queues.
(button timers were creating unused animation-playback operators)
|
|
* API and usage is basically the same still.
* Panels were moved to region level. I first thought of keeping them at area
level, but having them at region level it's simpler to handle events and do
drawing, and also to integrate with view2d. They can still become area level
overlapping regions, if we make a floating (or docked) region that can
contain panels.
* Added back a few panels from the scene buttons for testing.
Issues still:
* The view2d handling and alignment refresh of panels is not correct yet in the
buttons window.
* I did not yet bring back the block handlers system. It was basically a system
that stored which panel was open and where the events for that panel would go.
Just a few functions, but not sure how it fits in 2.5.
* There was a case where dragging panels would not properly remove the window
level handler, but could not redo anymore even though I don't think I fixed
it.
* Some text in the panels goes past the end of the button, that is due to the
checkmark button drawing, not related to this commit.
Other UI code changes:
* Renamed interface.h to interface_intern.h for consistency.
* Fixed some issues with freeing of blocks when they changed due to context.
* uiDrawBlock now takes a context pointer (mostly for block drawextra).
|