Commit Graph

1245 Commits

Author SHA1 Message Date
Campbell Barton
301433fe9d Fix OpenGL Context freeing 2015-01-13 01:44:40 +11:00
Campbell Barton
d8fc404415 Cleanup: style 2015-01-12 18:56:36 +11:00
Jens Verwiebe
e5063b0bd3 Cleanup: OSX: remove obsolete ppc/ppc64 sw-renderer kCGL attributes 2015-01-04 20:42:16 +01:00
Jens Verwiebe
c1f54bcdcc OSX: revive GHOST_HACK_getFirstFile cause it breaks things on older OSX versions.
Dunno exactly why this was done earlier, but propose not to remove code not understood.
2014-12-25 15:12:56 +01:00
julianeisel
c71c7f0e0b Correction for non-Windows SCons compiling fix after IME Merge
As discussed in rB983c71931b1886d4, we should print a warning in case of building on non-Windows and WITH_BF_IME enabled. We also terminate build in this case, so the warning isn't scrolled away. Was worked out together with @sergey.
2014-12-11 00:22:17 +01:00
Campbell Barton
690345a826 Cleanup: spelling 2014-12-08 09:46:21 +01:00
julianeisel
983c71931b Fix non-Windows SCons compiling error after IME merge 2014-12-07 23:57:51 +01:00
Severin
12e5a32557 Forgot to add new files in recent IME commit
Sorry, my bad :/
2014-12-07 18:23:02 +01:00
Severin
e81d077c85 Input Method Editor (IME) support for text buttons
Original patch by @random (D765) with some minor work done by @campbell
and me.

At this place, I'd like call out a number of people who were involved and
deserve a big "Thank you!":
* At the first place @randon who developed and submitted the patch
* The Blendercn community which helped a lot with testing - espacially
* @yuzukyo, @leon_cheung and @kjym3
* @campbellbarton, @mont29 and @sergey for their help and advises during
* review
* @ton who realized the importance of this early on and asked me for
* reviewing

We are still not finished, as this is only the first part of the
implementaion, but there's more to come!
2014-12-07 00:58:17 +01:00
Jens Verwiebe
6e8a8a72a3 OSX: change previous commit to not only make animation-player window frontmost but whole process 2014-12-06 12:13:28 +01:00
Mike Erwin
036f4e7a38 Cleanup: style from my previous commit 2014-12-06 03:48:41 -05:00
Mike Erwin
c077f5fa08 Fix T42789: support 3Dconnexion wireless devices
SpaceMouse Wireless
SpaceMouse Pro Wireless

Device info is from user reports. I don’t yet have the new devices, so
these are untested but likely to work :D
2014-12-06 02:48:51 -05:00
Jens Verwiebe
825d6adef5 OSX: make sure window of new blender instance is front when playing animation 2014-12-05 18:42:10 +01:00
Alexandr Kuznetsov
dc199369d1 Fix T42426. Add support for UK "`" key.
Because key == OEM_8, there no clear conversion for different keyboard layouts.
Also, we must map key to GhostKey for shortcuts.
2014-11-30 14:44:53 -05:00
Sergey Sharybin
e9645806f5 Fix T42420: Touchpad zoom and scroll gester using touchpad stopped working
Seems to be an own mistake on using Windows API.
2014-11-26 16:46:01 +05:00
Antony Riakiotakis
8d5d6de761 Reuse local view for UVs for previous commit, thanks to Campbell for the
suggestion.

Also minor compile fix after viewport patch
2014-11-14 14:06:39 +01:00
Campbell Barton
08974c22e4 Fix X11/GLX failing with multi-sample
Caused by D643, in fact we need to get the visualInfo before creating the window.
2014-11-14 13:43:22 +01:00
Campbell Barton
9ebe44bc9c Cleanup: cmake 2014-11-13 15:30:32 +01:00
Campbell Barton
577327635c GHOST/X11: correct USE_X11_ERROR_HANDLERS define 2014-11-13 10:58:01 +01:00
Campbell Barton
133f79e449 Cleanup: warnings, typos 2014-10-29 14:15:21 +01:00
Jens Verwiebe
8dbce41706 OSX/GHOST: fix T42305, appswitching not reliable, proposed by Fabio Arnold 2014-10-28 20:44:05 +01:00
Jens Verwiebe
f0d475d3de OSX/GHOST: more little cleanups 2014-10-23 14:40:56 +02:00
Jens Verwiebe
abf7bd8d98 OSX/GHOST: some cleanups 2014-10-23 14:34:56 +02:00
Jens Verwiebe
b6dc15278c OSX: move notification into its own function 2014-10-23 14:20:16 +02:00
Jason Wilkins
88fe896243 Checked each of my (jwilkins) XXX notes.
The ones in extern/glew-es have been changed to NOTE instead of XXX

