Commit Graph

764 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
Guillermo S. Romero
727745bd49 SVN maintenance. 2009-09-30 17:13:57 +00:00
Damien Plisson
570c187ba1 Cocoa port start:
GHOST*Cocoa.mm & .h files creation
First Cocoa version of GHOST_SystemCocoa.mm
CMake files update to allow optional (WITH_COCOA option) Cocoa version build - disabled by default
SCons files are not updated to allow Cocoa build (the ghost .mm files)
2009-09-30 08:47:39 +00:00
Benoit Bolsee
1483fafd13 Merge of itasc branch. Project files, scons and cmake should be working. Makefile updated but not tested. Comes with Eigen2 2.0.6 C++ matrix library. 2009-09-24 21:22:24 +00:00
Campbell Barton
ad7fab49d4 5 button mouse support from b333rt in IRC with some edits for X11.
Tested in X11 where its fairly confusing.
buttons 4 and 5 are used for the wheel which is well known, but it seems 6 and 7 are used for horizontal scrolling, my mouse assigns the extra 2 buttons to events 8 & 9.

So the X11 events used for buttons called 4&5 in blender are 8&9 in X11.

The mouse buttons can be re-ordered like this once xorg starts (swaps 6,7 with 8,9)
  xmodmap -e "pointer = 1 2 3 4 5 8 9 6 7"

Couldn't test Win32, Apple not supported.
If someone wants to add horizontal scrolling its quite easy.
2009-09-21 05:56:43 +00:00
Campbell Barton
fd6654d4ef remove brush_sample_falloff, #if 0, unused function is_tablet_cursor 2009-09-18 03:41:37 +00:00
Campbell Barton
a393a9c6f0 same as r23322 in 2.4x
--- 2.4x log
use functions to detect stylus and eraser from the wine project, supposed to work with non-wacom tablets too (searches for wizardpen & acecad as well as 'stylus').
2.4x did an exact check on the name, 2.5 does a case insensitive search on the type.

This does a case insensitive check on both the name and type.

close the devices on exit too.
2009-09-18 02:38:38 +00:00
Matt Ebb
4a15b40c37 * fix compilation on osx 2009-09-16 22:27:27 +00:00
Thomas Dinges
6b5ba70059 2.5 Ghost Compile Fix for windows. Patch by b333rt. Thanks! 2009-09-16 17:13:03 +00:00
Campbell Barton
7c5695c801 - bpy.data.sounds was a collection of ID's rather then Sounds
- last commit, missed include for rna_object_api.c & bad args to find_basis_mball
- use enum for GHOST tablet type None/Stylus/Eraser, had duplicate definition for these in C. Only tested X11, may need to cast to an int for other OS's.
2009-09-16 15:55:00 +00:00
Guillermo S. Romero
1b2344a1f1 Also set utf8 encoded hint for window title. 2009-09-14 20:17:56 +00:00
Campbell Barton
0a3694cd6e white space commit. (2 spaces -> tab).
Was annoying to use a different editor for cmake only.
theeth says this should be ok with gsoc and merges from branches.
2009-09-06 01:51:23 +00:00
Nathan Letwory
9216efcba2 == SCons ==
* bring back 'player' libtype, after investigation with ideasman.
  scons/mingw works nicely, for some reason msvc fails to link still, will look further into it.
2009-09-05 01:58:02 +00:00
Benoit Bolsee
6dbadb23ce update MSVC project files. 2009-08-20 09:18:55 +00:00
Nicholas Bishop
912c48442c 2.5/Ghost:
* Hopefully fixed X tablet support. The name string was not a reliable way of finding tablet anymore, so now we get the type string and search it for 'stylus' and 'eraser'. Still not very robust, but without UI I don't see how to do better.
2009-08-17 19:54:29 +00:00
Campbell Barton
c32fce0705 some fixes for netbsd with cmake
- CMake, use FIND_PACKAGE(Freetype) for unix/linux
- Only link with libdl.so on linux
- use statvfs rather then statfs for netbsd (size of statfs wasnt available)
- add x11 include path with ghost, glu.
2009-08-14 13:13:36 +00:00
Benoit Bolsee
e49ad2e148 Fix a bug in Ghost causing crash on Blender exit. 2009-08-11 11:44:45 +00:00
Campbell Barton
8aa3383408 fix for ghost memory leaks
- ghost data wasn't being freed (added wm_ghost_exit() call to wm_init_exit.c)
- GHOST_EventManager wasn't freeing GHOST_IEventConsumer's
- ghost/X11 wasnt calling XCloseDisplay(), some junk from X11 wasnt being freed
- ghost/X11 XAllocNamedColor wasn't freeing the colors when done making a custom cursor.
2009-08-05 02:40:51 +00:00
Campbell Barton
de36dd1e99 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22099:22130 2009-08-02 03:59:00 +00:00
Campbell Barton
f45dcf022d - X11 tablet was using uninitialized variables.
- Added BLENDER_FORCE_SWAPBUFFERS in help message.
2009-08-02 03:41:42 +00:00
Campbell Barton
41a0bfaf7c sizeof() was being used incorrectly to clear X11 m_keyboard_vector, would only have 4-8 bytes cleared rather then 32.
fix for harmless memleak too.
2009-08-01 09:07:45 +00:00
Diego Borghetti
00e92c4d8c Fix crash on Linux with some WM.
This is fixed on trunk but was remove in some merge (give conflict).
2009-07-28 19:14:25 +00:00
Daniel Genrich
dff9dce1cd Windows: fixing user preference window opening full screen 2009-07-25 20:16:56 +00:00
Brecht Van Lommel
a2a04bab8a 2.5: fix for last commit, left in debug print. 2009-07-09 18:10:35 +00:00
Brecht Van Lommel
b00409e72d 2.5: X11
* Pass on mouse location on window leave/enter too, fixing some
  issues with button highlights and tooltips.
