Commit Graph

899 Commits

Author SHA1 Message Date
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
Martin Poirier
eee8bf344a Cursor Grab bugfix: passing NULL for bounds didn't initialize properly.
Symptom: first button drag gets stuck on values.

Cause: Buttons didn't set grab bounds, to use the whole window. But Ghost didn't do anything in that case, it left the bounds value as is. It only affected the first cursor grab, because cursor ungrab sets it to -1, which forces it to use the whole window size (checking every mouse move) for subsequent grabs.

Solution: When NULL, init bounds to window size (and don't query every mouse move).
2009-11-26 02:58:53 +00:00
Martin Poirier
1aebd524a2 Fix for continuous grab on X11.
Need to stop accumulating warp coordinates after the first cursor warp (store time of new generated event and skip warp for events time smaller).

There's some interesting X11 code in there, if people are curious.
2009-11-24 19:47:57 +00:00
Damien Plisson
78ce1fb6ca compile fix when compiling with WAIT_FOR_VSYNC = 1 (btw, is this still used ?) 2009-11-24 10:19:07 +00:00
Andrea Weikert
8fdaa263c0 MSVC 9 projectfiles
* Added GLEW_STATIC where necessary to make Blender compile again
* First attempt at compiling blenderplayer again - compiles, but doesn't link yet 
* removed deprecated SND_ functions from blenderplayer
2009-11-22 13:15:36 +00:00
Damien Plisson
169b0cbee9 Drag'n'drop : moved "setAcceptDragOperation" functions at window level
GHOST/Cocoa : changed strings encoding to isoLatin1 (was UTF-8)
2009-11-19 08:56:26 +00:00
Damien Plisson
45e38635a4 Drag'n'drop : add freeing of dropped resources upon event object release 2009-11-17 08:27:11 +00:00
Damien Plisson
698086dfb1 MAC/Cocoa:
- Drag'n'Drop events are now correctly signaled to the main loop for dispatch (these events were directly handled in cocoa callbacks without notifying the process loop)
- Fix timestamping of events & add debug print of drag'n'drop events.
2009-11-15 08:34:31 +00:00
Damien Plisson
aac16ce4ec - scons fix for 10.4 build (use the 10.4 libs dir)
- warning fix in ghost/cocoa
2009-11-14 13:01:14 +00:00
Benoit Bolsee
2646558079 Update MSVC project files 2009-11-13 13:06:26 +00:00
Martin Poirier
f7d7149936 Debug tools: new function MEM_testN(void*)
returns 0 if pointer is not in memlist
2009-11-11 03:45:26 +00:00
Martin Poirier
21385eb4ec New function:
void MEM_callbackmemlist(void (*func)(void*));

Will call the function passed as argument with all allocated address as parameter. Useful for debuging.
2009-11-10 21:33:53 +00:00
Guillermo S. Romero
320fb05ebc SVN maintenance. 2009-11-10 19:22:10 +00:00
Damien Plisson
af2e6c38e9 Drag & drop implementation at GHOST level (only OSX for now)
The dragging sequence is performed in four phases:
 
- Start sequence (GHOST_kEventDraggingEntered) that tells a drag'n'drop operation has started. Already gives the object data type, and the entering mouse location

- Update mouse position (GHOST_kEventDraggingUpdated) sent upon each mouse move until the drag'n'drop operation stops, to give the updated mouse position.
Useful to highlight a potential destination, and update the status (through GHOST_setAcceptDragOperation) telling if the object can be dropped at the current cursor position.

- Abort drag'n'drop sequence (GHOST_kEventDraggingExited) sent when the user moved the mouse outside the window.

- Send the dropped data (GHOST_kEventDraggingDropDone)

- Outside of the normal sequence, dropped data can be sent (GHOST_kEventDraggingDropOnIcon). This can happen when the user drops an object on the application icon. (Also used in OSX to pass the filename of the document the user doubled-clicked in the finder)

Note that the event handler is responsible for freeing the received data.
And the mouse position is sent directly in blender client coordinates (y=0 at bottom)

The GHOST_setAcceptDragOperation(TRUE) call must be placed before the user drops the object for it to be accepted.

Current handled data types :
- Text string
- Array of filenames (full paths)
- Bitmap image (not implemented yet)
2009-11-10 12:56:46 +00:00
Guillermo S. Romero
3e2766bc2e Add FFTW3 support to Makefiles, make OpenJpeg use OS lib for Linux.
And handful of whitespace clean ups.
2009-11-09 20:08:19 +00:00
Damien Plisson
9c0cdd2501 - fix Cocoa window setOrder function to maintain focus on a blender window (e.g. ensure the blender window gets the focus when the user presses ESC to move back the render window)
- QuickTime export fixes.
Note that QuickTime export still crashes because it tries to open a "codec settings" dialog from the rendering background thread (and not the main/UI thread).
One quick fix may be to move the movie export initialization out of the render thread back into the operator function.
But a cleaner way would be to get rid of such a carbon/win32 dialog and place the codec settings inside blender interface
(additional fields in the output panel as it is currently the case for other file formats ?).
2009-11-09 17:06:48 +00:00
Joshua Leung
e1e6391a0b Fix for scons + mingw compiling
Removed the special exception for booleans lib priority, which was needed in the past to get it compiling ok with the src directory.
2009-11-06 08:32:50 +00:00
Brecht Van Lommel
1e40adddc7 2.5 Modifiers: mesh deform, boolean and decimation work again. 2009-11-05 18:05:55 +00:00
Damien Plisson
fe82c2674e Mac / Cocoa:
- Fix update event fired at each loop iteration. Thx Brecht for the patch
- Fix missing deactivate event when in fullscreen mode
2009-11-04 17:50:31 +00:00
Matt Ebb
8a57ff7afa Slightly nicer OS X quit message 2009-11-03 07:24:22 +00:00
Nathan Letwory
46487ad59e == COLLADA ==
* fix win64 build and add proper library usage for COLLADA 64bit. Update also lib/win64 (r24263).
2009-11-02 23:55:04 +00:00
Campbell Barton
6bfcd5a811 how embarrassing! 2009-11-02 17:25:15 +00:00
Damien Plisson
93173a6dd4 Mac / COCOA :
- fix 10.4 compile issues

- fix some scons issues & add WITH_BF_COLLADA = False in scons darwin_config.py to allow build waiting for complete Collada Mac implementation
2009-10-30 20:20:48 +00:00
Damien Plisson
b1a832a7e2 Mac / COCOA : Imbuf
- replace libtiff by calls to Cocoa services to load/save tiff files
(Libtiff, dynamically linked is not distributed with OS X, and would have had to be shipped for all four architectures)

The imb_cocoaLoadImage & imb_cocoaSaveImage are generic towards the bitmap format, and thus can handle TIFF, GIF, JPG, JP2000, BMP and raw camera formats (read-only for these), even if today only TIFF is used as the other formats are already handled.

- CMake updated
- scons updated (Thx to Jens Verwiebe)
2009-10-29 18:06:49 +00:00
Martin Poirier
63e3cfb82f ifix syntax error in SConscript 2009-10-27 14:17:29 +00:00
Nathan Letwory
abf7bebac5 and another bump! Gotta love indentation °_° 2009-10-27 14:15:40 +00:00
Nathan Letwory
8a7a70f55c bumping commit count. 2009-10-27 14:14:40 +00:00
Nathan Letwory
a9610d45b6 r24111 broke the build on non-osx systems. 2009-10-27 14:11:28 +00:00
Damien Plisson
b8a7f844ca Mac:
Fixed gcc-4.0 compile error (cocoa)

Updated scons to build cocoa (32bit & 64bit) (Thx Jens Verwiebe for the patch):
- make sure right python is unzipped to app-bundle ( printing information at the end of compiling )
- make sure arch-setting appends needed flags ( depending on OSX-version obsolete sometimes but harmless )
- link correct frameworks depending on gfx-api ( cocoa/carbon)
- conscript prepared for cocoa objC-files
- link to openAL-framework, using the headers from blender-lib + the symbols in framework

Usage instruction:
The default build is Cocoa 32bit.
To change it, copy config/darwin-config.py to user-config.py in the blender folder, and edit:
- WITH_GHOST_COCOA & MACOSX_ARCHITECTURE variables to select cocoa/carbon, and the arch (i386, X86_64, ppc, ..)
- the libs options as usual
2009-10-27 13:40:41 +00:00
Damien Plisson
2b1705afff Cocoa/Mac:
- fix bad window context initialization bug introduced in rev # 24081
2009-10-26 18:00:06 +00:00
Damien Plisson
21757e1161 Cocoa / Mac:
- use Cocoa function to convert keys character value to isoLatin-1 encoding instead of the translation table. Works better with international keyboards

- enable stereo GL option

- fix source/creator CMake file to remove unneeded folders in the app bundle (the __MACOSX stuff). (Thx jensverwiebe)
2009-10-26 08:43:24 +00:00
Damien Plisson
068ab484ac Cocoa / Mac:
- tablet : fix pressure retrieval => value sliding now works with tablet, UV-painting is pressure sensitive, and no more crash when clicking on window minimize button with the tablet

- update CMake file to remove unneeded folders in the app bundle (the __MACOSX stuff). From Jens' patch
2009-10-23 12:12:44 +00:00
Damien Plisson
eab11543f3 Cocoa / Mac:
- fix set mouse cursor position in case of multi-display setting. Enables continuous grab to work when blender window is on a secondary display
2009-10-21 15:39:32 +00:00
Campbell Barton
f4d6bbd656 - improvements from Mathias Panzenböck (panzi) patch [#19695], which avoid conversion to/from strings with context property assignment. though didnt apply entire patch.
- [#19698] Add Menu Item: View3d -> Object -> Move to layer
  from Howard Brooks (hbroo)
- had cursor grab commented by mistake for X11
2009-10-21 07:56:08 +00:00
Guillermo S. Romero
1224835188 Size and position are normally requested by program, not user. 2009-10-20 21:58:19 +00:00
Ton Roosendaal
5d0f5d210a Fix in KDL for gcc 3.3 compilation
Thanks to Benoit Bolsee and Alexander Clausen for help!
2009-10-20 16:02:41 +00:00
Damien Plisson
5571d37e94 Cocoa:
- fix windowDidResize event not forwarded in some cases on 10.6
- fix crash on repeated Cmd-Q + Cancel quit actions
- place stub for .blend drop on blender app icon
2009-10-20 15:23:04 +00:00
Brecht Van Lommel
cb8f7fd385 Auto Save
Auto save is now working again in 2.5. It will also remember now what
the location of the original file was when recovering it, so that
library links still work and saving the restored file does not save to
the temp directory. There is also a new Recover Auto Save operator
which will open the filebrowser in the temp directory and show the
auto saved .blends.

Implemenation Notes:

* Timer storage was moved from window to windowmanager, so we can have
  windowmanager level timers too now, doesn't make sense to have
  autosave timer attached to a particular window.
* FileGlobal now has a filename field storing where the file was saved.
  Note that this is only used when loading a file through the recover
  operators, regular file read doesn't use it, so copying the quit.blend
  manually over the original file will still work as expected.
* Jobs timer no longer uses operator now, this seems more like an
  internal thing, changing keymaps should not make it possible to break
  the jobs manager.
* Autosave is postponed by 10 seconds when a modal operator is running,
  e.g. transform or file browsing.
* Moved setting G.sce in setup_app_data before depsgraph updates, these
  can use the filename for pointcaches.
2009-10-20 13:58:53 +00:00
Damien Plisson
1f9d8826db Cocoa:
- fix 10.6 API used in window resizing callback causing crash on 10.5 systems (Thx Jasper Mine for the bug report)
- implemented min window size enforcement to prevent tiny windows messing up blender's internal ui layout (same as done by Campbell on X11, is a partial fix of bug #19550)
- added (commented) code for enabling multithreaded opengl (this optimization is here for experimental tests, not for mainstream, so bleeding edge testers would want to uncomment the three "Multithreaded opengl code : uncomment for enabling" sections)
2009-10-20 08:13:12 +00:00
Campbell Barton
cae71123e5 set the min size hints for x11 to prevent tiny windows messing up blenders internal ui layout 2009-10-20 07:51:42 +00:00
Damien Plisson
b18eeed225 Cocoa :
- fix#19592 : implemented updated continuous grab feature (fixing compilation issues)
- fix some 10.6 & 64bit warnings
2009-10-19 10:49:45 +00:00