Commit Graph

764 Commits

Author SHA1 Message Date
Brecht Van Lommel
1e00590f1c Fix #26728: crash with load/save on Mac, on files that close & open a window
when loading them. Custom cursor shown during load was not freed correctly
when closing the old window, which resulted in unpredictable crashes later on.
2011-05-23 15:56:26 +00:00
Sergey Sharybin
57c626d11c Forgot to close clipboard when lock fails.
Thanks to jesterKing!
2011-05-12 18:04:24 +00:00
Sergey Sharybin
1d6278f80a Fix #27359: Pasting long text crashes blender
Actual problem was caused by insufficient buffer size
in ui_text_leftclip()

Also fixed possible invalid memory write in GHOST_SystemWin32::getClipboard
which was caused by accessing clipboard buffer after closing
clipboard. This mustn't happen.
Also fixed possible crush when buffer was failed to be locked.
2011-05-12 16:49:53 +00:00
Nathan Letwory
56c5d71f1c Apply patch from Ryakiotakis Antonis as posted on ML
Should fix MingW build problems - mingw users, please test too :)
2011-05-10 23:54:15 +00:00
Nathan Letwory
fab1ee1f78 MingW apparently doesn't know about RIM_INPUTSINK, define it if it isn't already. 2011-05-10 23:38:40 +00:00
Campbell Barton
1e0c3d315b minor cleanup, no functional changes. 2011-05-09 14:41:44 +00:00
M.G. Kishalmi
88a13d7395 fixed scrolling lists with the mousewheel for some X11 windowmanagers.
some WMs not only send 'crossing' events when really moving from one
window to another, but also when mousewheeling.
distinguishing those events 'mode' property fixed this.