* When a modal operator runs, grab the mouse cursor so that for
  example transform still works when you move your mouse outside
  of the window, previously it would just stop then. This is
  automatic now for all modal ops, perhaps not always needed?
* Fix for a trailing button highlight issue.
2009-07-09 16:05:01 +00:00
Brecht Van Lommel
c8b4cf9206 2.50:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19820:HEAD

Notes:
* Game and sequencer RNA, and sequencer header are now out of date
  a bit after changes in trunk.
* I didn't know how to port these bugfixes, most likely they are
  not needed anymore.
  * Fix "duplicate strip" always increase the user count for ipo.
  * IPO pinning on sequencer strips was lost during Undo.
2009-06-08 20:08:19 +00:00
Daniel Genrich
ab0ccbeef9 Win GUI fix: maximize works again without distorted regions 2009-06-08 11:55:16 +00:00
Daniel Genrich
82501bbec5 Win GUI fix: Blender won't hide behind the taskbar anymore on startup (in non maximized mode). Until now, the bottom of Blender always got hidden behind the taskbar - verified to fix at least Win7 + XP
- Windows devs (elubie, jesterKing): please check this fix.
2009-06-07 23:36:34 +00:00
Thomas Dinges
2a055ca728 2.5:
* Added new modifier tab.
* Fixed problems when no object was selected after delete.

* Added initial Armature, Bone, Curve and Font panels, by William Reynish (Billrey). Thanks!
* Small RNA changes

* Commit revision 20240 and 20268 from trunk. ("Mouse wheel zoom lost after rendering.")
2009-05-19 15:38:36 +00:00
Dalai Felinto
379f02f6e6 CMake + MSVC debug build fix
Initializing lResult = 0;
and removing NOP (if(!lResult) lResult = 0;

That was discussed with Genscher and Benoit in IRC.
2009-05-18 21:05:21 +00:00
Diego Borghetti
96348bc772 Commit revision 20062 and 20109 from trunk, also fix a small memory
error on interface, was try to free an incorrect pointer.
2009-05-18 19:47:04 +00:00
Thomas Dinges
65796e2c07 Patch #18758 for bug #17423 by Matt D. (foom) Thanks!
"Mouse wheel zoom lost after rendering."
2009-05-17 15:09:03 +00:00
Benoit Bolsee
b22605c4df BGE #18691: Blenderplayer fullscreen messes up desktop on OS X Leopard. Applied patch #18705 by sbn. I cannot compile osx but the patch seems perfectly alright to me. Can OSX users confirm that it compiles well on the various OSX version? 2009-05-13 06:53:21 +00:00
Diego Borghetti
cf8a37a3bb Fix Copy & Paste not working inside Blender.
My last patch remove the code that check if Blender is the owner
of the selection, that is why stop working.
2009-05-08 19:37:14 +00:00
Diego Borghetti
405cf80eb8 Big, big commit!!
1) Remove WITH_FREETYPE2 from code, so now blender always need freetype2
2) Remove the old bmfont
3) Remove ftfont and bFTGL library
4) Implement a new BLF_draw_default function for place that still need/use
   the old BMF api.

I try to update both, scons and cmake, but I only can test with make, so
hope all work fine.

MSVC is broken, but I don't have Windows, things to search and fix are
any reference to WITH_FREETYPE2, FTGL and BMFONT (take in care that
blenkernel also have a BKE_bmfont.h, this don't have anything to do with bmfont).
        Always have to link/include the freetype2 library
        Remove any reference to libbmfont
        Remove any reference to libftfont
        Remove any reference to libbftgl (or libbFTGL)
2009-05-05 23:10:32 +00:00
Diego Borghetti
4ecff51bfe BugFix [#18597] Blender's text editor cant paste from SciTE in linux
Commit patch [#18597] Blender's text editor cant paste from SciTE in linux
Submitted by Campbell.

I made some changes to cleanup a little the code, atoms are now in the
System class. The getClipboard_xcout try to convert/request:
	1) Request for UTF8, if fail
	2) Request for COMPOUND_TEXT, if fail
	3) Request for TEXT, if fail
	4) Request for STRING

