- Button panel animation didn't work for 3D View properties and similar regions.
- Akey on View3d overlapping panel: was accidentally passed on as event to the main window.
Notes in code:
- This has to become a decent handler
- Actually "A" should open/close all?
Currently, Enter key does open/close too, but only on headers.
This because Enter on a button gets handled by buttons... that's
why the Akey was proposed :)
- Recoded soft shadow drawing for menus, giving better predictable results
(and round off nicer on top side, was looking bad still)
- Brought it under DPI control
- Added Theme setting to control size and strength for it.
Max size 24 pix:
http://wiki.blender.org/index.php/File:MenuShadow.png
- yes, this does break scripts, but the api is marked experimental.
ED_region_draw_cb_activate() adds a callback to a region type whereas the api made it look like the callback was being added to the region instance.
Use a class method on bpy.types.Space to manage region drawing, eg.
was:
self._handle = context.region.callback_add(draw_callback_px, args, 'POST_PIXEL')
is now:
self._handle = bpy.types.SpaceView3D.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_PIXEL')
Mouse coordinates were not mapped correctly for code that allows to use
multiple windows efficiently (mouse over not-active windows).
Apple's high-density display mode works a bit strange, requiring some hacks :/
- Desktop coordinate system (mouse pos and for windows) is as usual
(set by display resolution settings)
- However, the available pixels in a window is always on 'retina' level.
(full screen - 2880 wide, but window can be 1440 or 1920 wide)
In order to get this to work for opengl and Blender, we use internally the
coordinates on pixel level. That means that window positions and sizes have
to mappend in our code.
Once all issues for retinas have been tackled, I'll check on clean API for
it, so you can also use it in future for other high density screens.
- Since 2.50, the .blends have the current file name stored
- In versions up to 2.65.0 this didn't save for files saved from startup
(i.e. files saved without loading a file)
Code now adds the file name after all, except for recovery loads.
Recoded the (2.65.1 version) region scale, which happened on loading files with
different saved size windows. Also scaling window itself was affected.
Old method: scaled region widths based on area/editor scaling factors.
That was leading to too small or too large button regions easily.
New method: region width/height now are in DPI control. Much nicer!
- On changing dpi, buttons remain visually same widths.
- On changing window sizes, the button views and zooms stick to exactly same.
Caveat: people who were using Blender with 'extreme' dpi setting, might find
the layouts slightly differ. Not sure if this is worth version patching...
Todo: overlapping regions that overlap together draw badly. Fix underway.
- Include RNA properties when checking for matches.
- Don't include the context's property store (these are normally set by the UI code and not accessible by a script author)
Note: added CTX_data_dir_get_ex() which has options for returning different members from the context.