Commit Graph

833 Commits

Author SHA1 Message Date
Campbell Barton
0c857a4f14 - made ungrab a second function - WM_cursor_ungrab
- ungrab can restore the position of the mouse clamped to the window bounds (much nicer for transform)
2009-10-07 21:19:35 +00:00
Campbell Barton
77476b294f Experimental option to allow moving the mouse outside the view, "Continuous Grab" in the user-prefs.
- Useful for dragging buttons to the far right when theyd otherwise hit the screen edge.
- Useful for transform though probably NOT what you want when using the transform manipulator (should make an option).
- When enabled, number buttons use this as well as a different conversion of mouse movement
  float numbuts: mouse 1px == 1-clickstep
  int numbuts: 2px == 1 (tried 1:1 but its too jitter prone)

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

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

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

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

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


Implementation:
* Rather than assuming the render result does not get freed
  during render, which seems to be quite difficult to do given
  that e.g. the compositor is allowed to change the size of
  the buffer or output different passes, the render result is
  now protected with a read/write mutex.
* The read/write mutex allows multiple readers (and pixel
  writers) at the same time, but only allows one writer to
  manipulate the data structure.
* Added BKE_image_acquire_ibuf/BKE_image_release_ibuf to access
  images being rendered, cases where this is not needed (most
  code) can still use BKE_image_get_ibuf.
* The job manager now allows only one rendering job at the same
  time, rather than the G.rendering check which was not reliable.
2009-09-30 18:18:32 +00:00
Guillermo S. Romero
727745bd49 SVN maintenance. 2009-09-30 17:13:57 +00:00
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
Campbell Barton
92ee7ca946 remove warnings, print errors if bpy_ops.py or bpy_sys.py fail to import 2009-09-28 05:02:09 +00:00
Benoit Bolsee
0cbc87b428 Speed optimization in itasc when with armature with many bones and few targets. Thanks to Brecht who pointed out a simple but efficient optimization in SVD decomposition. 2009-09-27 16:20:42 +00:00
Joerg Mueller
69995bb1b3 Sound:
* Threading buxfix letting MSVC Debug builds crash because of corrupted std::lists
* Adopted two property ranges
* Changed the mixdown volume to set the device volume instead of the volume of every sound.

I also removed the private redefinition of m_logicmgr in SCA_BasicEventManager, which was already defined protected in the parent class SCA_EventManager and thus caused a bug letting GE crash here because of an uninitialized pointer.
2009-09-26 20:03:01 +00:00
Guillermo S. Romero
da5ff2ca98 Add directives to support multi dir lib. 2009-09-25 22:38:15 +00:00
Kent Mein
72c4c9da7a Fixing up Makefiles, its not fully working but its closer...
Kent
2009-09-25 18:47:43 +00:00
Brecht Van Lommel
5eecb2ab48 Warning fixes for ITASC. Also, use <stdlib.h> instead of <malloc.h>,
it works everywhere.
2009-09-25 09:33:46 +00:00
Benoit Bolsee
7c9bb3c40a Fix OSX compilation problem with malloc.h in itasc 2009-09-25 07:44:29 +00:00
Campbell Barton
0aa08fce72 still doesn't work but this fixes make clean 2009-09-25 04:25:40 +00:00
Guillermo S. Romero
5eb2b4b40d SVN maintenance. 2009-09-25 01:13:07 +00:00
Nathan Letwory
ee6cf88d4d * some fixes to have scons/mingw compile the sources too, even with BF_DEBUG=1 and WITH_BF_GAMEENGINE=1 2009-09-24 22:11:35 +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
Kent Mein
22d027dcb2 fixed some indentation, and removed
declaration of index in a couple of places because it was
already defined and safe to use the old def.

Kent
2009-09-24 16:18:17 +00:00
Guillermo S. Romero
986f8a9ea3 SVN maintenance. 2009-09-22 19:09:04 +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
Joerg Mueller
1185be4355 Sound:
* Moved AudioData back to Scene
* Updated RNA stuff
* Added mixdown volume
2009-09-20 14:00:00 +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
Daniel Genrich
9f5e42ff76 Smoke:
* Totally new try to get cache running
* Didn't try "bake" and such things yet

Hint
* Very verbose yet
* Please do only test new blend files, not old ones!

Please give me feedback on my blog about the old crashers.
2009-09-14 00:01:08 +00:00
Nathan Letwory
d1314c3db5 * we currently can have *four* different sound devices, instead of 3. 2009-09-10 23:46:42 +00:00
Daniel Genrich
8e2d861695 Smoke:
* Enable cache for high res + new preview
* Bugfix for smoke banding (in cooperation with N_T)

Hint: Work-in-progress regarding collision objects so can be broken, didn't test

Hint2: jahka enabled a general particle panel but 
* bake button doesn't work
* step is not supported for cloth
* several other things there ;)
2009-09-09 18:39:40 +00:00
Nathan Letwory
3d64d65ad9 * clean out some warnings (unrefenced vars mainly) 2009-09-06 14:32:02 +00:00
Nathan Letwory
fb649d5824 * cleaning up warnings (mostly windows). A collection of other warning fixes too (undefined function, assuming int, etc.)
This compiled fine with scons/msvc and scons/mingw (gcc 4.4.0). Please test and report any problems.
2009-09-06 13:20:05 +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
Nathan Letwory
20f39ec7d8 == SCons ==
* further cleaning of 'player' stuff. Now only 3 libs are remaining, of which ideally the stubs lib will be fixed at some point, fading away into the dark history of not-so-nice code. The current blenderplayer part is still a little bit hackish, I'll see if I can find a better alternative, for now it works good enough.
2009-09-04 12:56:30 +00:00
Nathan Letwory
bade641408 == SCons ==
* first working changes to get blenderplayer linking
* blenderplayer/ moved into source/ (CMakeLists.txt changed for that too)
* added externs for bprogname to gp_ghost, so that it links properly
2009-09-04 10:40:41 +00:00
Benoit Bolsee
af85ee01f8 Update MSVC project files. 2009-08-28 13:42:58 +00:00
Joerg Mueller
adcb21b1f4 Close the old audio device before and not after opening the new. 2009-08-26 10:02:17 +00:00
Joshua Leung
4893cdc338 2.5 - Warning cleanups (for mingw+scons)
Also, made the Outliner's horizontal scrollbar work better for keymaps view. It's still using an approximation of the width, but at least you can scroll now.
2009-08-26 00:38:43 +00:00
Diego Borghetti
cfcd355c27 Update Makefile and missing include on voxeldata.c
Note that With libsndfile also need libflac and libogg here (Linux), right
now I just add this two librarys to the NAN_SNDFILELIBS, but maybe
it's better split this ? (NAN_FLAC/NAN_OGG)
2009-08-25 21:25:41 +00:00
Andrea Weikert
7288bacad9 blender 2.5 MSVC projectfiles
* update for volume rendering
* update for audaspace jack
* update for rna: animation_api.c, scene_api.c
2009-08-25 17:05:04 +00:00
Joerg Mueller
4ba6dbce76 Replaced G.sce by Main.name in sound.c.
I hoped for it to resolve the bug of loading sounds with relative paths didn't work, but Main.name isn't set before the sounds are loaded, so the bug resists!
Someone who is into file loading should please fix this!
2009-08-25 15:30:04 +00:00
Nathan Letwory
4c8d32b4bf == SCons ==
* Add sndfile support (False by default).
  Note: for this to work, make sure that FFMPEG-support is disabled.
2009-08-25 10:56:01 +00:00
Joerg Mueller
98e9ddbf5b Bugfixing. 2009-08-22 16:54:18 +00:00