Test here with SciTE Version 1.77, firefox, xterm and text editor working
with both library's gtk/qt and all work fine.
2009-05-04 18:46:34 +00:00
Diego Borghetti
0999cf406a Fix crash because XSetInputFocus fail.
Some WM send a WM_TAKE_FOCUS event before the window is really mapped
(for example, change from virtual desktop), because of this, the call
to XSetInputFocus fail and close Blender.
2009-05-04 15:31:28 +00:00
Brecht Van Lommel
874c29cea8 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes:
* blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
2009-04-20 15:06:46 +00:00
Guillermo S. Romero
441f26a170 Clean up for the imminent migration from SVN to GIT. 2009-03-31 22:34:34 +00:00
Chris Want
77e0199dc3 Makefile updates for Blender 2.5 (from GSR) 2009-03-19 01:50:45 +00:00
Brecht Van Lommel
d52400bfbd 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r18677:19317
Notes:
* Sequence transform strip uses G.scene global, this is commented
  out now, should be fixed.
* Etch-a-ton code was most difficult to merge. The files already in
  2.5 got merged, but no new files were added. Calls to these files
  are commented out with "XXX etch-a-ton". editarmature.c and
  transform_snap.c were complex to merge. Martin, please check?
* Game engine compiles and links again here for scons/make/cmake
  (player still fails to link).
2009-03-17 21:44:58 +00:00
Ton Roosendaal
a1a91f9c8b 2.5
Makes Ghost compile for Make. Apparently the 'debug' directories are
still in use?
2009-03-12 09:15:49 +00:00
Brecht Van Lommel
4902b6e8e0 2.5: fix for compiling Carbon clipboard code, forgot to update this line. 2009-03-02 14:34:33 +00:00
Brecht Van Lommel
6cc89b9d4e 2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:

* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
  the text editor. It's Bitstream Vera Sans Mono. This is the
  default gnome terminal font, but it doesn't fit entirely well
  with the other font I think, can be changed easily of course.

* Clipboard copy/cut/paste now always uses the system clipboard,
  the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
  as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
  windowmanager code.

* Find panel is now a kind of second header, instead of a panel.
  This needs especially a way to start editing the text field
  immediately on open still.

* Operators are independent of the actual space when possible,
  was a bit of puzzling but got it solved nice with notifiers,
  and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.

* Operators:
    * New, Open, Reload, Save, Save As, Make Internal
    * Run Script, Refresh Pyconstraints
    * Copy, Cut, Paste
    * Convert Whitespace, Uncomment, Comment, Indent, Unindent
    * Line Break, Insert
    * Next Marker, Previous Marker, Clear All Markers, Mark All
    * Select Line, Select All
    * Jump, Move, Move Select, Delete, Toggle Overwrite
	* Scroll, Scroll Bar, Set Cursor, Line Number
    * Find and Replace, Find, Replace, Find Set Selected,
	  Replace Set Selected
    * To 3D Object
    * Resolve Conflict
2009-02-28 23:33:35 +00:00
Nathan Letwory
64dd45ef43 2.5 / Scons | Building on 64bit Windows
* add preliminary support for building Blender on 64bit Windows with _msvc_. The SConstruct should automatically detect if you are on a 64bit Windows and if you have that 64bit build is assumed. If you're not, 32bit build is assumed.
  NOTE: this is still very much wip, so your mileage may vary. Do please report on b25 taskforce ML in case of trouble.
  NOTE2: many of the libs are being linked in statically
  NOTE3: hopefully I didn't break anything for other build platforms (mingw, linux, osx).
  NOTE4: comes after NOTE3
