Mac OS X trackpad and 'mighty mouse' fix.
An old commit from Damien in 2010 tried to make mighty mouse touches work as if
this is a scrollwheel. The error in that code was that the "kinetic scrolling"
feature failed. When releasing your fingers, the events passed on to Blender
then switched from "trackpad pan" to "mousewheel zoom".
This commit makes trackpads and mighty mouse behave identical. Only difference
is that trackpad panning needs 2 fingers, mighty mouse only one.
Note that trackpad and mighty mouse 3d zoom works with holding ctrl!
All works nice with this kinetic feature now. Fun :)
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.
a size parameter between 0.0 and 1.0 that gives a angle of reflection between
0° and 90°, and a smooth parameter that gives and angle over which a smooth
transition from full to no reflection happens.
These work with global illumination and do importance sampling of the area within
the angle. Note that unlike most other BSDF's these are not energy conserving in
general, in particular if their weight is 1.0 and size > 2/3 (or 60°) they will
add more energy in each bounce.
Diffuse: http://www.pasteall.org/pic/show.php?id=42119
Specular: http://www.pasteall.org/pic/show.php?id=42120
- 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.
Since the window manager is needed for keymaps this is kept as an exception.
some addons will need updating, but in every case I've seen addons should not be accessing the context while registering.
(bad stuff! - declaring the scene as a global variable - which crashes when the users loads a new file, manipulating the active object or scene... tsk tsk)
- 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.