GHOST_ContextEGL.cpp: It really does seem that it is not possible to query the swap interval using EGL

GHOST_WidnowCocoa.h: The comment referring to Carbon is clearly out of date, so I removed it.

math_geom.c: The node about not using tmax again is correct, but the code is kept for a future maintainer who will need to know how to compute it if they modify that code.

paint_image_proj.c (2698): The question about integer truncation does not appear to have been resolved.  It still seems to be an incorrectly implementation of rounding (I'd suggest using the round function instead of this hack).
2014-10-22 20:03:25 -05:00
Jens Verwiebe
459c5d2045 OSX: as we cannot be sure to have ARC, better release allocated notification 2014-10-22 20:17:04 +02:00
Jens Verwiebe
dfc0afb5b8 OSX/GHOST: use notifications to inform user about a progress reached 100%
The occurance can be controlled in NotificationCenter, todo: move to own function ?
2014-10-22 19:59:16 +02:00
Dalai Felinto
7fb68cf83f Fix python module (bpy) compilation - broken since 8d084e8c
(reported on bf-python mailing-list and in my github (!), let's hope in
the future we get more reports in developer.blender.org instead ;))
2014-10-17 12:00:54 -03:00
Campbell Barton
5918fcb5e7 Cleanup: ws 2014-10-14 17:49:37 +02:00
Jens Verwiebe
11e7679d1c OSX/GHOST: replace spaces with tabs in sesponese to rB424c050a6fc1
New IDE did not take over my former setting for preferring tabs
2014-10-14 17:27:36 +02:00
Jens Verwiebe
e0cacb808c OSX: refinement for last fullscreen condition commit 2014-10-14 13:17:14 +02:00
Jens Verwiebe
424c050a6f OSX: only use lionstylefullscreen when seperate spaces are used, todo: use respondsToSelector to simplify the whole detection 2014-10-14 12:48:16 +02:00
Jason Wilkins
4d4da31ee5 in GHOST_ContextWGL.cpp, in functions that use goto, converted declarations to C89 style to prevent jumping over constructors 2014-10-13 19:20:01 -05:00
Jason Wilkins
815919b1fb fixed printf format warning that occurred with 64-bit targets 2014-10-10 23:21:44 -05:00
Jason Wilkins
dd897de061 check for missing Windows error code headers (was missing from Mingw64) 2014-10-10 23:21:44 -05:00
Jens Verwiebe
fd6537a53a OSX: as an prerequisite to make Dalai's upcoming "area_fullsceen" work,
make sure the window states are correct in the lion_fs animation phase.
This also assures the CTX_wm_window(C) is okay.
2014-10-10 12:58:52 +02:00
Jason Wilkins
8d084e8c8f Ghost Context Refactor
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
2014-10-07 15:47:32 -05:00
Jens Verwiebe
9241f12e10 OSX/Ghost: little code cleanup 2014-10-05 12:45:14 +02:00
Jens Verwiebe
faaf0c719f OSX: ensure windows are restored at their saved position,
meaning here we need to take docksize into account
2014-09-24 20:55:48 +02:00
Campbell Barton
3f2cf6da6f Cleanup: remove _DEBUG define usage 2014-08-27 18:59:32 +10:00
Campbell Barton
d93c07d987 Cleanup 2014-08-21 09:23:07 +10:00
Sergey Sharybin
adb08def61 Fix T39630: Mouse Wheel doesn't detect Multi Window Focus 2014-08-18 20:50:57 +06:00
Campbell Barton
bba80ed7af Cleanup 2014-08-17 12:18:40 +10:00
Campbell Barton
88ee650263 Comments 2014-08-16 10:51:07 +10:00
Jens Verwiebe
fc2b6a2b9d OSX: fix paranthesis in last commit 2014-08-13 15:32:35 +02:00
Jens Verwiebe
3bbba7d2b1 OSX: add a fix for lion_fs loosing handles after calling fs from key shortcut, also reenabled lion_fs for OSX >= 10.9 again 2014-08-13 15:27:41 +02:00
Sergey Sharybin
2eebe611e4 Fix T40717: Screen does not update while scrolling or zooming with touchpad on a laptop
This is rather workaround solution for now, which seems to
work and it's not that huge to maintain (one liner apart from
the comment).

