Commit Graph

872 Commits

Author SHA1 Message Date
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
Campbell Barton
9b26e7d7ca minor changes to x11 cursor grab wrapping
- when wrapping 2 mouse events were added.
- on release blender still had the last event (possibly outside the screen), where menus would fail to show. Add a mouse event by calling XWarpPointer with no movement when leaving grab.
2009-10-18 09:55:39 +00:00
Campbell Barton
69c6a33ba1 wrap the mouse within the region while grabbing so on release the current view never changes and less likelyhood of loosing the cursor when running blender on 2+ screens. (assuming the 3d view isnt stretched over both) 2009-10-17 19:32:28 +00:00
Campbell Barton
d11888b470 - wrapping failed with the cursor at the screen edge,
- changed numbuts behavior with continuous grab so dragging back after passing the button limit immediately adjusts the value
2009-10-17 14:54:13 +00:00
Campbell Barton
91d89c1ff7 Adjustments to continuous grab
- Use an enum for grab modes rather then boolean options.
 -- GHOST_kGrabNormal: continuous grab userpref disabled
 -- GHOST_kGrabWrap: wrap the mouse at the screen bounds *
 -- GHOST_kGrabHide: hide the mouse while grabbing and restore the mouse where it was initially pressed *

GrabWrap is nice for transform and tools where you want some idea where the cursor is, previously I found both restoring the mouse at its original location and restoring at a clamped location was confusing with operators like transform, wrapping is not ideal but IMHO the best of a bad bunch of options.
GrabHide  is for numbuts, where restoring the mouse at the initial location isnt so confusing.
2009-10-17 14:08:01 +00:00
Damien Plisson
ee6dd8ec38 Cocoa :
- implemented custom cursor handling
2009-10-15 20:09:50 +00:00
Damien Plisson
3b2d752933 Cocoa :
- Small changes to make ghost_cocoa compatible with 10.4 + gcc4.0 (the initial goal was to be 10.5+ compatible, but 10.4 is finally also possible)

- Main window title is now in Apple document window title style (proxy icon + filename)

