This commit merges the code in the pie-menu branch.
As per decisions taken the last few days, there are no pie menus
included and there will be an official add-on including overrides of
some keys with pie menus. However, people will now be able to use the
new code in python.
Full Documentation is in http://wiki.blender.org/index.php/Dev:Ref/
Thanks:
Campbell Barton, Dalai Felinto and Ton Roosendaal for the code review
and design comments
Jonathan Williamson, Pawel Lyczkowski, Pablo Vazquez among others for
suggestions during the development.
Special Thanks to Sean Olson, for his support, suggestions, testing and
merciless bugging so that I would finish the pie menu code. Without him
we wouldn't be here. Also to the rest of the developers of the original
python add-on, Patrick Moore and Dan Eicher and finally to Matt Ebb, who
did the research and first implementation and whose code I used to get
started.
- Forgot to handle command line arguments
- Because of the fact we need to be able to
use stdout and stderr we need to use regular
console application for the wrapper.
- Because of using regular application for the
wrapper we need to check forparent PID in the
isStartedFromCommandPrompt().
I really hope it's not gonna to become any more
complicated.
uses old behavior again. OSX menu and CTL-CMD-F still work as lion fullscreen as well as right-upper corner fs window-icon
- We must investigate here why double promotion happens from op calls ( dispatchEvents on redraw cause duplicated calls here )
- The actual op calls cause fs to be in a wrong state, so also mousehandles fail and CTX_wm_window(C) is not valid.
- similar problem is with quit op, which does not close the app right ( totblocks )
- i would prefer to try getting direct os function call here rather
The problem is that the render window keeps keybord input focus even after it has been
lowered. Windows maintains the Z-order of windows, so the present solution is to raise
the window that has been just below the render window.
Differential revision: https://developer.blender.org/D594
Reviewed by: campbellbarton
On earlier versions there is no proper multi-monitor support, so we leave the
choice still. But for 10.9 this just interacts better with other elements like
spaces and the dock.
With edits by Campbell, thanks!
Looks like in some cases (driver dependent?), `XDeviceMotionEvent` get generated with only part of expected data
(e.g. only x coordinate, only pressure, etc.), data which did not change since last event being NULL.
We know which data to actually handle with `XDeviceMotionEvent.first_axis` and `XDeviceMotionEvent.axes_count` values.
Reviewed by: campbellbarton
Differential Revision: https://developer.blender.org/D208
The console window is hidden by default, but we need to avoid this when
starting from the command prompt, because it would hide the window you just
typed the command in.
Previously it would check if Blender was started from "explorer.exe" to
determine that, but that wasn't working for application launchers like
Appetizer or Colibri. Instead we now check if the process ID is the same as
the process ID of the console window, which appears to work reliably.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D122
This means that if you have WITH_BF_QUICKTIME or WITH_CODEC_QUICKTIME enabled,
it will always use QTKit.
The old backend was only used on 32 bit OS X builds, now 32 and 64 bit builds will
give consistent input/output. On Windows or Linux quicktime isn't being used.
and restore of window setups with multiple monitors, but they are also causing
regressions, in particular issues with Blender overlapping the taskbar and the
user preferences opening wrong. We decided to revert to the old behavior for
the release.
See bug #36707 for the full explanation.
Issue was caused by bug in mesa #54080 which makes
glXQueryDrawable fail with GLXBadDrawable for any
request with direct context.
Worked around by temporary overriding X error handling
when getting old interval value and disablingintervals
extension if this query fails.
Also added check for glXSwapIntervalEXT which is
apparently NULL here with GLX_EXT_swap_control=1.
There is some sort of problem with the SSE2 code path, but I couldn't find
the cause, maybe a compiler bug due to the large amount of inlining? For
now I've disabled SSE2 optimizatons in 32 bit GCC builds.
Reported by holy enigma
The previous commit in this area removed bounding box checks, because
they were done against primary monitor. Now do bound checks against
the entire desktop, or rather, the virtual screen. This is the bounding
rectangle of all the monitors.
This should ensure windows are always created within the confines of this
area.
On Windows the system window will be sized an positioned such that Blender screen area lower left
corner is at the requested location, and with dimension as requested.
Thanks to Alexander N. for reporting and Brecht van Lommel for input.
This should be (and is) done by the caller instead (windowmanager)
to ensure new windows fit properly on the desktop. Saving
stretched layouts and layouts with window over display
boundaries now becomes possible on Windows too.
The reason of this is because PATH_MAX is not guaranteed
to be defined on all platforms and Hurd doesn't define it.
So either we need to support arbitrary long file path or
we need to define own maximum path length.
The rule here would be:
- If it's not big trouble to support arbitrary long paths
(i.e. in ghost by using std::string instead of char*)
then arbitrary long path shall be implemented.
- For other cases to use PATH_MAX please include BLI_fileops.h
which takes care of making sure PATH_MAX is defined.
Additional change: get rid of own changes made yesterday
which were supposed to make storage.c work fine in cases
PATH_MAX is not define, but on the second though it lead
to unneeded complication of the code.
Thanks Campbell for review!
- Removed grid-snapping for area coordinates on scaling windows.
That caused the areas to shrink or expand, and eventually corrupt screen layouts.
- Added simple but efficient life resize for OSX. I need to know why this is so much
code for Windows... I suggest Windows to just copy same method; dispatch the queue,
and just let the event system draw.
* Also do pressure interpolation for brush size and spacing.
* Do smoothing of pressure when smooth stroke and sample average is enabled.
* Revert the OS X specific pressure change to pressure ^ 2.5, for low pressure
values like 0.05 it makes the pressure 100x lower, which is problematic. If
we need to adjust the pressure curve it should be done for all platforms.
Still weak:
* Pressure of first touch on tablet is difficult to control, usually it's low
which makes the stroke start out small or soft, but other times not. Finer
event capturing at ghost level would help, along with pressure changes without
mouse movement, but this may also need different paint stroke logic.
* Brush radius is rounded to integers, this gives noticeable stepping.
* Brush falloff is not antialiased, gives noticeable aliasing for small brush
sizes which was always a problem, but is more common with size pressure control.
Another issue with the recent Ghost changes here. For some reason key up events
are not coming through when the command key is pressed. I can't figure out why,
for now just always handle them, still fixes the original bug.
interact better with system shortcuts.
This is a special shortcut for switching between views and does not get
delivered directly to our view when we pass it through the application key
event handling path. We only have a single OpenGL view, so there's no need to
pass it on to the application, instead just interpret it directly.
insert text in the text editor and do the associated operation like minimizing the
window or switching windows.
The code was always doing both without trying to ensure only one is done. Now we
integrate a bit better with the event handling and pass the event to NSApp, which
then decides to handle the event itself or pass it on to the window, from where
we then send it back to be handled.
fullscreen option. It was possible to enable both at the same time which got
you stuck in a state where it was impossible to exit fullscreen. Now I've made
them mutually exlusive, only one can be enabled at the same time.
Note the reason we need to support both is because the new Lion fullscreen does
not work with multiple monitors, it will just give black screens on the other
monitors. This is a limitation of OS X, you can find many complaints about this
online.
Custom implementation for resizing (GHOST_SizerWin32)
Some things still don't work:
* esc cancel
* max windows size
* aero (sizing) snap on win7
hbrBackground = 0 to disable clear screen.
Thanks to dfelinto for help in finding of root cause.
Mac OS X full screen: the old option to go full screen now didn't hide the
dock/topbar anymore. Also made it use dock auto-hide now, not permanent hide.
Blender now supports the 10.7+ "Full screen" mode, which pushes a window to a permanent
other "screen", with animated zoom and sliding.
Available via the icon in window header (right), Apple+F, or "Window" menu in top.
Works much nicer than Blender's own "full screen" option.
Todo: the zoom effect is still draws a bit ugly, because Blender doesn't have "live resize"
yet.
- without python builds without warnings.
- replace MAXFLOAT -> FLT_MAX in some areas, MAXFLOAT overflows (lager then float range).
- add cmake option WITH_GCC_MUDFLAP to enable libmudflap use.
changing the screen resolution wasn't still allowed for larger virtual desktops.
added an exclusive option to ghost so the fullscreen window is ignored by the window manager and we get all events. (common practice for games on X11).