2009-02-20 22:08:02 +00:00
Ton Roosendaal
915e989f9d 2.5
Added ghost display state hint 'modified file'.
Only supported in osx though (close button in bar gets dot).
2009-02-18 13:21:44 +00:00
Diego Borghetti
c63fcd2799 Fix revision: 18690, bug #17850
The problem was that Qt convert the text to the type
STRING or UTF8, that is why Blender can't get the text,
now should be work fine.
2009-01-30 21:01:18 +00:00
Campbell Barton
d95d110d8d [#17850] Copying text from Eric4 to Blender crashes Blender
The crash is caused by calling XGetWindowProperty when xevent.xselection.property is zero.
Not a proper fix because clipboard can paste the data without trouble.
2009-01-27 08:17:35 +00:00
Brecht Van Lommel
9bcdb4b758 2.5: various warning fixes. 2009-01-17 00:51:42 +00:00
Brecht Van Lommel
b08f15aa08 2.5: make and cmake fixes for recent changes. 2009-01-08 13:54:39 +00:00
Ton Roosendaal
ad4e1df46b 2.5
Bugfix in OSX ghost!
The GHOST_TWindowState was set to 'invisble' always... which is a
state now handled correctly in Blender. It caused the window to not 
refresh when resizing.
2009-01-02 10:58:30 +00:00
Ton Roosendaal
1ae7f038cd 2.5
Removed AUX buffer for OSX, was taking too much OGL memory, 
and since AUX was not used for other platforms, its benefits
faded away in the course of the time (it was just drawing
always).
2009-01-01 19:19:50 +00:00
Diego Borghetti
f4d5da91f4 Tweak here.. tweak there.. and hope that the damn focus bug is fixed now!!
Also check that this bug cause (with some window manager) that blender
work really bad, for example change from one area to another with a popup
menu open make the view hmhm "blink" (show and unshow the menu when you move
the mouse) and when you return the menu is open.. also other things that
now work fine.
2008-12-28 19:16:07 +00:00
Nathan Letwory
93d9e7749d 2.5 / SCons
I did a very drastic cleanup for the different libgroups, there's now only a few left. It compiled with scons/msvc, will be testing in a bit on linux, too.
If you get any problems, please reply to this commit message on the taskforce ML.
2008-12-23 16:07:24 +00:00
Brecht Van Lommel
bdfe7d89e2 Merge of trunk into blender 2.5:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r12987:17416

Issues:
* GHOST/X11 had conflicting changes. Some code was added in 2.5, which was
  later added in trunk also, but reverted partially, specifically revision
  16683. I have left out this reversion in the 2.5 branch since I think it is
  needed there.
  http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16683
* Scons had various conflicting changes, I decided to go with trunk version
  for everything except priorities and some library renaming.
* In creator.c, there were various fixes and fixes for fixes related to the -w
  -W and -p options. In 2.5 -w and -W is not coded yet, and -p is done
  differently. Since this is changed so much, and I don't think those fixes
  would be needed in 2.5, I've left them out.
* Also in creator.c: there was code for a python bugfix where the screen was not
  initialized when running with -P. The code that initializes the screen there
  I had to disable, that can't work in 2.5 anymore but left it commented as a
  reminder.

Further I had to disable some new function calls. using src/ and python/, as
was done already in this branch, disabled function calls:
* bpath.c: error reporting
* BME_conversions.c: editmesh conversion functions.
* SHD_dynamic: disabled almost completely, there is no python/.
* KX_PythonInit.cpp and Ketsji/ build files: Mathutils is not there, disabled.
* text.c: clipboard copy call.
* object.c: OB_SUPPORT_MATERIAL.
* DerivedMesh.c and subsurf_ccg, stipple_quarttone.

Still to be done:
* Go over files and functions that were moved to a different location but could
  still use changes that were done in trunk.
2008-11-12 21:16:53 +00:00
Brecht Van Lommel
4a4b0732e5 Various changes made in the process of working on the UI code:
* Added functions to generate Timer events. There was some unfinished code to
  create one timer per window, this replaces that with a way to let operators
  or other handlers add/remove their own timers as needed. This is currently
  delivered as an event with the timer handle, perhaps this should be a notifier
  instead? Also includes some fixes in ghost for timer events that were not
  delivered in time, due to passing negative timeout.
* Added a Message event, which is a generic event that can be added by any
  operator. This is used in the UI code to communicate the results of opened
  blocks. Again, this may be better as a notifier.
* These two events should not be blocked as they are intended for a specific
  operator or handler, so there were exceptions added for this, which is one
  of the reasons they might work better as notifiers, but currently these
  things can't listen to notifier yet.
* Added an option to events to indicate if the customdata should be freed or
  not.

* Added a free() callback for area regions, and added a free function for
  area regions in blenkernel since it was already there for screens and areas.
* Added ED_screen/area/region_exit functions to clean up things like operators
  and handlers when they are closed.
* Added screen level regions, these will draw over areas boundaries, with the
  last created region on top. These are useful for tooltips, menus, etc, and
  are not saved to file. It's using the same ARegion struct as areas to avoid
  code duplication, but perhaps that should be renamed then. Note that redraws
  currently go correct, because only full window redraws are used, for partial
  redraws without any frontbuffer drawing, the window manager needs to get
  support for compositing subwindows.

* Minor changes in the subwindow code to retrieve the matrix, and moved
  setlinestyle to glutil.c.
* Reversed argument order in WM_event_add/remove_keymap_handler to be consistent
  with modal_handler.

* Operators can now block events but not necessarily cancel/finish.
* Modal operators are now stored in a list in the window/area/region they were
  created in. This means for example that when a transform operator is invoked
  from a region but registers a handler at the window level (since mouse motion
  across areas should work), it will still get removed when the region is closed
  while the operator is running.
2008-11-11 15:18:21 +00:00
Benoit Bolsee
61a83d2fba Add MSVC90 project files - part 3. Extern and Intern projects are merged in projectfiles_vc9\blender\blender.sln solution, you just need to open that solution to compile everything with VS2008. 2008-11-10 21:22:22 +00:00
Benoit Bolsee
8eec6cecc0 Add MSVC90 project files - part 1. 2008-11-10 15:36:58 +00:00
Nathan Letwory
44efce4f66 * remove unreferenced var 2008-10-31 20:47:30 +00:00
Nathan Letwory
71206c9337 Patch from Timothy Baldridge
* add irix6 to GHOST windowing system (same as linux2 et al)
* fix faulty return lines in shrinkwrap.c
2008-10-21 23:07:09 +00:00
Brecht Van Lommel
ec7407f942 Fix for bug #17793: the glFinish() call in ghost that was disabled in a previous commit, because it was causing performance issues for the game engine, apparently still is needed to solved issues with FSAA. Now instead it will still call this for blender but not anymore for blenderplayer. 2008-10-11 16:03:17 +00:00
Diego Borghetti
4e731c5ab5 Revert full screen, maximized and minimized code (rev 16543).
Revert this because don't work "fine" with dual-monitor.

The problem is not the code, this work fine, but full screen
for a window manager is not both monitor (until set xinerama or
whatever..).
2008-09-22 19:09:46 +00:00
Diego Borghetti
aae506aea7 Small fix in GHOST X11 system.
* Fix and a little of cleanup to the full screen, minimzed and
  maximized code.

* Fix bad argument in the ClientMessage event to support the
  _NET_ACTIVE_WINDOW property.

* Fix focus problem in some WM (like TWM), this is because Blender
  don't set the WM_PROTOCOLS list, now it does, a very basic list
  but it's what we need now.
2008-09-15 18:23:34 +00:00
Benoit Bolsee
f305bb22b7 Patch 17508: Blender Web Plugin - XEmbed. Enable XEmbed integration of blenderplayer, using -i as input parameter to pass embedder window id. create a minimal web plugin to embed blenderplayer on web pages (using gecko/mozilla as browser). Only for *nix. 2008-09-09 21:15:30 +00:00
Brecht Van Lommel
810f799660 Revert a commit from 5 years ago that added a glFinish call before swapping on Windows. This is really bad for performance and especially showed in the game engine. The purpose was to disable FSAA and fix some UI issue on Geforce 2 graphics cards, hopefully the drivers have been fixed by now? I have no way to test this, so we'll see if an issue pops up on those older cards, and a lot of code changed since then anyway so it might not even be needed anymore. 2008-09-06 13:24:42 +00:00
Ian Thompson
6d0e840648 Bug fix for the bug fix. Wasn't closing the clipboard before returning. Thanks b333rt for catching this. 2008-07-22 15:31:22 +00:00
Ian Thompson
20af6c61e8 Bugfix: Pasting non-text data (or trying to retrieve non-text data from the clipboard) crashed blender on Windows. 2008-07-22 14:56:02 +00:00
Ian Thompson
f042a468fd Merged 15170:15635 from trunk (no conflicts or even merges) 2008-07-18 23:35:34 +00:00
Campbell Barton
fdb0b003f0 patch from skejoe for gcc 4.3 compatibility 2008-06-24 14:51:02 +00:00
Benoit Bolsee
31ec51df42 Apply BGE patch 12799: Fix quad buffer stereo mode for Windows 2008-05-25 14:32:26 +00:00
Jean-Luc Peurière
360e2f091e protecting by #ifdef0 debug prints for ndof 2008-05-11 13:33:27 +00:00
Jean-Luc Peurière
ac634f565a remove a debug print 2008-05-02 10:48:14 +00:00
Jean-Luc Peurière
273829de61 fix for #10080 copy/paste operations were
broken after first on os X
2008-05-02 10:38:50 +00:00
Campbell Barton
6672bb16cf use detectable autorepeat for X11,
this way, holding a key will only give multiple down events, father then down,up,down,up.... etc.
This is needed for apricot so they can play games in blenders :)
2008-04-22 14:32:45 +00:00
Chris Want
5d0a207ecb Patch from GSR that a) fixes a whole bunch of GPL/BL license
blocks that were previously missed; and b) greatly increase my
ohloh stats!
2008-04-16 22:40:48 +00:00
Campbell Barton
a7ee2674db added stdio.h includes, gcc-4.3 is picky 2008-03-22 10:53:35 +00:00
Jean-Luc Peurière
126ab7974d NDOF support added to trunk from ndof branch.
The latter is now obsolete and will be soon 
removed.