brecht++ for figuring out the details.
2011-05-09 12:46:59 +00:00
Dalai Felinto
0b03268c17 Patch [#26799] embedded blenderplayer not receiving keyboard input by Sebastian Korczak
(patch co-reviewed by Nathan Letwory)

Overview: GHOST using rawinput for keyboard input. GHOST window receives WM_INPUT only when it is the active window. Child window cannot be active, so when embedding blenderplayer, WM_INPUT is consumed by top level parent window (for Burster it is the web browser window). Patch register raw input device as 'inputsink' - it makes GHOST window receives all keyboard messages. Window procedure check if GHOST window is active or focused.

::TranslateMessage(&msg) generates WM_CHAR etc. messages from WM_KEYDOWN, WM_KEYUP etc. Because of using RawInput only WM_INPUT messages are processed, so we doesn't need WM_CHAR, WM_KEYDOWN etc. [this is why ::TranslateMessage is no longer getting called].

Note: It's responsibility of the parent window (aka the wrapper) to send WM_SETFOCUS to child window (embedded blenderplayer).
However some parent windows (e.g. webbrowsers) will not send WM_SETFOCUS to the child window when someone clicks on it.
In those cases the blenderplayer needs to be patched to call setFocus(&msg); in the event of WM_LBUTTONDOWN (see GHOST_SystemWin32.cpp)
2011-05-07 22:28:56 +00:00
Dalai Felinto
c56fe3efe6 Patch [#26799] 2.5x blenderplayer (BGE) anti-aliasing & embedding by Sebastian Korczak (with some small tweaks) + adding GHOST_PRINTF
The patch can also be found in http://codereview.appspot.com/4431072/

##############
This patch fix anti-aliasing (multisampling) implementation for win32 platform. It also gives opportunity to embed blenderplayer inside parent window.

Usage:
blenderplayer.exe -i 123456 -m 16 file.blend

where:
123456 - parent window handler (integer, default: 0)
16 - multisample level (integer, default: 0, max: 16. Put there maximum level you want. If not supported, player will automatically try 15,14,13,...,3,2,1)
##############

This patch was originally created as part of the Burster (aka webplugin) project but benefit any one embedding the bge in a custom OpenGL context. By the way, to embed the BGE in a .Net application is really straightforward now =)
The Multisampling work for blenderplayer as a whole.

Missing functionalities:
- to expose the multisampling to the ui (so far it only works in console)
- window focus and keyboard messages for embedded blenderplayer (supported in their previous patch for 2.49, yet to be ported over)
- handle resizing (to be investigated, indeed the changes in getState() in GHOST_WindowWin32.cpp are going to get in the way of that if I'm not mistaken. To be addressed together.

Doxygen documentation to be added whenever I sort out how to do so. Sorry Nathan too many stuff to deal with at the same time. The sooner this patch gets in, the sooner the missing functionalities can be patched on top of that.
2011-05-04 01:50:17 +00:00
Campbell Barton
08a914095e change ghost/x11 toggleConsole to use dummy function in the header. 2011-05-03 07:05:01 +00:00
Campbell Barton
e910bf1ef5 fix for building windows/mingw 2011-05-02 14:18:47 +00:00
Nathan Letwory
aecb892e19 Also add build fix for OSX (not-tested, so OSXers, please do test). 2011-05-02 08:39:17 +00:00
Campbell Barton
e9e9f89f1a x11 builds again. 2011-05-02 08:36:00 +00:00
Nathan Letwory
d197ec74e3 Fix [#26981] Command window is not opening in 2.57.0
Reported by Thomas Engel
Fix [#26938] Blender Zoom not working after startup (Windows)
  Reported by Ilija Boshkov

by applying patch [#26881] Fix for console disappearing in debug mode [Windows]
  Submitted by Alexander Kuznetsov (AlexK)

The patch moves console toggling code into GHOST and improves on the toggling behaviour.

The patch changes handling of WM_SYSCOMMAND so that alt-key toggling isn't a problem anymore.
2011-05-02 08:07:24 +00:00
Campbell Barton
f86565c90e whitespace edits for bpy api, split some really long lines. 2011-04-30 13:58:31 +00:00
Campbell Barton
d6d2f09dd9 quiet some clang warnings & fix for bugs in exceptional cases.
- ghost C api, BLI_get_folder_version() could assign garbage values.
- pointcache ptcache_find_frames_around() had a superfluous NULL check which would have crashed anyway if actually NULL.
2011-04-23 12:57:03 +00:00
Sergey Sharybin
b3a04b4ea7 Fix crash for Intel G45 video cards
This video card need a bit different approach to buffer swapping.
Patch provided by nico_ga from IRC.
2011-04-12 14:31:59 +00:00
Sergey Sharybin
e210d82f17 FIx crash when opening User Preferences even with NVidia card
This crash was discovered by Dalai and this happened because of
unset current context (as result of call wglMakeCurrent(NULL, NULL)).
In this case glGetString(GL_VENDOR) returns NULL. Rather than add check
for vendor != NULL before string comparison, I've changed a bit logic of
context creation:
- Create context and set it as current
- If it's crappy Intel card -- delete this context and
  share the only one context between all Windows
- Otherwise, use initial logic (with sharing lists and so on)

This could also fix crash when opening userprefs from a menu with Intel card.
2011-04-11 19:22:43 +00:00
Nathan Letwory
28478967f4 doxygen fix 2011-04-09 19:46:17 +00:00
Nathan Letwory
b344fe05ec whitespace 2011-04-09 19:23:49 +00:00
Sergey Sharybin
66cee63665 Fix crash for Windows+Intel video card configuration
Intel video cards don't work fine with multiple contexts and
have to share the same context for all windows. This could work
incorrect with multiple video cards configuration, so suppose
there'll be no such situation (Intel cards are mostly in portable
devices like notebooks and laptops, where there's actually no
dual video cards). Anyway, it should work much better now.

Non-Intel cards behavior was kept unchanged.

Thanks to Ton for debug session :)
2011-04-09 18:29:43 +00:00
Campbell Barton
ca254dd37b add option WITH_BUILTIN_GLEW, so linux packagers can disable to use their own glew library. 2011-04-05 23:31:01 +00:00
Campbell Barton
bb1f20a534 includes for building with gcc 4.6 on fedora.
patch from Richard Shaw
2011-03-30 16:14:54 +00:00
Campbell Barton
02a7063a09 fix for blenderplayer crashing on exit.
the event consumer was being freed twice, once when going out of C++ scope, another when freeing the system.
2011-03-26 08:13:42 +00:00
Campbell Barton
06b04fa886 dont return a system path if cmake's 'WITH_INSTALL_PORTABLE' is enabled. this way portable builds wont find scripts in /usr/share. 2011-03-25 05:23:58 +00:00
Campbell Barton
5f8fa29755 add cmake option to build without xinput (tablet support) 2011-03-25 04:56:48 +00:00
Nathan Letwory
21b2f94235 Fix [#25480] Unable to use Windows titlebar icons after Loopcut
reported by Georg K
with patch [#26469] Windows mouse fix
by Alexander Kuznetsov

The amount of mouse grabs wasn't properly balanced with ungrabs, thus preventing from using proper mouse input outside client area.
2011-03-18 21:59:45 +00:00
Nathan Letwory
b4743ccd8f Fix for crasher on Win XP, submitted by Kanttori.
size is 32 on XP, while sizeof(ri) gives 40. Pick the smaller one to pass to memcpy to prevent crashes.
2011-03-18 13:36:52 +00:00
Nathan Letwory
60a4c9d09e Some explicit casts to silence warnings (unsafe to mix int and bool in comparisons). 2011-03-11 22:06:18 +00:00
Nathan Letwory
dec585cb94 Fix a typo in defines. Patch by Alexander Kuznetsov
The typo resulted in bad keyboard input handling in MinGW builds.
2011-03-11 02:58:37 +00:00
Nathan Letwory
d6b43fed31 Fix [#26446] Quick extrude (Ctrl+LMB) works only one time
Reported by Michael R

This was one thing I didn't test when accepting patch [#26364]. It is important to not
send repeats of modifier keys.
2011-03-10 18:56:19 +00:00
Nathan Letwory
ca63b15131 Apply [#26364] New Windows keyboard handling
Submitted by Alexander Kuznetsov

Fixes [#25279] Shift-Numpad Combinations fail to align view to selected
and addresses [#26328] Blender uses global keyboard message hook which hurts system responsiveness on Windows

A whole new way of handling keyboard input improves greatly both code readability and event handling. Thanks for the great patch, Alexander!
2011-03-09 22:10:51 +00:00
Nathan Letwory
ef648f617e Fix [#25476] Pan view not always works with shift+alt+LMB in Blender 2.56
Reported by Mihail Konoh

Applied patch submitted by Alexander Kuznetsov (to [#26208]). Thanks for long-standing head-ache :)
2011-03-01 15:14:59 +00:00
Campbell Barton
a12315e4ec use const char for return values of getenv(). 2011-02-26 15:28:56 +00:00
Nathan Letwory
b15161a2d3 doxygen: fixup and tag intern/ghost. 2011-02-25 11:28:33 +00:00
Nathan Letwory
3f96359d5a doxygen: make sure license blocks don't interfere. 2011-02-22 23:40:06 +00:00
Nathan Letwory
5e41760a15 doxygen: add bullet to extern libs, some small changes in page names, and fixes around license blocks 2011-02-22 16:12:12 +00:00
Guillermo S. Romero
c37884b015 Add XF86keysym.h detection and use to CMake system, for r34983. 2011-02-19 23:51:55 +00:00
Guillermo S. Romero
bb2d0eb230 Add media keys for XFree86/Xorg based X11.
TODO: setup build systems to define WITH_XF86KEYSYM.
2011-02-19 00:12:34 +00:00
Joshua Leung
346f749a57 Adding support for the "media" play/pause/stop/next/prev buttons
available on many keyboards these days, so that they can be used for
animation playback (giving more options over alt-a and alt-a ad-
infinitum).

Currently, this is Windows only as I don't have a Linux/Mac system to
test on (it should compile with both mingw and msvc, at least using
scons). Maintainers for those systems can probably easily add this in
once they find out the relevant mappings for those systems.
2011-02-18 22:42:03 +00:00
Nathan Letwory
f697247f0e Start simple intros for intern and extern libs.
Some reorg of modules/pages, start makesdna and makesrna.
In many places license block needs to be changed to not start with /**, because otherwise documentation will go weird.
2011-02-17 16:17:40 +00:00
Nathan Letwory
f336b80d7f Starting work on doxygen cleanup. Many things still to be done. 2011-02-17 05:57:18 +00:00
Campbell Barton
0d8416acc7 minor edits, no functional changes.
- BGE was getting MCol array and not using it.
- use list lookup functions for getting constraint from pose bone.
- use const char * in more places.
2011-02-07 22:48:23 +00:00
Nathan Letwory
b407702c5f Fix [#19997] Duplicating window results in graphics corruption in UI
reported by Micael Dias (and many others, see duplicates list)

On closing the first ("main") Blender window the very first OpenGL context
got deleted too. This context needs to be retained, since we share quite a
bit of OpenGL data through it to the newly created contexts (new windows).
Thanks to Ton Roosendaal for thinking out loud while trying to figure out
what the actual cause was.
2011-02-04 13:22:02 +00:00
Campbell Barton
89c617a116 remove nan-makefiles 2011-01-30 15:29:22 +00:00
Nathan Letwory
037920caff Make version check more future proof. 2011-01-28 08:51:15 +00:00
Joshua Leung
340e411889 Silencing some annoying key-event prints in Win32 console:
The console was getting flooded with output like
g


i

i
...
all as a result of what looks like a debugging print. Whoever put this
in, you can get back your debugging prints by enabling BF_GHOST_DEBUG
in your local config :)
2011-01-26 23:58:20 +00:00
Nathan Letwory
a70e697381 Apply part of patch [#25612] Windows 7 icon progress bar
Submitted by Alexander Kuznetsov.

This adds the progress bar to the taskbar item of Blender for Windows 7.
Small change in version retrieval, otherwise as is.
2011-01-26 12:23:02 +00:00
Nathan Letwory
75f155be33 Apply multimonitor fix part of patch [#25612]
Submitted by Alexander Kuznetsov
Fixes [#23630] Negative OS screen coords not stored/used
Reported by Mort (mnme)
2011-01-26 12:19:19 +00:00
Campbell Barton
da2b490198 cmake maintenance, was missing 2 headers and made some minor improvements to cmake_consistency_check.py.
also converted GHOST_SystemWin32.cpp to utf8.
2011-01-25 08:35:10 +00:00
Nathan Letwory
f949c567b9 Fix [#25715] [!] key doesn't work on french keyboard with Windows XP/7.\nSubmitted by Eric Le Pape\n\nThe key sent VK_OEM_8, which wasn't handled at all. Added code to detect primary language and handle VK_OEM_8 specifically for certain layouts. 2011-01-24 14:37:10 +00:00
Mike Erwin
6132f8c4b4 applied Linux SpaceNav patch from Rafael Ortis 2011-01-21 10:11:26 +00:00
Mike Erwin
50186191d9 enabled multithread GL engine + minor cleanup 2011-01-21 09:56:41 +00:00
Diego Borghetti
44fbbe7c55 Ghost:X11 Set the default max width and max height value.
Some window manager can set default value of this to be the
screen size, so running blender with -p or --window-geometry
don't work with value bigger than that.

This commit try to "avoid" the bug #25709, but at the end
depend on the window manager, so maybe work or maybe not.
2011-01-20 20:24:18 +00:00
Damien Plisson
7d675b15fb Fix [#25678]: (Ghost Cocoa) Fix character encoding translation for filenames (open & window title display) 2011-01-18 20:53:20 +00:00
Andrea Weikert
0b1e517052 fix compile on MinGW, missing define in the mingw headers. 2011-01-17 19:39:25 +00:00
Guillermo S. Romero
a46689b15d SVN maintenance. 2011-01-05 19:19:49 +00:00
Andrea Weikert
a45183125a Patch: [#22524] Update Windows Recent Documents on Open/Save
Slightly modified to better fit in architecture (moved to related GHOST SystemPaths)
Thanks to Harley Acheson for the research and for providing the original patch.

Note: I added empty function for X11(Linux) and Mac (Carbon and Cocoa) to be implemented still.
2011-01-05 14:56:10 +00:00
Andrea Weikert
195cc9c6a6 ToDo: long outstanding patch to allow access to system paths in background mode
Thanks Damien Plisson for contributing the Carbon and Cocoa implementation
2011-01-05 14:00:14 +00:00
Damien Plisson
559059ab3f Fix [#25442]: (Ghost Cocoa) Add missing initialization of associated object pointer when switching to/from fullscreen. 2011-01-01 19:48:14 +00:00
Nathan Letwory
4eb806b0a4 Fix [#24630] alt+shift+LMB dragging does not work
Reported by Nils Austa

There was double handling of modifier keys. With my autumn work on the modifier keys I had moved state checks for
modifier keys into convertKey(), but left the call to handleModifierKeys. That caused problems with proper
modifier key handling in the entire key handling code of GHOST.
2010-12-28 13:03:38 +00:00
Campbell Barton
5e382eb8e5 rename blenderlib to blender_add_lib 2010-12-22 23:09:30 +00:00
Mike Erwin
66bdb9a12f late summer -- overhauled tablet-handling for Windows 2010-12-17 00:13:23 +00:00
Guillermo S. Romero
fef0549ea5 SVN maintenance.
Plus some typo fixes in comments.
2010-12-16 19:05:47 +00:00
Campbell Barton
acd7b81c2d bugfix [#25230] Quick extrude Ctrl-LMB : wrong behaviour of 'RotateSource' option.
Problem is is with operator redo which click-extrude exposed.

Check if redo operator can run, otherwise lock the UI and add a label that the operator doesn't support redo.
This is clunky but IMHO better then failing silently and leaving the user confused.

- Merged redo functions into ED_undo_operator_repeat(), code was duplicated in a few places.
- added WM_operator_repeat_check to check if WM_operator_repeat() can run, avoids an undo call when redo work.

Unrelated changes
- GHOST_SystemWin32.cpp set to utf8 encoding.
- cmake_consistency_check.py now checks source files are utf8.
2010-12-15 04:06:19 +00:00
Mike Erwin
a7f2cbc88f As-yet uncommitted changes from end of summer. General code cleanup Mac-side, removed some unnecessary NSAutoreleasePool guards, etc. By no means complete -- just wanted to get this in and do a fresh checkout on another machine. 2010-12-14 22:43:52 +00:00
Campbell Barton
afacd18498 use lowercase for cmake builtin names and macros, remove contents in else() and endif() which is no longer needed. 2010-12-08 08:43:06 +00:00
Campbell Barton
3e7469cd01 Added WITH_CXX_GUARDEDALLOC support for GHOST, disabled by default. 2010-12-07 11:57:34 +00:00
Damien Plisson
5150884550 Cocoa : fix drag and drop was no more operational after having fullscreened the window 2010-12-04 14:26:45 +00:00
Campbell Barton
263830f000 Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
2010-12-03 17:05:21 +00:00
Campbell Barton
cd97253502 - added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
2010-12-03 12:30:59 +00:00
Campbell Barton
8a761a374a quit blender if the first X11 window fails to open.
mainly just to avoid a segfault so the user knows its not a bug.
2010-12-01 07:15:05 +00:00
Campbell Barton
42d6603cae Add option for CMake to build libredcode, also use CODEC prefix for ffmpeg, quicktime & sndfile options. 2010-11-30 18:52:39 +00:00
Campbell Barton
e8397e6193 include headers in cmake source, added a script to check for consistency, reporting missing headers & C files.
this is important so IDE's using CMake integration always get blender headers. - QtCreator & MSVC for eg, probably others too.
2010-11-29 04:35:56 +00:00
Campbell Barton
837fedf372 fix for building with mingw/cmake 2010-11-22 23:25:21 +00:00
Campbell Barton
39b7bfe6bd - check IF WIN32 AND NOT UNIX (for cygwin)
- patch from Mike S to enable OpenMP and xcode
2010-11-21 13:41:43 +00:00
Nathan Letwory
b9b95be374 Fix [#24310] With high poly numbers when sculpting, modifier keys hang
reported by Eclectiel L

When working with very heavy scenes Blender can seem to 'hang' (not responding). Key events that happen
during this period may get lost, especially for modifier keys.

Adding extra handling to account for these situations.
2010-11-15 12:05:11 +00:00
Guillermo S. Romero
2cef9203ba Add PREFIX support to makefiles. 2010-11-01 23:17:58 +00:00
Campbell Barton
7e913f25c2 throw an error is PREFIX isnt defined on X11 systems. defaults to /usr/local 2010-11-01 22:26:56 +00:00
Nathan Letwory
f875777212 Change /WX away for now, some odd thing going on between cloned environments. Need to check after release. 2010-10-26 23:32:59 +00:00
Nathan Letwory
715fa82769 Make sure separation between modifier keys is communicated from GHOST upwards too (BGE at least uses this). 2010-10-24 12:45:47 +00:00
Campbell Barton
f383e2e0e6 Remove msvc build files which are not needed anymore. 2010-10-23 15:14:54 +00:00
Nathan Letwory
54b3508444 Fix [#24337] Create vertex (and faces and edges) with "Control+LMB" doesn't works!
Reported by Lluc Romaní Brasó

Some of my earlier changes to the modifier handling code accidently sent out new events for modifier keys when they where held down (repeat).

Also lay foundation for shift+numpad handling.
2010-10-22 22:58:12 +00:00
Nathan Letwory
d272ea36c2 Wrong check for platform accidently put /WX to non-msvc toolchains too. 2010-10-21 18:13:43 +00:00
Nathan Letwory
b9d17f97eb Don't use CS_CLASSDC after all. Makes drawing multiple windows funky. 2010-10-21 11:15:57 +00:00
Nathan Letwory
c9d16d0ddb /WX enabled for MSVC in CMake too.
Warning fixes.
2010-10-21 08:32:53 +00:00
Nathan Letwory
107b274fb8 Enable /WX in blenkernel
Silence warnings
2010-10-21 07:39:18 +00:00
Nathan Letwory
6e43a400e3 Use one device context for our window class. 2010-10-21 07:18:38 +00:00
Nathan Letwory
3cbb5611d5 * Use HWND_DESKTOP as parent for Blender Windows.
* Reorder freeing of OpenGL context code.
2010-10-21 07:16:02 +00:00
Nathan Letwory
9e73da71f5 Enable /WX on Windows. 2010-10-21 07:14:31 +00:00
Nathan Letwory
d7b40531cd Fix [#20277] Bug with Continuous Grab on Windows
Reported by Alex Glawion

When we have a maximized window we need to take into account
that there are no borders.
2010-10-19 09:38:56 +00:00
Nathan Letwory
6c505c97a7 _DEBUG -> DEBUG 2010-10-18 07:03:38 +00:00
Nathan Letwory
05a105cac1 Add short comment. 2010-10-18 00:42:18 +00:00
Nathan Letwory
ac03fbe4c9 Adapt OSX code for IMB_allocImBuf param changes. 2010-10-16 15:53:01 +00:00
Nathan Letwory
c52e7c1370 Fix AltGr problem on Windows
It was impossible for keyboard layouts that use AltGr to create certain characters to insert
them in Text and Console.

The keyboard driver in Windows sends left control events when AltGr is pressed. This meant that
Blender thought control was being held, which is a PASS_THROUGH condition for the insert operator
in both editors.

Add testing of keyboard layout for AltGr, both on initialization and WM_INPUTLANGCHANGE.

To remedy AltGr problem, we send now a left control key up event to Blender before further processing
the AltGr key.
2010-10-16 15:21:55 +00:00
Nathan Letwory
f631a8b5be Simplify GHOST modifier key handling on Windows. 2010-10-15 14:52:47 +00:00
Campbell Barton
d6b235f3ef patch [#24162] r32332 missed a couple of command key changes - with fix
from Shane Ambler (sambler)
2010-10-06 09:21:40 +00:00
Campbell Barton
568cb06616 rename Command key to OSKey, Window manager already called it the OSKey but internally it was mixed. 2010-10-05 19:10:15 +00:00
Damien Plisson
b6bdf681fb OSX/Cocoa: Fix [#24068] for correct handling of .blend file names with accented nordic characters 2010-10-02 09:17:32 +00:00
Damien Plisson
af8ae62ec0 OSX/Cocoa: Mouse up was not sent to WM after window resize 2010-10-02 09:15:32 +00:00
Damien Plisson
606b800c46 OSX/Cocoa : discard Cocoa GL view flush while in live resize, and send Window size change ghost message only when user releases mouse button (not in live resize).
Potentially fixing bug [#23561]
2010-09-26 19:53:45 +00:00
Brecht Van Lommel
b19521f2b2 Fix OS X memory leak prints when starting blender:
"__NSAutoreleaseNoPool() ... autoreleased with no pool in place - just leaking"
2010-09-16 19:42:51 +00:00
Nathan Letwory
6b18c9dc61 Partial fix (Linux) [#21395] Command key for keyboard mapping not functional
Reported by Andy Braham

Handle XK_Super_L and XK_Super_R as the GHOST_kKeyCommand. Since Command key is
not discerned (yet) in left/right variants, read both and set accordingly.

This now completes fixes for [#21395]
2010-09-16 06:52:12 +00:00
Nathan Letwory
d6baea457e Partial fix [#21395] Command key for keyboard mapping not functional
Reported by Andy Braham.

Handle VK_LWIN and VK_RWIN (The infamous Windows keys). Note, these are not separate, so handled as one command key.
2010-09-15 23:19:21 +00:00
Campbell Barton
9b518710c6 update for MingW/CMake
- ignore MSVC warnings when FREE_WINDOWS is defined to quiet warnings.
- the CMake flags were not being set correctly making blender have weirdo colors (no -funsigned-char).
2010-09-15 16:13:32 +00:00
Campbell Barton
d0a1b76fe4 use relative paths for ghost/cmake 2010-09-12 12:16:50 +00:00
Nathan Letwory
06b1c933b3 Commit patch [#23685] Cleanup/crashfix for AA using win32 ghost.
Provided by Mitchell Stokes (Moguri)
2010-09-08 08:25:38 +00:00
Campbell Barton
2406ebe1a4 - added back zlib include (needed for win32).
- use list append in more places.
- remove non existing include dir.
2010-09-07 01:13:10 +00:00
Guillermo S. Romero
a8269c8946 SVN maintenance. 2010-09-03 03:30:20 +00:00
Nathan Letwory
6c113b54b3 Finally change SConscript tabs to spaces. 2010-08-29 20:52:05 +00:00
Campbell Barton
4b40d73bfb rename most scons build targets to match cmake 2010-08-25 04:30:47 +00:00
Campbell Barton
6464718083 rename some cmake build targets 2010-08-24 04:29:23 +00:00
Mike Erwin
4bfd915f9c pencils down! additional Windows Wacom wackiness. 2010-08-16 18:59:36 +00:00
Mike Erwin
2c468d9e5a Further hacking on Windows tablet code. More accurate detection of certain tablet tools (mice, etc.). Made tablet mouse/pen buttons play nice with GHOST. Removed old code from WindowWin32. 2010-08-15 11:02:03 +00:00
Mike Erwin
0473790bbe removed gpencil Manhattan distance from user prefs. updated ghost build script. 2010-08-14 23:33:22 +00:00
Mike Erwin
91e2a55171 continued Win32 tablet hackery 2010-08-14 21:01:09 +00:00
Nathan Letwory
801ba2e345 Apply patch #23295 - Fix for SCons building on FreeBSD
Patch submitted by Jashank Jeremy. This adds support for freebsd7, freebsd8 and freebsd9. Thanks!
2010-08-13 20:54:34 +00:00
Mike Erwin
7428380cc3 still working on tablet for Windows... 2010-08-13 00:34:57 +00:00
Mike Erwin
fc5c4d98f4 Minor cleanup of Windows tablet code. 2010-08-12 14:02:38 +00:00
Mike Erwin
1232bb6923 Better Intuos4 support on Windows. 2010-08-12 13:04:00 +00:00
Mike Erwin
485d1ef06e Updated Win32 tablet code. 2010-08-12 04:03:40 +00:00
Mike Erwin
1c2d36344c Linux compiles again, no SpaceNav yet. 2010-08-10 09:56:39 +00:00
Mike Erwin
4bf887d4d3 SpaceNav works in 3D view on Windows. Cleaned up related WIP code. 2010-08-10 09:51:22 +00:00
Mike Erwin
ced1bd9e7d Windows shell/IE #define. 2010-08-08 05:08:35 +00:00
Mike Erwin
757f75b768 merged 30707:31141 from trunk 2010-08-07 12:51:51 +00:00
Mike Erwin
f399481251 SpaceNav turntable and fit in 3D view. Tablet data rides with cursor/button events (incomplete! Mac-only for now). Grease pencil works better with pen. 2010-08-07 10:57:15 +00:00
Damien Plisson
4da55eed8f OSX/Cocoa : fix the Cmd modifier stuck after cancelling the quit dialog 2010-08-01 16:25:00 +00:00
Mike Erwin
ad623ddd82 merged 29285:30707 from trunk 2010-07-25 10:09:17 +00:00
Mike Erwin
b0193772da removing Mac C++ file (contents same as Obj-C++ file), since TortoiseSVN's 'rename' forgot to do it 2010-07-25 08:38:13 +00:00
Mike Erwin
a7ba245fe3 Activated NDOF capture for Windows. Robust++ for generic NDOF manager. Removed experimental Win32 mouse and NDOF code now that good solutions are in place. Cleaned up formatting. 2010-07-24 11:06:08 +00:00
Mike Erwin
a51ebf247f Renamed Mac file to exclude it from Windows build. Revoke this cowardly commit once I figure out how to properly fix the build script! 2010-07-24 06:49:24 +00:00
Mike Erwin
c4c46e4403 mostly formatting: put SystemCocoa on a diet of a thousand tabs, also spotted and fixed a leaky switch-case (trackpad gesture for 'rotate') 2010-07-23 10:03:22 +00:00
Mike Erwin
6216199af8 SpaceNav event capture for MacOS, dispatch for all platforms. To compile this, you need their Mac driver installed and to send '-weak_framework 3DconnexionClient' to the linker. I'm also exploring a HID Manager version, bypassing their driver (and any licensing issues). 2010-07-23 06:45:59 +00:00
Mike Erwin
47ea957c9d provided a way for NDOF manager to poke SystemCocoa about out-of-loop events 2010-07-23 06:36:08 +00:00
Mike Erwin
195ad03901 more preliminary NDOF handling stuff (untested) 2010-07-22 09:30:01 +00:00
Mike Erwin
6c2dee0198 revamped NDOF event system for ghost, added (untested) Mac support 2010-07-22 07:23:41 +00:00
Mike Erwin
f0167c6a41 get more mouse events only when in hi-fi mode 2010-07-22 07:18:12 +00:00
Mike Erwin
b86a25efba removed some NDOF plugin-related code 2010-07-22 07:15:00 +00:00
Mike Erwin
8a4d43427d removed more unused Macintosh Carbon code 2010-07-22 07:10:57 +00:00
Mike Erwin
1a27b5a74d removed unused Macintosh Carbon code 2010-07-22 07:07:28 +00:00
Campbell Barton
75410037fd - correct some spelling errors.
- remove FreeCamera struct (wasnt used)
- remove world color alpha values (not used anywhre).
2010-07-20 10:41:08 +00:00
Mike Erwin
14736cab16 Added rudimentary SpaceNav event capture code for Windows.
Disabled RawInput mouse code.
2010-07-17 05:52:46 +00:00
Mike Erwin
8a138f4ab2 fixed misspelled variable in Wacom utility 2010-07-17 05:49:41 +00:00
Campbell Barton
a3e0667e94 Rather then hard coded /usr/share, use CMAKE_INSTALL_PREFIX to set the PREFIX, could be added for scons/make too. 2010-07-15 20:25:09 +00:00
Mike Erwin
f6730216e0 Tweak Windows #includes to require WinXP or newer and speed up build times. 2010-07-15 12:30:16 +00:00
Mike Erwin
7aa8ae3781 Hi-fi mouse input on Windows!
The remains of a RawInput mouse attempt are included, but disabled. RawInput will still be used for multi-axis devices. 

Eliminated the need for several #defines by requiring WinXP or newer.
2010-07-15 12:24:14 +00:00
Mike Erwin
5b1925afba Improved tablet support on Windows. Nice deep queue for input points. Much more is being captured now. WT_PACKET events are disabled until I can revisit in a day or two.
Also added Wacom's driver wrappers, with their permission. These won't live here very long, but the WindowWin32 tablet code uses it for now.
2010-07-15 12:12:52 +00:00
Mike Erwin
56b287bfe6 disabled lo-fi dispatch log to reduce event debugging noise 2010-07-15 11:54:24 +00:00
Jason Wilkins
5505697ac5 Merge GSOC Sculpt Branch: 28499-30319
https://svn.blender.org/svnroot/bf-blender/branches/soc-2010-jwilkins
See log of that branch for details.
2010-07-14 14:11:03 +00:00
Benoit Bolsee
ac981c08af Update MSVC project files 2010-07-12 11:37:15 +00:00
Andrea Weikert
ffcec4024b installation paths:
small fix: removed extra slash in system path
2010-07-11 15:30:32 +00:00
Damien Plisson
6682dae779 Fixed bug [#22555] OSX/Cocoa: Suppress delayed mouse position changed event after setting it 2010-07-09 18:54:44 +00:00
Mike Erwin
12d7b10c10 added filtered event dispatch for lo-fi mouse/pen input 2010-07-08 01:53:36 +00:00
Andrea Weikert
c468f94f53 fix mingw compile
- seems to have been conflicting #defines for INT, solved by moving #include up
2010-07-06 20:31:55 +00:00
Damien Plisson
ea183b58d3 Fixed bug [#22757] : hide dock and menu on OSX only when Blender window is maximized to fullscreen on the primary monitor 2010-07-06 19:59:37 +00:00
Damien Plisson
dd724f2826 File/installation paths: osx (cocoa & carbon) update in ghost 2010-07-05 19:59:37 +00:00
Diego Borghetti
63335f2d10 Fix Makefile for new getUserDir system. 2010-07-05 14:32:15 +00:00
Andrea Weikert
7aca4eec4b compile fix, another missed semicolon - blush 2010-07-05 06:04:24 +00:00
Campbell Barton
9c4e3a7b6b bugfix [#22724] "Scene" switch on the console doesn't work 2010-07-05 00:00:40 +00:00
Campbell Barton
ef3f967baf fix for building 2010-07-04 22:35:09 +00:00
Guillermo S. Romero
f3638488c3 Add missing ";". 2010-07-04 21:36:48 +00:00
Guillermo S. Romero
646ee52d3a SVN maintenance. 2010-07-04 21:33:01 +00:00
Andrea Weikert
4135f1310c Patch [#22339] File/installation paths changes
Update after discussions on IRC:
* operating system specific path retrieval is moved back to GHOST, nothing blender specific here though
* cleaned up path functions a bit to remove #ifdefs
* removed Cocoa from blenlib again

TODO:
* Matt, Damien, please check and correct the functions for Cocoa and Carbon, could only put back existing code but needs adjustment
* finish GHOST_getBinaryDir - this should replace the BLI_where_am_i eventually as well as BLI_getInstallationPath on Windows and get_install_dir for the blenderplayer runtime
* It would probably be nice to define GHOST_getTempDir as well and move those out
* more cleanups...

NOTE:
Things are likely broken for macs
2010-07-04 21:14:59 +00:00
Andrea Weikert
ca81aa704e Patch [#22339] File/installation paths changes
Patch Tracker: http://projects.blender.org/tracker/?func=detail&aid=22339&group_id=9&atid=127

This patch implements the proposal outlined here:
http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal

Original patch by Matt Ebb.
Contributions by Nathan Letwory, Damien Plisson and Andrea Weikert

NOTE:
This is a work in progress commit, some work still needs to be done on the SCons and CMake files for this to work properly, but at least should compile and the files should be created in the right directory.

Commit discussed on IRC with Ton and Campbell.
2010-07-04 15:35:23 +00:00
Mike Erwin
6365cb3fa8 much-improved tablet handling; hi-fi input for mouse/pen 2010-07-03 07:03:21 +00:00
Mike Erwin
09f6604241 preparing for NDOF overhaul 2010-07-03 06:58:29 +00:00
Mike Erwin
905fcc7b74 guarding printf calls as MinGW (gcc 4.5) insists 2010-07-03 03:53:06 +00:00
Mike Erwin
d5cdfb18f6 removed unused #include 2010-06-26 01:34:49 +00:00
Mike Erwin
185c77989e hint for mouse/pen input fidelity 2010-06-25 00:09:50 +00:00
Mike Erwin
da314f51bf fixed tablet mouse spasm bug and refactored event handling 2010-06-19 10:35:01 +00:00
Campbell Barton
3e3d2b7a4c ifdef disable X11 mouse grab, it locks up the system for artists too often (whenever blender locks up). 2010-06-15 17:40:31 +00:00
Mitchell Stokes
982cd944a4 Got the okay from Nathan to commit this: It's a small patch for Win32 Ghost that prevents a Blender window from setting the cursor position when it's not the active window. 2010-06-15 17:12:21 +00:00
Damien Plisson
3f326354b8 Progress indicator in the application icon
Displays a global progress indicator in the application icon reflecting the total progress of all running jobs.

Currently fully implemented on OSX (Cocoa).
On other OSes that do not allow to redraw the app icon, this can be implemented as a [x%] display in the app title, so to appear in the taskbar.

Thanks to Matt for the windowmanager wrapper.
2010-06-01 20:21:40 +00:00
Nathan Letwory
b96a2c346c Fixes [#21791] Toggle Fullscreen (Alt + F11) returns to non-maximized window
Applied patch provided by Elia Sarti
2010-06-01 06:18:17 +00:00
Nathan Letwory
e2585355c3 Fixes: #22064 When the Windows task bar is placed on top of the screen, Blender "User Preferences" opens with the title bar underneath it
I applied the patch provided by Charlie Shen in the comments of the bug report
2010-05-30 13:50:59 +00:00
Dalai Felinto
c6bec43330 reverting previous commit from Mitchell. His commit went to the trunk instead of the branch :)
svn merge -r 29067:29066 https://svn.blender.org/svnroot/bf-blender/trunk/blender
2010-05-29 21:31:57 +00:00
Mitchell Stokes
9d3157eed0 Reversing the last merge because I botched it. 2010-05-29 21:22:24 +00:00
Damien Plisson
93f5303e3f Fix [#22306]: convert dropped file names from OSX to correct char encoding to handle non 7-bit ascii chars (e.g. accents) 2010-05-22 07:32:55 +00:00
Campbell Barton
c2ffcb8497 no functional changes
- add PySequenceMethods members (all NULL)
- spaces -> tabs
- cmake syntax warning from recent ghost commit
2010-05-16 10:09:07 +00:00
Campbell Barton
ae23308dd6 made cmake ghost file less confusing (was globbing then removing files for each system). 2010-05-15 12:16:19 +00:00
Damien Plisson
6cb02a1672 Drag & drop from OS: set to accept any drop operation by default for now 2010-05-03 17:02:49 +00:00
Campbell Barton
8f1500da00 remove config.h references, was added for automake build system rev around 124-126 but isnt used by any build systems now. 2010-04-18 10:28:37 +00:00
Damien Plisson
5c24ce16b2 Cocoa fix [#21866] : force mouse move event to be sent upon cursor position set request 2010-04-11 11:19:30 +00:00
Brecht Van Lommel
2a1644401e Fix #20365: new render window does not respect Windows taskbar at top of screen. 2010-04-06 17:11:38 +00:00
Damien Plisson
dc4ac8a263 Fix [#21689] for coordinate issue (y flipped) when setting mouse cursor position
Mem leak when using BGE fixed too.
2010-03-28 19:42:08 +00:00
Damien Plisson
3dde2e224a Cocoa: fix some mem leaks appearing on 10.4 builds 2010-03-20 10:14:59 +00:00
Damien Plisson
8ac0359852 Fix [#21634] GHOST_WindowCocoa: activeWindow null pointer check 2010-03-16 20:42:12 +00:00
Damien Plisson
c12cfa3775 Fix [#20419] OSX Cocoa physical punctuation keys retrieval fix
Cocoa charactersIgnoringModifiers API still takes the Shift key into account. Fix is to use Apple new 10.5 Carbon(!) API that is 64bit compatible to take into account the international keyboard layout when retrieving the physical key pressed/released.
Needed to use an even older API for 10.4 builds.
2010-03-15 20:38:04 +00:00
Brecht Van Lommel
1ded5b37b7 Patch #21569 to fix bug #21530: on X11, middle mouse button drag cancelled
when moving wheel (with horizontal scrolling), was sending middle mouse
event in cases where it should not. Patch by Anthony Edlin, thanks!
2010-03-15 10:25:07 +00:00
Andrea Weikert
c0b3ab6ceb filebrowser:
* move own thread handling for thumbnails to WM_jobs 
* cleanup of thumbnail creation code
* added function to kill the job, which actually allows thread to terminate gracefully

vc9 projectfiles:
* fixed some missing includes for release target!
2010-03-10 19:30:20 +00:00
Damien Plisson
fa6beb4302 System dependent standard directory retrieval functions update : return const strings (as coded in libc) instead of malloc'ed buffers
and plug them into wip BLI_bfile.c to replace the hardcoded paths
2010-02-27 17:03:46 +00:00
Andrea Weikert
7e5d27502c compile fixes for MSVC!
* function must return value!
* missing _USE_MATH_DEFINES for M_PI
2010-02-16 18:12:44 +00:00
Damien Plisson
ed540dd1f1 Cocoa : mem leak fix
This fixes the mem leak part of bug report #21186
2010-02-16 16:38:29 +00:00
Damien Plisson
62e7e0ce77 Cocoa: bugfix [#21158] fix modifiers keys status upon gaining focus
10.6 new function to get modifiers flags status asynchronously returns erroneous value when application gets focus after a virtual desktop switch (Spaces).
Use legacy method to retrieve the modifiers flags status sent with the last  event. Works as at least the "focus gained" event is sent before this query. Bonus: should work also on pre-10.6!
2010-02-16 13:09:03 +00:00
Damien Plisson
df60ff553d OSX/deprecated Carbon: user and system base dirs retrieval implementation
As Carbon is bound to RIP, implemented only a static version of these retrieval functions.
2010-02-16 08:57:05 +00:00
Damien Plisson
1c0fa083b1 Cocoa: user and system base dirs retrieval implementation 2010-02-16 08:36:33 +00:00
Guillermo S. Romero
66f695653b Self tsk. Too much copy paste. 2010-02-16 01:12:21 +00:00
Martin Poirier
54765dfb31 Tsk! 2010-02-16 00:55:13 +00:00
Guillermo S. Romero
80bb824929 System dependant functions (skeletons) to retrieve user and system base dirs.
Thus #defines in BLI_bfile.c can be dropped, as suggested by Damien Plisson.
Feel free to fill in the non Unix ones. For extra info see:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/ResourceFilePaths
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/EnvironmentVariables
2010-02-15 22:50:53 +00:00
Campbell Barton
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Damien Plisson
586acf21a7 Cocoa : use Cocoa NSWindow tag for identifying the window where a mouse/tablet/key event happened => enables some actions in inactive windows as per OSX standard
Previous code was assuming an event can only be sent from the active window.
On OSX, Right, Middle mouse buttons, mouse wheel and trackpad events are sent to inactive windows too.

For example, this allows to zoom, pan the view without changing the window order.
2010-02-10 14:16:02 +00:00
Benoit Bolsee
b6c643c19f Update MSVC project files. 2010-02-03 21:14:50 +00:00
Guillermo S. Romero
e15d6fa1df SVN maintenance. 2010-02-01 19:01:57 +00:00
Martin Poirier
f591f34e80 Wrong include path in revision 26519 (missing space when concatenating includes) 2010-02-01 18:23:24 +00:00
Damien Plisson
298f99bf05 Cocoa/DND : give feedback to user of drop possibility before actual drop
The '+' in the cursor during the DND operation is displayed only if drop is accepted.
(through a previous call to GHOST_setAcceptDragOperation(window, TRUE); )
2010-02-01 17:38:44 +00:00
Damien Plisson
cfe7c136f9 Cocoa/DND : added bitmap data type handling in drag'n'drop operations
Conversion of OS type to ImBuf is done inside ghost.
2010-02-01 17:33:41 +00:00
Damien Plisson
7795e71377 Cocoa : fix mouse cursor hang when RMB-dragging in a not frontmost window
With continuous grab on, in 2+ window setup, when RMB-dragging an object in a 3D view of a not active (not frontmost) window, mouse cursor was stuck, with no escape.
Cursor grab must be done by the window that is key (able to receive mouse move events).
2010-02-01 11:20:01 +00:00
Damien Plisson
0e6b88f993 Cocoa : implement opening .blend file by double-clicking on it in OSX Finder
When the user double-clicks on a document file in the Finder, OSX doesn't simply give the filename as a command-line argument when calling Blender, as it is done in other OSes.
Instead, it launches the app if needed, and then sends an "openFile" event.

The user can also open a document file by dropping its icon on the app dock icon. But as this is not real Drag'n'drop, I've renamed the Ghost event to a less confusing "GHOST_kEventOpenMainFile" name.

DND Ghost wiki page updated : http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DragnDrop
2010-02-01 09:11:18 +00:00
Damien Plisson
e4882e3da2 Cocoa : correctly handle late events sent after window deactivate
Cocoa can still send events (tagged with the correct NSWindow handle) after having sent the window deactivate event.
This caused these events being discarded as there was no active window for GHOST_WindowManager.

Fix is to use this NSWindow handle to retrieve the target window and correctly push the event.

E.g. of effects of this bug: OSKey modifier stuck after having invoked Spotlight through its shortcut (Cmd + Space). This gave the impression the Blender window has not got focus back for the keyboard.

Ton, can you confirm if this fixes the "Cocoa window loses focus permanently on using Spotlight" issue you found ?
2010-01-28 19:18:36 +00:00
Damien Plisson
47e8ea5004 Cocoa : fix 'Draw Overlap' method swap issues 2010-01-28 10:56:35 +00:00
Ton Roosendaal
b119ce5fcc Drag and drop 2.5 integration! Finally, slashdot regulars can use
Blender too now! :)

** Drag works as follows:

- drag-able items are defined by the standard interface ui toolkit
- each button can get this feature, via uiButSetDragXXX(but, ...).
  There are calls to define drag-able images, ID blocks, RNA paths, 
  file paths, and so on. By default you drag an icon, exceptionally 
  an ImBuf
- Drag items are registered centrally in the WM, it allows more drag 
  items simultaneous too, but not implemented

** Drop works as follows:

- On mouse release, and if drag items exist in the WM, it converts 
  the mouse event to an EVT_DROP type. This event then gets the full 
  drag info as customdata

- drop regions are defined with WM_dropbox_add(), similar to keymaps 
  you can make a "drop map" this way, which become 'drop map handlers' 
  in the queues.
- next to that the UI kit handles some common button types (like 
  accepting ID or names) to be catching a drop event too.

- Every "drop box" has two callbacks:
  - poll() = check if the event drag data is relevant for this box
  - copy() = fill in custom properties in the dropbox to initialize 
    an operator
- The dropbox handler then calls its standard Operator with its 
  dropbox properties.

** Currently implemented

Drag items:
- ID icons in browse buttons
- ID icons in context menu of properties region
- ID icons in outliner and rna viewer
- FileBrowser icons
- FileBrowser preview images

Drag-able icons are subtly visualized by making them brighter a bit 
on mouse-over. In case the icon is a button or UI element too (most 
cases), the drag-able feature will make the item react to 
mouse-release instead of mouse-press. 

Drop options:

- UI buttons: ID and text buttons (paste name)
- View3d: Object ID drop copies object
- View3d: Material ID drop assigns to object under cursor
- View3d: Image ID drop assigns to object UV texture under cursor
- Sequencer: Path drop will add either Image or Movie strip
- Image window: Path drop will open image


** Drag and drop Notes:

- Dropping into another Blender window (from same application) works 
too. I've added code that passes on mousemoves and clicks to other 
windows, without activating them though. This does make using multi-window
Blender a bit friendler.

- Dropping a file path to an image, is not the same as dropping an 
Image ID... keep this in mind. Sequencer for example wants paths to 
be dropped,  textures in 3d window wants an Image ID.

- Although drop boxes could be defined via Python, I suggest they're 
part of the UI and editor design (= how we want an editor to work), and 
not default offered configurable like keymaps. 

- At the moment only one item can be dragged at a time. This is for 
several reasons.... For one, Blender doesn't have a well defined 
uniform way to define "what is selected" (files, outliner items, etc). 
Secondly there's potential conflicts on what todo when you drop mixed 
drag sets on spots. All undefined stuff... nice for later.

- Example to bypass the above: a collection of images that form a strip, 
should be represented in filewindow as a single sequence anyway. 
This then will fit well and gets handled neatly by design.

- Another option to check is to allow multiple options per drop... it 
could show the operator as a sort of menu, allowing arrow or scrollwheel 
to choose. For time being I'd prefer to try to design a singular drop 
though, just offer only one drop action per data type on given spots.

- What does work already, but a tad slow, is to use a function that 
detects an object (type) under cursor, so a drag item's option can be 
further refined (like drop object on object = parent). (disabled)


** More notes

- Added saving for Region layouts (like split points for toolbar)

- Label buttons now handle mouse over

- File list: added full path entry for drop feature.

- Filesel bugfix: wm_operator_exec() got called there and fully handled, 
while WM event code tried same. Added new OPERATOR_HANDLED flag for this. 
Maybe python needs it too?

- Cocoa: added window move event, so multi-win setups work OK (didnt save).

- Interface_handlers.c: removed win->active

- Severe area copy bug: area handlers were not set to NULL

- Filesel bugfix: next/prev folder list was not copied on area copies

** Leftover todos

- Cocoa windows seem to hang on cases still... needs check
- Cocoa 'draw overlap' swap doesn't work
- Cocoa window loses focus permanently on using Spotlight
  (for these reasons, makefile building has Carbon as default atm)

- ListView templates in UI cannot become dragged yet, needs review... 
it consists of two overlapping UI elements, preventing handling icon clicks.

- There's already Ghost library code to handle dropping from OS 
into Blender window. I've noticed this code is unfinished for Macs, but 
seems to be complete for Windows. Needs test... currently, an external 
drop event will print in console when succesfully delivered to Blender's WM.
2010-01-26 18:18:21 +00:00
Campbell Barton
8c0dff6bc3 Continuous grab in X11 could give events to a different window if the mouse was moved very fast (before it warped) or if there was another blender window with the same process set to always on top.
call XGrabPointer with owner_events set to false so mouse events are given to the window that initiated the grab.
2010-01-21 18:32:34 +00:00
Campbell Barton
9396bb2da9 - AIX ifdef's so windows works, cant test but this seems the most used define. might need to add to buildsystem config.
- transform default scale was too hight, calls to random were inconsistant. (fault of own modif's)
- cmake openal include was added twice on recent commit.
2010-01-19 15:57:02 +00:00
Campbell Barton
530b8bba42 patch [#20612] Making Blender compile on AIX 4.3.3
from Philipp Gühring (sourcerer)
2010-01-19 10:57:59 +00:00
Benoit Bolsee
de59a6c943 Update MSVC project files 2010-01-17 19:19:33 +00:00
Andrea Weikert
870df309c5 MSVC 9 projectfiles
* update for animviz.c
* updated glew dependency for ghost.
2010-01-17 14:47:14 +00:00
Damien Plisson
672aede6a0 Cocoa : fix for modifiers keys handling upon application switching
- fix race condition between applicationBecomeActive, and WindowBecomeKey events that discarded the modifiers keys status change event message
- workaround for a 10.6 bug that made the Cmd (oskey) modifier erroneously on.
2010-01-14 16:01:05 +00:00
Campbell Barton
b0f87935a8 spelling errors, no real changes to code. 2010-01-14 10:59:42 +00:00
Nathan Letwory
e594a8739b Patch [#20588] Adding multisample support to Win32 Ghost - by Mitchell Stokes (Moguri)
Note: AA is still disabled due to AA creating problems for selection tools. If you must, set AA to 2 or 4 in wm_window.c where the GHOST window is created (line 317).
2010-01-13 19:02:13 +00:00
Damien Plisson
32f4877c8c Cocoa : properly distinguish mouse from multitouch trackpad scroll events
Mighty mouse trackball now fires proper wheel events (and not trackpad pan ones)
2010-01-13 17:43:42 +00:00
Damien Plisson
636b4a0663 Cocoa : activate multitouch trackpad features only on equipped macbooks 2010-01-12 14:12:44 +00:00
Damien Plisson
4a011a99cb Multitouch trackpad 2 fingers gestures implementation
- 2 fingers scroll (MOUSEPAN / GHOST_kTrackpadEventScroll event) pans/scrolls the view
- 2 fingers pinch (MOUSEZOOM / GHOST_kTrackpadEventMagnify event) zooms the view
And in 3D view:
- alt + 2 fingers scroll rotates the view
- 2 fingers rotation (MOUSEROTATE / GHOST_kTrackpadEventRotate) orbits the view.

The implementation uses a new GHOST event type: GHOST_kEventTrackpad, that is then dispatched as Blender MOUSEPAN, MOUSEZOOM
or MOUSEROTATE events.

This is currently fully implemented for OSX (GHOST Cocoa fires the new events), with auto-detection of the source peripheral, so that a regular mouse still sends MOUSEWHEEL events.
2010-01-11 11:14:36 +00:00
Guillermo S. Romero
5074a4c307 Request different OpenGL oversampling levels before giving up. 2010-01-10 22:52:40 +00:00
Campbell Barton
6b4a8c5d72 attemp to fix [#20610] GHOST_WindowX11.cpp:202: X11 glXChooseVisual() failed, verify working openGL system!
cant test but should work.
2010-01-10 19:21:46 +00:00
Brecht Van Lommel
b504a48854 FSAA: was not disabled on X11 correctly. 2010-01-08 17:41:04 +00:00
Guillermo S. Romero
840ae92052 Do not ask for AA if not supported. 2010-01-07 23:23:00 +00:00
Campbell Barton
73b52e2430 Viewport AA for X11 2010-01-07 21:58:28 +00:00
Damien Plisson
a994a52497 Disable OpenGL anti-aliasing by default for now. 2010-01-06 15:34:49 +00:00
Damien Plisson
75f190bde8 OpenGL Anti-aliasing implementation for blender windows
Added GHOST_TUns16 numOfAASamples parameter to GHOST_CreateWindow to specify the number of AA samples (null if no AA wanted)
Implemented it in the cascade of GHOST classes.

Full implementation currently done for OSX/Cocoa, stubs for other OSes.
Moguri : it's ready for your win32 implementation !

Note that fallback to a non AA window (if gfx card doesn't support AA) is done inside GHOST OS specific layer, so that blender windowmanager still gets its window created properly.
2010-01-06 11:42:52 +00:00
Damien Plisson
ef8273428c Cocoa: small potential issue remained from fullscreen ancient ages in the Window getValid function 2010-01-06 09:22:40 +00:00
Brecht Van Lommel
50de143ca3 Fix #20558: open file with new window setup corrupts text and icons in the UI.
On X11, the opengl context was destroyed when closing a window. This lead to
the text and icon textures being lost (among other things), now the opengl
context is kept like on Win/Mac.
2010-01-04 16:26:03 +00:00
Stefan Gartner
1f33d574c2 OS X Makefiles:
* added some new variables (mostly the same as with scons):
  - USE_COCOA: use Cocoa for ghost (defaults to true)
  - MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
    (ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
    a different architecture, though cross compilation only works on Intel Macs, because makesdna
    and makesrna are built for the target architecture.
    For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
  - MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit    builds)
  - MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
    OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
  - MACOSX_SDK: path to a specific SDK. currently not used 
  - USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
    is mandatory in that case))
 * use the same compiler flags as scons
 * default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
 * extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
   break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip 

When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
Damien Plisson
4ab4d2dd20 Fix some build warnings 2010-01-01 15:48:14 +00:00
Stefan Gartner
5e6e3453a5 OS X: added support for building with Cocoa to Makefiles
to build with Cocoa support, set WITH_COCOA to true in user-def.mk
2009-12-21 10:38:04 +00:00
Damien Plisson
c836b0ae18 Cocoa : add confirmation request before opening a .blend file (dropped on Blender icon or dbl-clicked in Finder) 2009-12-18 13:13:14 +00:00
Damien Plisson
f09d2e6bc1 Cocoa : fix Dropped on application event was not sent 2009-12-18 09:50:14 +00:00
Damien Plisson
b6bf852670 Reenable disabled window switching shortcuts in 10.4 builds 2009-12-12 08:45:16 +00:00
Martin Poirier
bca53f0906 [#20266] Blender starting without X11 segfaults
Abort when ghost x11 cannot initialize a display.

It would just crash later anyway, better to abort with a reasonable error message.
2009-12-05 20:06:19 +00:00
Benoit Bolsee
6bfb3cf6ef Update MSVC9 project files 2009-12-04 10:37:24 +00:00
Damien Plisson
3b1c6d6065 Quicktime Carbon: Fix memory leak when build with cocoa 2009-12-03 12:16:00 +00:00
Damien Plisson
863668a145 Cocoa: suppress unwanted beep when pressing Cmd + key on 10.4 2009-12-02 15:02:29 +00:00
Damien Plisson
dd90ffd47b Cocoa: remove errors for all supported SDK/CPU configs 2009-12-02 13:05:31 +00:00
Damien Plisson
39f42df424 CMake: remove new GHOST_DropTargetWin32.cpp file from non-win32 platforms builds 2009-12-02 10:21:10 +00:00
Damien Plisson
0efaf10b7a Cocoa: fix delaying issue for events that were fired outside the processEvents function
An example of a visible issue was a delayed wm resize when switching to/from fullscreen mode
2009-12-02 10:10:20 +00:00
Guillermo S. Romero
4913f415cc SVN maintenance. 2009-12-02 01:23:29 +00:00
Nathan Letwory
372bfeb0c5 * make sure we don't choke on what we don't have :° 2009-12-02 01:12:22 +00:00
Nathan Letwory
8847615116 * make sure drop target files are filtered too. 2009-12-02 01:05:37 +00:00
Nathan Letwory
5a3791ab5b Apply patch [#20145] Ghost Win32 roundup patch: Minimum Window Size, Continuous Grab and Drag And Drop
This nice patch by Matt D. (matd in #blendercoders) adds three nice features that can be seen already in the other supported OSes:

* minimum window size: to prevent some bugs with the window manager of Blender, system windows cannot be resized smaller than the minimum size.

* Continuous Grab is finally in Windows! Default settings since alpha 0 already have the feature enabled by default, so grab a new build and enjoy :)

* GHOST support for drag and drop added. This prepares Blender for drag and drop from OS -> Blender. Currently not very useful, since wm needs to be readied for that. But it does work (do BF_GHOST_DEBUG=1 build and drag a file onto a Blender window).

Thanks Matt D.!
2009-12-02 00:57:12 +00:00
Damien Plisson
d7877d360a Cocoa: proper implementation of the modifiers key wrong value when application becomes active again
Note: this works fine when running under 10.6, even if compiled with an older sdk
Under 10.4/10.5, workaround remains to assume no modifier key is pressed when the user restores the focus to the application
2009-12-01 15:46:37 +00:00
Damien Plisson
eb24e788b8 Cocoa: implement Cmd+W to close window, workaround for wrong modifiers key status upon focus retrieval
The carbon GetModifierFlag function (to get the current modifier keys status) is reimplemented in cocoa only from 10.6.
So we need to use a workaround to get the correct modifiers when blender application gets focus back. Current one is to assume no modifiers.
This at least fixes the issue when blender has been hidden using Cmd+H. The Cmd modifier was still seen as ON until the user pressed again on it.
2009-12-01 10:23:27 +00:00