- fix for top menu "Blender" sub-menu not anchored correctly in 10.5
2009-10-15 08:27:31 +00:00
Damien Plisson
107447b79e Cocoa : bugfix #19591
Add trackpad 2 fingers gesture handling, to have it mimicking correctly mouse wheel, and thus zoom in/out correctly in the 3D view
2009-10-14 09:46:41 +00:00
Damien Plisson
6f2146e848 Cocoa : bugfix on continuous grab (cursor was returning to a wrong position upon button grab end) 2009-10-14 08:24:40 +00:00
Damien Plisson
9c7fe13a57 Cocoa : fix secondary window display bug issue 2009-10-12 16:51:36 +00:00
Damien Plisson
b4a113669d Cocoa : Fullscreen mode improvement (Bugfix# 16682)
Instead of capturing the display and all user input (video game mode), the mechanism is now to hide dock & menu bar, and enlarge the window made borderless to cover the whole screen surface.

Thus all OS X window management features remains available (other windows,multi screens compatible, process switching, expose, spaces, ..)
2009-10-12 09:53:28 +00:00
Damien Plisson
1234f4709b Cocoa : Bug fix for continuous grab feature implementation 2009-10-09 17:42:31 +00:00
Damien Plisson
8f57b368ca Cocoa :
Implement OS X support for Campbell's new continuous grab feature
2009-10-09 14:42:36 +00:00
Damien Plisson
ca3e778134 Cocoa port :
- Fullscreen mode is back!
- Cleaner fix for tablet events handling
2009-10-09 12:48:28 +00:00
Damien Plisson
d01c737283 Cocoa port :
Quick&dirty bug fix to catch ad discard tablet induced exceptions.

I'll make a clean fix upon getting a tablet to debug.
2009-10-08 17:13:57 +00:00
Damien Plisson
88613b9184 Cocoa port :
Bug fix : newly created window not seen as activated by WM

Added more conservative memory management (may need to optimize later)
2009-10-08 15:28:31 +00:00
Daniel Genrich
14f62c1321 Smoke:
* Enable external forces like e.g. wind
2009-10-08 10:18:14 +00:00
Campbell Barton
0c857a4f14 - made ungrab a second function - WM_cursor_ungrab
- ungrab can restore the position of the mouse clamped to the window bounds (much nicer for transform)
2009-10-07 21:19:35 +00:00
Campbell Barton
77476b294f Experimental option to allow moving the mouse outside the view, "Continuous Grab" in the user-prefs.
- Useful for dragging buttons to the far right when theyd otherwise hit the screen edge.
- Useful for transform though probably NOT what you want when using the transform manipulator (should make an option).
- When enabled, number buttons use this as well as a different conversion of mouse movement
  float numbuts: mouse 1px == 1-clickstep
  int numbuts: 2px == 1 (tried 1:1 but its too jitter prone)

details...
- access as an option to GHOST_SetCursorGrab(grab, warp)
- Currently all operators that grab use this, could be made an operator flag
- only Ghost/X11 supported currently
2009-10-07 07:11:10 +00:00
Damien Plisson
07aba4f933 Cocoa port : First pure Cocoa version !
(Mostly for very early testers)

Cocoa uses coordinates with y=0 at bottom : updated wm_window.c and wm_event_system.c for COCOA build to avoid double conversions in response to mouse move events and GHOST_getCursorPosition

Known limitations:
No fullscreen support
Font issue in preference panel
libSDL uses some Carbon functions
2009-10-06 16:56:22 +00:00
Damien Plisson
77b8be6e13 Cocoa port : Fix bugs in clipboard operations 2009-10-05 15:00:07 +00:00
Damien Plisson
a344977147 Cocoa port :
- Window creation at preferred size
  Implement in Ghost the use of Cocoa functions to get the maximum visible rect (size and position) for the window contents (all screen excluding dock, top menu, and window title bar)
  Thus Apple specific code in window creation (wm_window.c & wm_apple.c) is no more needed => removed in case of Cocoa build

- Alert on exiting despite unsaved changes
  Add to GHOST method to maintain an all platforms (not apple specific anymore) status on unsaved changes
  Update GHOST_SystemCocoa to use this for asking or not user to confirm exit without saving changes
2009-10-05 12:55:16 +00:00
Damien Plisson
14c1dd941c Cocoa port : added standard menu in OSX menu bar 2009-10-03 18:25:54 +00:00
Daniel Genrich
fbb47e8604 Smoke:
* Dissolve is back
* Obstacles coming back (some bugs left i think)
2009-10-02 11:09:05 +00:00
Damien Plisson
aa2cd95c1b Cocoa port : first Cocoa version of GHOST_DisplayManagerCocoa 2009-10-02 07:20:33 +00:00
Damien Plisson
3f3c2d0204 Cocoa port, events WIP:
- Fix keyboard keymap
- NSAutoReleasePool now drained at every cycle
- Tablet events combined with mouse events now handled
2009-10-01 08:58:09 +00:00
Brecht Van Lommel
b466286c3e Render & Compositing Thread Fixes
* Rendering twice or more could crash layer/pass buttons.
* Compositing would crash while drawing the image.
* Rendering animations could also crash drawing the image.
* Compositing could crash 
* Starting to rendering while preview render / compo was
  still running could crash.
* Exiting while rendering an animation would not abort the
  renderer properly, making Blender seemingly freeze.
* Fixes theoretically possible issue with setting malloc
  lock with nested threads.
* Drawing previews inside nodes could crash when those nodes
  were being rendered at the same time.

There's more crashes, manipulating the scene data or undo can
still crash, this commit only focuses on making sure the image
buffer and render result access is thread safe.


Implementation:
* Rather than assuming the render result does not get freed
  during render, which seems to be quite difficult to do given
  that e.g. the compositor is allowed to change the size of
  the buffer or output different passes, the render result is
  now protected with a read/write mutex.
* The read/write mutex allows multiple readers (and pixel
  writers) at the same time, but only allows one writer to
  manipulate the data structure.
* Added BKE_image_acquire_ibuf/BKE_image_release_ibuf to access
  images being rendered, cases where this is not needed (most
  code) can still use BKE_image_get_ibuf.
* The job manager now allows only one rendering job at the same
  time, rather than the G.rendering check which was not reliable.
2009-09-30 18:18:32 +00:00
Guillermo S. Romero
727745bd49 SVN maintenance. 2009-09-30 17:13:57 +00:00