Some tiny build tweaks for darwin committed
in preparation of bigger changes for proper
SDK suport both on intel and ppc
2008-03-22 01:39:11 +00:00
Jean-Luc Peurière
32b5138e64 update to trunk r14199 2008-03-21 17:00:40 +00:00
Ricki Myers
8bf91e42e7 Fix for Crash on X11. Buffer was not the correct size. So strcpy would blow-up. 2008-03-20 12:27:15 +00:00
Campbell Barton
c8813776c4 Added null check to prevent crashing on paste.
Should look into why XGetWindowProperty isnt working also.
2008-03-18 16:12:43 +00:00
Jean-Luc Peurière
def3575575 forgot return value in C-api
spotted by JM Soler
2008-03-14 19:44:32 +00:00
Jean-Luc Peurière
a68a7f42b0 resolved conflict state with HEAD r14096
blenderbuttons still bad

not let this compile
2008-03-13 23:54:02 +00:00
Jean-Luc Peurière
526d0bec47 final (??) work on NDOF branch
it is now in a state where it can be safely
merged with trunk.

Note: basic icons were provided but I'm not
an icondesigner and working in a 16x15 grid
is way too small for me, so feel free to 
change them.
2008-03-13 15:40:24 +00:00
Campbell Barton
f0316e0ea2 oddly enough this printf was the only problem compiling blender with GCC 4.3 2008-03-12 21:38:51 +00:00
Ricki Myers
b5cdd1f2d6 Changed getClipbaord and putClipboard functions to be more ghost like
Changed getClipboard to GHOST_getClipboard and putClipboard to GHOST_putClipboard