Idea is to make sure PeekMessage peeks the message when window
proc receives WM_MOUSEWHEEL (some touchpad drivers seems to
swallow the messages making it so PeekMessage doesn't get
anything).
2014-08-13 13:49:30 +06:00
Campbell Barton
7df4fc5eaf Spelling 2014-08-13 09:34:37 +10:00
Campbell Barton
dfd9bfd3a8 Spelling 2014-08-13 08:38:16 +10:00
Sergey Sharybin
794277f8b6 Stupid MSVC replaces tabs to spaces spontaneously :S 2014-08-12 16:51:37 +06:00
Sergey Sharybin
0fc4289c39 Console detection now works reliably when starting blender-app directly 2014-08-12 16:48:46 +06:00
Campbell Barton
d124bd1cd4 Spelling 2014-08-12 10:31:07 +10:00
Campbell Barton
afe8a4040f Fix uninitialized memory use 2014-08-12 08:21:02 +10:00
Antony Riakiotakis
028fd29eeb Pie Menus C code backend.
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.
2014-08-11 11:02:26 +02:00
Sergey Sharybin
57c4871146 Tweaks to the recent wrapper on windows
- 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.
2014-08-08 00:22:57 +06:00
Thomas Dinges
e3ed13cbd4 Cleanup: Remove special code for Visual Studio 2008.
Goodbye VC2008, it has been a pleasure (more or less) :D SCons / CMake cleaenup will follow.
Differential Revision: https://developer.blender.org/D715
2014-08-07 13:52:15 +02:00
Campbell Barton
ea9d94cf28 Spelling 2014-08-06 05:41:14 +10:00
Campbell Barton
9c3025cd26 Spelling 2014-08-02 16:53:52 +10:00
Campbell Barton
648ee669b7 Style cleanup GHOST/Win32 2014-07-27 13:40:39 +10:00
Jens Verwiebe
333aaca294 OSX/GHOST: Using lion_fullscreen suffers from an uncovered problem when called from operator, disabled for now so ALT-F11
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
2014-07-26 18:51:39 +02:00
Campbell Barton
b7b1c09766 Code cleanup: ghost style 2014-07-24 21:40:01 +10:00
Campbell Barton
d5297b6283 Fix T39825: Crash on startup with tablet 2014-07-03 16:33:47 +10:00
Tamito Kajiyama
fef9463123 Fix T40065: Pressing Esc in separate render result window does not focus main window.
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
2014-07-01 15:01:35 +09:00
Jens Verwiebe
f37ec65f80 OSX: Fix T40749, own mistake for m_lionStyleFullScreen condition 2014-06-23 21:27:38 +02:00
Bastien Montagne
871a8eb6b2 Fix T40609: Wrong WS between word and '?' (no space in english typography in those cases). 2014-06-14 15:59:12 +02:00
Campbell Barton
6c0926e802 Code cleanup: use const for mouse location arg 2014-06-14 00:47:12 +10:00
Campbell Barton
b72eca435e Code cleanup: remove NULL check 2014-06-14 00:47:11 +10:00
Jens Verwiebe
ee812ce880 OSX: Ideasman does not like using utsname, so i use the always satisfactorily working sysctl method now for runtime OS detection 2014-06-06 22:06:26 +02:00
Campbell Barton
ae4ed68dfe Code cleanup: style 2014-06-06 07:54:05 +10:00
Jens Verwiebe
98bf3959b4 OSX: replace deprecated (10.8 ) Gestalt function with utsname, no functional change 2014-06-05 22:14:25 +02:00
Campbell Barton
5d63f162d5 Fix numpad emulation in non-US keyboards
Patch D455 from Benoît Legat with own minor edits.
2014-04-10 20:31:00 +10:00
Campbell Barton
1f58bfb8be Code cleanup: de-duplicate cotangent weight function & add arg sizes 2014-03-30 11:08:33 +11:00
Jens Verwiebe
8d09ec63b7 OSX: fix another kCGLRendererAppleSWID 2014-03-10 22:29:08 +01:00
Jens Verwiebe
e913eab386 OSX: change a longterm deprecated kcgl constant, could lead to crashes else 2014-03-10 22:27:29 +01:00
f04fd50073 Fix X11 mouse cursor flickering briefly to the standard cursor when changing it.
Not very visible now but it matters for the next commit.
2014-03-06 18:23:21 +01:00
Campbell Barton
1c866c377a Fix/Workaround for NDOF/X11 bug with unreliable GHOST_kFinished events. 2014-02-15 18:40:33 +11:00
Campbell Barton
6e54c87769 Code cleanup: use const short for ndof axis args 2014-02-15 18:35:48 +11:00
Campbell Barton
004decc1d9 Code cleanup: warnings 2014-02-15 18:21:07 +11:00
Campbell Barton
c221717f70 NDOF/X11: incorrect dynamic_cast 2014-02-14 16:12:41 +11:00
Campbell Barton
f2af54afd0 NDOF/X11: skip getting the time when no ndof events are processed 2014-02-12 21:05:24 +11:00
Campbell Barton
b9bf935cc3 NDOF/X11: fix for glitch using ndof outside the view and entering again 2014-02-12 21:05:24 +11:00
2038eb10d0 Fix T38537: issue with OS X full screen startup.blend after recent changes.
Also fixed the redrawing while entering and exiting fullscreen, it would show
a distracting white window contents during the animation.
2014-02-10 23:09:23 +01:00
3314165a66 Fix T38452: on OS X 10.9, now always use Lion style fullscreen.
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.
2014-02-03 16:48:31 +01:00
52ea13e970 Fix T37999: incorrect windows size with Visual Studio 2013 builds.
This is a known bug in Windows, now work around it.
https://bugreports.qt-project.org/browse/QTBUG-36192
http://connect.microsoft.com/VisualStudio/feedback/details/753224/regression-getsystemmetrics-delivers-different-values
2014-01-28 21:37:40 +01:00
Jens Verwiebe
11094a0b29 OSX/scons: fix own error in last commit and do a cleanup 2014-01-27 20:39:20 +01:00
Jens Verwiebe
15e08394a0 OSX/scons: consequently make use of the recently introduced C_COMPILER_ID and CCVERSION env vars 2014-01-27 19:56:15 +01:00
Bastien Montagne
75ab57efed Fix T38190: Linux tablet: Issue with XInput/GHOST?
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
2014-01-13 17:51:17 +01:00
Antony Riakiotakis
717bf85545 Fix some harmless warnings that mostly appeared on MinGW64 2014-01-13 04:28:51 +02:00
Campbell Barton
50650e28ea Events: support for buttons 6 & 7 (some trackballs have these) X11 only
Patch by Marcus von Appen

