- 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 ?).
- 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)
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
- 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)
- 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
- 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
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.
- 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)
- 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.
- 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.
- 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
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, ..)
- 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
(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
- 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