Removed ghost calls from blender and added the calls to winlay.h and ghostwinlay.c
This cleand up casts in drawtext.c
2008-03-08 04:22:52 +00:00
Stephen Swaney
7a3c9bb5d1 Remove extraneous class qualifiers for gcc 4.2 / 4.3 on OSX.
Thanks go to jensverwiebe via IRC.
2008-03-07 01:19:36 +00:00
Ricki Myers
6122ee1b21 change error in typing
GlobalLock on line 914
2008-03-04 02:43:51 +00:00
Ricki Myers
ffcbff62dd Added Copy and Paste functions to GHOST.
- Moved WIN32 code to ghost and added code for other systems.
- Added functions getClipboard(flag), and putClipboard(buffer, flag)
    -Flag is used on X11 to request selection buffer or clipboard.
    -If any other system uses flag = 1 the function returns doing nothing.
- Changed ctrl +c/v and shift+ctrl + c/v to do the same thing (use the clipboard).
- Changed the menu items (copy, paste) to use the clipboard.
2008-03-04 00:41:30 +00:00
Kent Mein
fd7c729bd1 This is patch: [#8216] Make blender compile with gcc 4.3
minus one small include file that was commented out, I'm not
sure why it was commented out but I'm pretty sure its needed.
If there are still problems later we can sort it out, everything
else is pretty simple.

Kent
2008-02-04 21:52:03 +00:00
Nathan Letwory
8269b89c15 * fix linking order for l00nix 2008-01-08 17:32:38 +00:00
Nathan Letwory
15da2232f7 * tweak linking priorities - should help for GCC users
* some lib renaming
2008-01-08 09:47:44 +00:00
Chris Want
5e3cffc64a Patch to change license to GPL only, from GSR. 2008-01-07 19:13:47 +00:00
Nathan Letwory
1005d99ea5 * GHOST win32: make sure window gets repositioned to 0,0 when setting state to fullscreen (maximised, borderless) (Patch by Gladstone) 2008-01-05 13:56:40 +00:00
Diego Borghetti
c5488b943d Use XInternAtom by default.
I don't know the name of the "SGI Fast" atom, but this is only request
when blender start so i don't think that this make some "big" difference.

So just use plain X11 calls (thanks GSR for the info).
2008-01-04 23:17:08 +00:00
Diego Borghetti
350d754b16 Add support for GHOST_kWindowState* to Linux.
This add support for the different window state in Linux/X11.
Two think to take care:
	1) m_post_*
	2) motifFullScreen

1) This is only need if we want start a window in FullScreen or Maximized
state. The basic problem is that we can't set this property to a window
until it's really map, so i add a "post init" proccess for this two
special case (check the code for more info).

2) The Motif Hint isn't really a "FullScreen" mode, it's only a
"NO DECORATIONS" options, so if the window manager don't support WM-spec
this function only remove the border of the window, don't make it
FullScreen. A simple fix (hack) is check if the Window Manager support
WM-spec, in case that not, remove the decorations and move/resize the
window.

Test in different WM (gnome, kde, etc) and comment are welcome :)
2008-01-03 21:04:16 +00:00
Nathan Letwory
881fd0cb3a * make sure desktop is redrawn when coming out of GHOST_kWindowStateFullScreen 2008-01-01 14:04:09 +00:00
Nathan Letwory
a11c4cd041 * silence more warnings 2008-01-01 11:14:25 +00:00
Nathan Letwory
7052576344 * some cleanup of warnings 2008-01-01 10:45:48 +00:00
Nathan Letwory
af4678d421 * kill a warning 2008-01-01 09:28:29 +00:00
Diego Borghetti
2d3bbe480c I got confused screenToClient with clientToScreen.
Sorry, i get the wrong value because a print the
wrong variable :/
2007-12-31 14:28:10 +00:00
Diego Borghetti
59751edadd Fix bad argument order to XTranslateCoordinates.
Take me a long time catch this :/ and i really don't know how this
work before, because clientToScreen always return bad values.
2007-12-31 06:19:04 +00:00
Nathan Letwory
8814476714 * make sure decoration is there when toggling away from GHOST_kWindowStateFullScreen to GHOST_kWindowStateNormal (win32) 2007-12-30 23:58:59 +00:00
Nathan Letwory
0f1e7db0b7 * also distinguish between maximised and fullscreen on GHOST win32.
* clean up some warnings (unused vars).
2007-12-30 23:09:33 +00:00
Nathan Letwory
1fec64a402 * revert my change to windowmanager move/size handling.
* made win32 ghost getClientBounds so that it returns area compatible with osx getClientBounds
  - if a window is non-fullscreen, substract decoration, since that'll be added by GHOST_WindowWin32()
* use SetWindowLongPtr/GetWindowLongPtr (instead of SetWindowLong) as it is compatible with 64bit windows.
2007-12-30 22:52:00 +00:00
Nathan Letwory
93058ac3b3 * handle WM_MOVE on win32 in GHOST
* change window move/size handling so that getWindowBounds gets x,y for window and getClientBounds gets w,h
2007-12-30 17:13:36 +00:00
Ton Roosendaal
1039bc26fb Windowmanager, ghost side:
- Added GHOST_kEventWindowMove event, for sending event that the
  window has moved