Note: this patch makes ISMOUSE accept INBETWEEN_MOUSEMOVE as a mouse
event where before it didnt.
2014-01-12 00:40:23 +11:00
Campbell Barton
1bfa64895e Ghost: update multitest for changes in BLF 2014-01-11 23:53:23 +11:00
79e040ba95 Fix T38143: pressing F12 key in the text editor on OS X would type an invalid character. 2014-01-10 19:41:01 +01:00
Campbell Barton
fee66f7bc8 Code cleanup: defines for statfs were getting out of hand for BSD's.
add __DragonFly__ and internal defines to avoid copy-pasting checks.

also remove __CYGWIN32__ check, since cygwin is no longer supported.
2014-01-07 13:39:00 +11:00
Masakazu Ito
3d40e3f9db Fix console incorrectly showing on Windows Blender startup in some cases.
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
2013-12-31 00:17:38 +01:00
Campbell Barton
c1c26c36f6 Style Cleanup: remove preprocessor indentation (updated wiki style guide too) 2013-12-22 14:12:19 +11:00
Brecht Van Lommel
99c5e71397 Quicktime: remove backend with the old quicktime API, and keep the QTKit backend.
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.
2013-11-06 01:45:15 +00:00
Jens Verwiebe
9e3a993392 OSX/GHOST: starting file by file removal of outdated code, such as VERSION_MIN_REQUIRED <= 1040 2013-11-05 17:49:27 +00:00
Jens Verwiebe
37f45454d3 Fix linking for non-apple ndof 2013-11-05 15:48:26 +00:00
Jens Verwiebe
4df23896e5 OSX: removing useless cocoa conditionals as it's solely api now 2013-11-05 14:35:09 +00:00
Jens Verwiebe
e83f169da1 OSX/cmake: ghost carbon removal 2013-11-05 14:09:17 +00:00
Jens Verwiebe
7ccf1f0b46 OSX: more carbon removal cleanups 2013-11-05 13:50:53 +00:00
Jens Verwiebe
311c5f33ff OSX: remove Ghost carbon files finally 2013-11-05 13:35:49 +00:00
Jens Verwiebe
7f5cb54b56 OSX: remove Ghost carbon files and adapt scons 2013-11-05 13:34:05 +00:00
Campbell Barton
beae4f498d code cleanup: spelling 2013-10-31 14:10:01 +00:00
Sergey Sharybin
ecf2f55667 Fix #37187: ghost/test/multitest fails to build
Commited patch provided by Lawrence D'Oliveiro, thanks.
2013-10-28 12:54:18 +00:00
Campbell Barton
48c1e0c0fc spelling: use American spelling for canceled 2013-10-26 01:06:19 +00:00
Campbell Barton
4aa02d8038 patch [#37188] Remove filename entry specified twice
from Lawrence D'Oliveiro (ldo)
2013-10-25 05:21:17 +00:00
Dalai Felinto
fa873f956c fix [#37059] OSX Debug - assert when using external screen with MacBookPro
This was old code, Blender now supports multiple screens.
The assert was breaking my builds with -DWITH_ASSERT_ABORT=ON
2013-10-12 20:01:17 +00:00
Campbell Barton
916f793a70 code cleanup: strange formatting. 2013-10-08 11:27:39 +00:00
Sergey Sharybin
098207e634 Fix regression in r59316
Different version could be passed here, added check
cached path is calculated with the proper one.
2013-10-07 16:06:15 +00:00
Brecht Van Lommel
03bb0f5c72 Revert revision 59985, 59986, 60046 and 60067. These were fixes to improve save
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.
2013-10-06 14:32:53 +00:00
Sergey Sharybin
9e00a48511 Typo in variable name from previous commit, sorry. 2013-10-03 16:39:30 +00:00
Sergey Sharybin
94fdaa5d41 Fix crash starting game engine on linux
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.
2013-10-03 13:15:53 +00:00
Jens Verwiebe
be20171f39 OSX/GHOST: fix own issue in 60510, should now (hopefully) cover all multiple window combinations 2013-10-02 19:54:24 +00:00
Brecht Van Lommel
e308c2f166 Fix #36316: dots in cycles render on certain CPUs with 32 bit linux builds.
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.
2013-10-02 19:00:16 +00:00
Jens Verwiebe
8686f9fe03 OSX/GHOST: refine #60409 and better take multiple windows into account 2013-10-02 18:49:32 +00:00
Brecht Van Lommel
15e5d3ef7b Fix #36891: on OS X, cmd+s or cmd+o did not work when pressing them over the
text editor.
2013-09-30 19:58:56 +00:00
Campbell Barton
3407a2e145 name cocoa functions in keeping with convention with similar functions for other ghost classes. 2013-09-29 13:14:09 +00:00
Jens Verwiebe
d528b4c9bb OSX: more descriptive comment 2013-09-29 10:11:49 +00:00
Jens Verwiebe
20053f4954 OSX: cleanup for 60409, let m_window protected and use rather a public function for getting it public 2013-09-29 10:00:34 +00:00
Jens Verwiebe
1a30e52142 OSX: make sure closing the mainwindow forewards to the quitdialog - todo: check if m_window now public is a problem 2013-09-28 17:55:22 +00:00
Campbell Barton
aa8488421f style cleanup: whitespace & odd indentation 2013-09-21 10:46:58 +00:00
Jens Verwiebe
50fbb6c07e OSX/scons: fix linking errors due bf_intern_ghostndof3dconnexion was build even if no 3Dmouseware was detected 2013-09-20 18:52:39 +00:00
Bastien Montagne
8b093329ff Fix [#36742] Pasting image into text editor causes freeze
Last fallback (XCLIB_XCOUT_FALLBACK_TEXT) was not checked, hence infinitly looping...
2013-09-16 18:14:04 +00:00
Campbell Barton
811669c14e minor style clanup and use more meaningful name for 3DCONNEXION source code. 2013-09-14 12:04:10 +00:00
Jens Verwiebe
e05fc7bb2f Cleanup for last commit 2013-09-13 21:42:52 +00:00
Jens Verwiebe
c446015974 Fix broken compiling with ndof on linux and win 2013-09-13 21:21:53 +00:00
Jens Verwiebe
3596ab932c OSX: Compilefix for ndof symbols get magled when used extern C, now use discrete c files embedded, patch by Jake Kauth 2013-09-13 15:18:17 +00:00
Nathan Letwory
8309f1c0de Fix for [#36707] Blender Opens in fullscreen and stays like that
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.
2013-09-12 10:44:03 +00:00
Nathan Letwory
d396bd92ee Fix [#36702] blenderapplication window position and size
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.
2013-09-11 14:14:18 +00:00
Campbell Barton
f81f6c5019 take the decender into account when drawing console text.
also add data types wm and mask to dataname() and unshadow var in ghost/x11
2013-09-11 04:14:27 +00:00
Campbell Barton
43c83e2458 fix double free in ghost c++ gears test program. 2013-09-11 01:15:13 +00:00
Nathan Letwory
46db99e7fd Remove dimension checks from window creation.
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.
2013-09-10 06:35:50 +00:00
Campbell Barton
4320a7c9df fix for bug in GHOST/SDL, events dont always have a window (which ghost needs).
fallback to the window with the active opengl context.
2013-09-06 01:40:20 +00:00
Sergey Sharybin
be42cd54df Ghost test application could be compiled again
Was an IRC request to have Ghost application up
and running for investigation purposes.
2013-09-05 16:22:07 +00:00
Campbell Barton
90b9fa3608 fix [#36459] Official blenderplayer can not go fullscreen on Linux
use modified patch from Alex Fraser (z0r)
2013-09-04 23:43:25 +00:00
Mitchell Stokes
42deb95583 Ghost_SDL: Fixing the DEF_CURSOR macro so it works in release builds. 2013-09-04 21:57:14 +00:00
Nathan Letwory
d5fba56b38 Add new cursor types to data handling to account for Intuos 4 device (pen and eraser).
Thanks to Ayden Polat for helping to find out the cursor type codes.
2013-09-04 12:10:02 +00:00
Alexander Kuznetsov
a3410a1b47 Fixed crash on Visual Studio 2013-09-03 15:30:07 +00:00
Mitchell Stokes
07e655dfa6 Cleaning up some prints related to SDL. 2013-08-29 22:48:37 +00:00
Mitchell Stokes
d4eeca430d Adding support for enabling/disabling vsync to Ghost_SDL. 2013-08-29 22:48:31 +00:00
Sergey Sharybin
ba6b83d63d Get rid of PATH_MAX in Ghost System X11
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!
2013-08-20 08:33:04 +00:00
Campbell Barton
47c23750e8 style cleanup: indent/whitespace 2013-08-19 01:48:44 +00:00
Antony Riakiotakis
ac8e379a87 Fix linking issue, we use bundled static glew so we should define static glew in ghost as well. 2013-07-31 22:39:17 +00:00
Mitchell Stokes
29f8dfd37a BGE: Adding vsync control. Users can enable vsync, disable vsync, or use adaptive vsync via UI options in the render properties, or by using the new Python method bge.render.setVsync(). Win32 and X11 support are done via EXT_swap_control. Support for using EXT_swap_control on OS X still needs to be added to Ghost. 2013-07-29 22:31:32 +00:00
Campbell Barton
824ec5a388 code cleanup: case & brace placement 2013-07-19 10:40:43 +00:00
Campbell Barton
cbe43fd385 code cleanup: pass event by pointer to getClipboard_xcout 2013-07-19 10:40:27 +00:00
Campbell Barton
a15ac6ee09 code cleanup: use bool for widget struct, also edit odd strncpy use. 2013-07-19 10:39:44 +00:00
Campbell Barton
b1403415ae fix [#36157] Memory Leak in GHOST_DropTargetX11
would leak a little bit of memory for every window created.
2013-07-16 05:10:58 +00:00
Brecht Van Lommel
c776d5e003 Fix #35904: on Windows force NVidia Optimus, which does automatic graphics
switching between an integrated Intel and a dedicated NVidia card, to use the
dedicated card for Blender.

A more portable and general solution would be nice, but it's all I could find:
http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
2013-06-28 17:58:48 +00:00
Brecht Van Lommel
b466a5c9a9 Fix #35890: memory leak in OS X ghost locale detection. 2013-06-27 13:24:55 +00:00
Campbell Barton
225c5fee6b move BLO_sys_types.h -> BLI_sys_types.h (it had nothing todo with loading)
remove MEM_sys_types.h which was a duplicate.
2013-05-28 19:35:26 +00:00
Alexander Kuznetsov
60befcdc62 Fix for r35524. Thanks Jeffrey Hoover for reporting.
WM_SIZE is dispatched before full init.
2013-05-28 18:36:47 +00:00
Alexander Kuznetsov
b9817cd207 Live resize on Windows. Based on Ton's patch for mac.
Removing old resize stuff. 
Windows has resize lag, which creates black gap with openGL. Still looking to fix it.
2013-05-25 21:59:34 +00:00
Ton Roosendaal
24321d4891 Solving ancient Blender window sizing issue;
- 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.
2013-05-25 14:08:56 +00:00
Campbell Barton
6de829cb7a code cleanup: split scons includes onto multiple lines, reduce chance of include conflicts later on. 2013-05-20 18:42:28 +00:00
Campbell Barton
6adec303db revert (ifdef) r54745. which enbabled alpha in the GL buffer.
looks to be the cause of bug [#35415]

we can make this optional.
2013-05-19 11:39:22 +00:00
Brecht Van Lommel
423ffa6043 Painting / Sculpting: more tweaks to pressure sensitivity
* 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.
2013-05-18 11:25:24 +00:00
Brecht Van Lommel
213408d4c9 Fix #35340: 3D manipulator not working right after undoing with cmd+Z on OS X.
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.
2013-05-13 21:19:30 +00:00
Jürgen Herrmann
3d3a4e8eec Patch [#35234]:
Fix GetWindowsLon and SetWindowsLong issues with VS2012 and Windows 8.
Remove unneeded #ifdef block for GWL_WNDPROC and GWL_USERDATA
2013-05-13 20:27:05 +00:00
Brecht Van Lommel
5c2355d364 Fix ctrl+(shift)+tab shortcut key not working on OS X after recent bugfix to
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.
2013-05-12 22:15:05 +00:00
Brecht Van Lommel
f35a9328e0 Fix for previous fix, not sure it will cause issues in practice but better be
sure to avoid invalid memory access.
2013-05-11 12:21:33 +00:00
Brecht Van Lommel
a919b0e4c3 Fix #35265: on OS X, pressing system shortcuts such as cmd+M or cmd+` would both
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.
2013-05-11 10:15:27 +00:00
Brecht Van Lommel
360a86d658 Attempt to fix OS X build with 10.6 SDK, was not working due to recent fullscreen bug fixes. 2013-05-08 19:37:36 +00:00
Brecht Van Lommel
2a4ee23a25 Fix #35225: new OS X Lion fullscreen did not work together well with old
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.
2013-05-06 13:39:25 +00:00
Brecht Van Lommel
aa2a0e4ab0 More build fixes for visual studio 2012.
Patch #35019, #35131 and #35152 by Jurgen Herrmann.
2013-04-29 19:15:56 +00:00
Francisco De La Cruz
70de23dabb Fix #29932 Left Shift + Numpad 1,2,3 not Aligning to Active
Intermediate Shift+Key messages were resetting modifier flags.
2013-04-25 05:32:32 +00:00
Alexander Kuznetsov
b0f8ece9d9 Forgot disable else and it became: else /* */ break;
Caused a crash on Windows on alt-key when a tablet was plug in.
2013-04-20 16:14:31 +00:00
Alexander Kuznetsov
177080a15d Disabling live resize for Windows for now.
Bug #34990

However, cleanscreen on redraw is still disabled, so when resizing blender will have frozen image.
2013-04-18 13:30:41 +00:00
Antony Riakiotakis
15f3bbfe9e Fix some compilation errors for MinGW. Thanks to vildas on irc for
bringing this to attention.
2013-04-13 16:29:18 +00:00
Thomas Dinges
6f9495fc29 Fix for [#34968] Cross compiling from linux for windows is broken
* Patch by Martijn Berger (juicyfruit).
2013-04-13 09:28:07 +00:00
Jens Verwiebe
84ba3f6521 Fix scons compile after GHOST_Sizer commit 2013-04-09 18:58:01 +00:00
Alexander Kuznetsov
f652b11ed1 Live window resizing on Windows
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.
2013-04-09 17:21:05 +00:00
Campbell Barton
a4520320ef fix [#34900] Building blender as a python module is broken in trunk
patch provided by reporter - Martijn Berger (juicyfruit)

also quiet warnings for headless mode.
2013-04-08 05:01:35 +00:00
Brecht Van Lommel
9cd197cd82 Fix incorrect OS X warning message in console when using multisample antialiasing
about number of samples not matching the requested number.
2013-04-02 19:18:38 +00:00
Campbell Barton
e1a54214bb code cleanup:
- remove unused defines.
- quiet some shadow warnings.
- bevel, ifdef out some asserts that are too common.
- style
2013-03-25 02:41:30 +00:00
Ton Roosendaal
70702f78b5 OS X Fullscreen: shortcut now is CTRL + Cmd + F. Is more common, and it keeps
Cmd + F for searches.
2013-03-24 14:56:03 +00:00
Campbell Barton
0bc791a34f Unix/X11 - use RGBA icon (netwm icon), rather then pixmap icon. 2013-03-24 06:23:15 +00:00
Ton Roosendaal
c79b923c1d Bug fix 34743
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.
2013-03-23 16:08:02 +00:00
Jens Verwiebe
a333ef0100 GHOST_Cocoa, let new fullscreen also appear on 10.6 deployed builds 2013-03-22 23:48:26 +00:00
Ton Roosendaal
6690d2abdd OSX feature:
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.
2013-03-22 16:11:00 +00:00
Jens Verwiebe
09a604561d OSX/tablet: fix a longstanding bug with certain devices and a cornercases 2013-03-20 16:51:50 +00:00
Jens Verwiebe
a207d76709 OSX/pen: change sensivity graduation to a good value found with Sebastian and remove debug print 2013-03-19 12:29:38 +00:00
Jens Verwiebe
05787db61f OSX/pen: change sensivity graduation so we don't get maximum too early and have more feeling 2013-03-19 11:38:40 +00:00
Campbell Barton
baf3bb37a9 - ghost-sdl builds again.
- 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.
2013-03-16 20:49:46 +00:00
Ton Roosendaal
bee0af076f Adding include for NULL define in c++ 2013-03-08 09:09:48 +00:00
Campbell Barton
6fd187e4df code cleanup: 0 --> NULL 2013-03-08 06:32:00 +00:00
Jens Verwiebe
f1f702a5ec OSX/locale: fix compile on older xcode by not using toll-free-bridging, which needs ARC 2013-03-03 20:32:27 +00:00
Jens Verwiebe
1c5f18f42b OSX: Get the current locale in objC-style 2013-03-02 22:50:46 +00:00
Dalai Felinto
07cd75d7b0 fix for [#34440] motion blur (2d filter) not working in osx
thanks Jens Verwiebe for the tests and review.
2013-02-27 22:48:34 +00:00
Brecht Van Lommel
4f3ca854e1 Fix various warnings with clang build, and adjust cmake clang warnings flags
to include a few more that gcc is using too.
2013-02-26 21:58:06 +00:00
Campbell Barton
87f1326108 fix for own regression in win32 from r54225, wrong args used in getAllDisplayDimensions()
caused bug [#34391] Window position not saving correctly for next start-up
2013-02-26 09:33:54 +00:00
Campbell Barton
282e5caecf is_crappy_intel_card() was checking strstr(glGetString(GL_VENDOR), "Intel") every call,
better store in static var.
2013-02-25 12:03:26 +00:00
Antony Riakiotakis
99497d1fa2 Hopefully last round of fixes for all OSes 2013-02-24 14:27:59 +00:00
Antony Riakiotakis
08ff355a3a Compile fix round 2. Still trying to do this from linux :p 2013-02-24 14:02:45 +00:00
Antony Riakiotakis
610017d0e8 Add bogus stabs for fullscreen window mode for BGE in GHOST. Platform maintainers should change these to replicate X11 behaviour. Also moved X11 implementation to public methods, just like the IWindow interface. Should fix compilation 2013-02-24 13:51:12 +00:00
Campbell Barton
963b1c1b16 fix for own commit r54806 with argument order and multisampling. 2013-02-24 10:50:33 +00:00
Campbell Barton
630a31a900 fix for fullscreen on X11 (used by the BGE, not blender application),
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).
2013-02-24 05:05:29 +00:00
Campbell Barton
c42b51ed96 GHOST/X11 - free memory allocated by XF86VidModeGetAllModeLines(),
Comment from Zr says this crashes but looks like this was because there was no check if the function failed to allocate to begin with.
2013-02-23 23:15:38 +00:00
Campbell Barton
233b69f0bd GHOST/X11 support for frequency, from SDL's mode switching.
also free the modes when done.
2013-02-23 22:48:16 +00:00
Alexander Kuznetsov
5f830a0863 Applying patch #33709 for dead keys on windows.
Thanks Harley Acheson!
2013-02-22 16:42:19 +00:00