- Fixed GHOST_GetClientBounds() for OSX (get window rect)

Todos:
- add same event for X11 and Windows
- solve why ghost doesn't call client event-proc while scaling window
  (at least, not in osx)
2007-12-30 13:30:31 +00:00
Ton Roosendaal
ec686f581c Bugfix 7733
New mouse scrollwheels allowing higher precision didn't work in Windows.
Code was assuming only value of +120 or -120 were returned.
2007-11-13 18:01:01 +00:00
Kent Mein
6e91048bff This covers bugs # 7130 7131 7132 7133
All small patches submitted by Vladimar Marek (neuron)

Basically fixes up some headers for Solaris's compiler.

Kent
2007-08-31 15:47:45 +00:00
Kent Mein
4e2143f639 This commit fixes up a bunch of svn properties to hopefully make things a little nicer for everyone.
Patch provied by gsrb3d

bug tracker #7061

Kent
2007-08-28 10:07:08 +00:00
Jean-Luc Peurière
7f6bb8d8cc sculpt mode ndof transforms.
please test, especially with multires conditions
2007-08-16 22:00:29 +00:00
Jean-Luc Peurière
42b629a69b add the option of not installing to scons build system
settting WITHOUT_BF_INSTALL='true' will disable
 the copying to INSTALL_DIR

you can use that in your user-config.py or commandline

slipping in minor cleaning for Os X builds
2007-08-14 20:55:59 +00:00
Jean-Luc Peurière
1609fd61bc windows ndof support
added by Ettore Pasquini
2007-08-02 20:45:55 +00:00
Jean-Luc Peurière
7965e64e98 linux plugin support for ndof
by Ettore Pasquini
2007-08-02 20:37:30 +00:00
Matt Ebb
df81fa977e Tweak to allow building NDOFManager with old Makefiles 2007-07-31 01:45:19 +00:00
Jean-Luc Peurière
bfa77f611f more work on the ndof system.
turntable code should work reasonabilly well now.
fly code need works but is no more insane on Os X.
transform object is not present here.

if you find the movements a bit slow, you can speed
it in the preferences up to 2x in the view & controls
panel.

button1 (left) of the device let you switch between
the 3 modes. button2 let you switch between 
unconstrained and dominant mode.

the plugin must be named 3DxNdofBlender.plug
and be placed in a folder named plugins in same
folder as executable

check no scaling is done in the plugin

please check it works ok on 3 platforms
2007-07-29 18:03:36 +00:00
Jean-Luc Peurière
603da178b9 commiting fixes from Ettore for building on linux & win 32 2007-07-15 14:30:09 +00:00
Jean-Luc Peurière
1104a39f11 forgot a needed include in the patch 2007-07-10 21:04:32 +00:00
Jean-Luc Peurière
198513c49f committing Ettore Pasquini 6DOF patch for linux
As previously the plugin itself is available
on his site : 
http://cubelogic.org/blender/3dcnxplug-lin.c
or on mine (soon) :
http://jlp.nerim.net/dev/6dof/

Please let me know if any problem, i cannot
test.

We have now patches for our 3 main platforms
features are still minimal, but will follow
soon.
2007-07-10 19:32:30 +00:00
Jean-Luc Peurière
a75f431cd3 committing Ettore Pasquini MS windows support
for NDOF devices

I applied the patch but cant test so please
let me know if any problem.

the plugin itself can be found either 
on Ettore site http://cubelogic/blender/
or on my site http://jlp.nerim.net/dev/6dof/

on my site there is also the source of 
mac plugin
2007-06-28 22:37:38 +00:00
Kent Mein
9749bd0379 This is for bug #6883 Add usefull error message to GL failure...
https://projects.blender.org/tracker/index.php?func=detail&aid=6883&group_id=9&atid=125

I just cut and paste the printf provided in the bug report.  Its usefull info
at this point.

Kent
2007-06-26 15:15:41 +00:00
Jean-Luc Peurière
edc6512ba6 first workable version on Os X
work only in non camera mode in 3D view

need the external plug-in to be compiled separately

line 894 of ghostwinlay.c must be replaced with
values adapted at your system

see mailing list for features planned and how
to use
2007-06-12 20:01:28 +00:00
Jean-Luc Peurière
6cc1269d97 merge from trunk up to rev [10858]
WIP in the NDOF part, dont work yet
2007-06-02 21:42:54 +00:00
Jean-Luc Peurière
6e716521f8 **blush**
I never committed the depth buffer changes from 16 to 32

thanks to meestaplu for spotting it
2007-05-30 21:34:21 +00:00
Jean-Luc Peurière
16340dfe12 adding the initial patch updated to 2.44 in ndof branch
notes : 
it compiles but is non functional
lacks the platform specific changes in ghost ( i cant test windows)
lacks the code for plug-in.

the platform specific code will be added when we sync with Ettore work
the plug-in itself cannot be added here
2007-05-29 04:34:09 +00:00
Campbell Barton
3030e93a5b Added 48x48 blender icon for X11 2007-05-28 16:10:40 +00:00
Campbell Barton
a6113b0059 Made X11 use _NET_WM_STATE_MAXIMIZED_HORZ and _NET_WM_STATE_MAXIMIZED_VERT when opening (if -p isnt given as an arg)
gsr and myself both wrote a patch for this, using gsr's.

import_obj - another error in splitting fixed.
2007-04-15 05:01:34 +00:00
Robert Holcomb
808a5fc05a Scons build system. MSVC 7.1 in a moment. 2007-03-24 18:41:54 +00:00
Stephen Swaney
03edb15afd cleanup compiler warnings for
missing virtual destructors
  out of order initializers
2007-03-20 04:19:30 +00:00
Andrea Weikert
d1b17f8c30 ==== MSVC 7.1 project files ====
- fix for 3DPlugin compile
- cleanup of bullet path
- removed PHY_ODE project from 3D plugin too, not used anymore

Now all configurations should build again, let me know of any problems!

Not been able to test if the 3DPlugin is actually working,is job for another day ;)
Also the 3DPlugin is compiled without OpenExr, this needs to be looked into once too.
2007-03-03 11:28:15 +00:00
Andrea Weikert
663cce10c7 ==== GHOST Win32 ====
- fixed WinTab locking positioning into absolute mode
- hopefully fixes [ #5586 ] Cursor control
Note: Setting the extent of the digitizing context causes Application to override
system settings for pen/mouse control. Removing this fixed the issue.
2007-01-07 18:43:27 +00:00
Erwin Coumans
0e094ffcab Attempt to fix mouse-look in game engine on OS X: setCursorPosition. Thanks Malachy for the fix, it seem to work on MacOS Intel. 2006-12-24 21:21:49 +00:00
Roland Hess
c28e28ec63 Little commit to roll back a previous one. Previous commit caused nVidia
on OSX to have slow selection and mouse response.

Code from the previous commit is still there, but the #define that
triggers it has been commented out.
2006-12-07 16:04:12 +00:00
Erwin Coumans
438d114f1a - GEadded VSYNC for Mac OS X swapbuffers (can be easily undone by commenting out the #define WAIT_FOR_VSYNC 1
- GEdon't crash when attempting to add constraint on game objects without physics controller
- GEimproved some physics -> graphics synchronization issues
- small experiment with game engine timing to smooth framerate/reduce tearing
2006-12-02 22:25:47 +00:00
Ton Roosendaal
627261da50 Patch by Vladimír Marek (neuron), part of bugfix #5298
Solaris CC compiler choked on wrong .h prototypes for functions using
'const' arguments.
2006-11-25 16:35:56 +00:00
Jacques Beuarain
24f4440d05 CMake lists initial submission. Documentationand further verification for different platforms will follow soon. This was just tested against current CVS on MSVC 2005 with Verse, QuickTime, OpenEXR, Player all on. 2006-11-17 02:27:12 +00:00
Andrea Weikert
32d49a8dae ==== scons ====
- cleanup for wintab library headers
- properly define BF_WINTAB and BF_WINTAB_INC
2006-11-13 06:40:08 +00:00
Andrea Weikert
22d97b2e34 - compile fix for msvc 6 which doesn't declare M_PI at all it seems. 2006-11-12 17:23:26 +00:00
Andrea Weikert
7abf00bbce compile fix for MSVC compiler.
- math.h doesn't include #define M_PI by default (_USE_MATH_DEFINES needs to be defined)
2006-11-12 16:21:16 +00:00
Matt Ebb
20cf5deb46 Some clearer comments on the meaning of the tabletdata struct's variables 2006-11-12 09:52:03 +00:00
Matt Ebb
6f474ccaca Added tablet tilt data collection for GHOST/Win32 - thanks elubie for doing the hard work getting it all set up first! The tilt values still aren't being used anywhere in Blender (yet? :) but at least now the data is there reliably and consistently across platforms. 2006-11-12 09:50:44 +00:00
Brecht Van Lommel
8857f4ce86 Patch #5195 by Anders Gudmundson.
On X11, make the table device name check case insensitive.
2006-11-11 22:47:41 +00:00
Jens Ole Wund
eeaf053853 msvc6 still compiles nicely 2006-11-07 10:00:33 +00:00
Nathan Letwory
f0cb272d26 change include path to wintab headers to be searched from SConstruct (and then relatively) 2006-11-07 06:44:44 +00:00
Kent Mein
ba63fdeb41 Fix for makefiles so it can find wintab headers in the libdir.
Kent
2006-11-06 16:58:28 +00:00
Andrea Weikert
6feb2cc4f6 Extended GHOST to support WinTab, in order to better support graphic tablets on Windows
Basic support for normal pressure sensitivity is implemented, adding other features like tilt etc. shouldn't be too difficult, now that basic support is there.
Tested with WACOM Volito on Windows XP using the pressure sensitivity with texture paint to change size of the brush .

Added additional include dir to scons, and MSVC 7 project files - other build systems might have to be updated.
2006-11-05 21:55:28 +00:00
Nathan Letwory
cdd4748692 * add freebsd3 to X list 2006-11-02 05:17:46 +00:00