This crash was discovered by Dalai and this happened because of
unset current context (as result of call wglMakeCurrent(NULL, NULL)).
In this case glGetString(GL_VENDOR) returns NULL. Rather than add check
for vendor != NULL before string comparison, I've changed a bit logic of
context creation:
- Create context and set it as current
- If it's crappy Intel card -- delete this context and
share the only one context between all Windows
- Otherwise, use initial logic (with sharing lists and so on)
This could also fix crash when opening userprefs from a menu with Intel card.
Intel video cards don't work fine with multiple contexts and
have to share the same context for all windows. This could work
incorrect with multiple video cards configuration, so suppose
there'll be no such situation (Intel cards are mostly in portable
devices like notebooks and laptops, where there's actually no
dual video cards). Anyway, it should work much better now.
Non-Intel cards behavior was kept unchanged.
Thanks to Ton for debug session :)
reported by Georg K
with patch [#26469] Windows mouse fix
by Alexander Kuznetsov
The amount of mouse grabs wasn't properly balanced with ungrabs, thus preventing from using proper mouse input outside client area.
Submitted by Alexander Kuznetsov
Fixes [#25279] Shift-Numpad Combinations fail to align view to selected
and addresses [#26328] Blender uses global keyboard message hook which hurts system responsiveness on Windows
A whole new way of handling keyboard input improves greatly both code readability and event handling. Thanks for the great patch, Alexander!
* Adding play method to the device classes to play back a reader (not used yet, preparation for a later feature).
* Using a linear resampler in case SRC is disabled.
available on many keyboards these days, so that they can be used for
animation playback (giving more options over alt-a and alt-a ad-
infinitum).
Currently, this is Windows only as I don't have a Linux/Mac system to
test on (it should compile with both mingw and msvc, at least using
scons). Maintainers for those systems can probably easily add this in
once they find out the relevant mappings for those systems.
Some reorg of modules/pages, start makesdna and makesrna.
In many places license block needs to be changed to not start with /**, because otherwise documentation will go weird.
intended as a standalone library for use in other applications that
want the same tangent space as Blender.
This also keeps blenkernel clean(er) from extra math functions.
- modifier code was using sizeof() without knowing the sizeof the array when clearing the modifier type array.
- use BLI_snprintf rather then sprintf where the size of the string is known.
- particle drawing code kept a reference to stack float values (not a problem at the moment but would crash if accessed later).
reported by Micael Dias (and many others, see duplicates list)
On closing the first ("main") Blender window the very first OpenGL context
got deleted too. This context needs to be retained, since we share quite a
bit of OpenGL data through it to the newly created contexts (new windows).
Thanks to Ton Roosendaal for thinking out loud while trying to figure out
what the actual cause was.
* [#25638] 'Insufficient thread locking' for sounds
- Actually a workaround for an msvc bug, msvc STL containers are buggy
* [#25922] Sound does not play in BlenderPlayer(r34579)
- Windows OpenAL doesn't seem to have clear context error state on initialising
The console was getting flooded with output like
g
i
i
...
all as a result of what looks like a debugging print. Whoever put this
in, you can get back your debugging prints by enabling BF_GHOST_DEBUG
in your local config :)
Submitted by Alexander Kuznetsov.
This adds the progress bar to the taskbar item of Blender for Windows 7.
Small change in version retrieval, otherwise as is.
Some window manager can set default value of this to be the
screen size, so running blender with -p or --window-geometry
don't work with value bigger than that.
This commit try to "avoid" the bug #25709, but at the end
depend on the window manager, so maybe work or maybe not.
- enabling/disabling no longer prints in the terminal unless in debug mode.
- remove 'header' struct from BLI_storage_types.h, from revision 2 and is not used.
- Add GCC property to guardedalloc to warn if the return value from allocation functions isn't used.
Slightly modified to better fit in architecture (moved to related GHOST SystemPaths)
Thanks to Harley Acheson for the research and for providing the original patch.
Note: I added empty function for X11(Linux) and Mac (Carbon and Cocoa) to be implemented still.
Reported by Nils Austa
There was double handling of modifier keys. With my autumn work on the modifier keys I had moved state checks for
modifier keys into convertKey(), but left the call to handleModifierKeys. That caused problems with proper
modifier key handling in the entire key handling code of GHOST.
Problem is is with operator redo which click-extrude exposed.
Check if redo operator can run, otherwise lock the UI and add a label that the operator doesn't support redo.
This is clunky but IMHO better then failing silently and leaving the user confused.
- Merged redo functions into ED_undo_operator_repeat(), code was duplicated in a few places.
- added WM_operator_repeat_check to check if WM_operator_repeat() can run, avoids an undo call when redo work.
Unrelated changes
- GHOST_SystemWin32.cpp set to utf8 encoding.
- cmake_consistency_check.py now checks source files are utf8.
- missing break in operator context switch meant RGN_TYPE_CHANNELS was always being overwritten with RGN_TYPE_PREVIEW when calling operators (from r26692)
reported by Eclectiel L
When working with very heavy scenes Blender can seem to 'hang' (not responding). Key events that happen
during this period may get lost, especially for modifier keys.
Adding extra handling to account for these situations.
This fixes a rather subtle seeking issue with ffmpeg and Sony
XDCAM-footage.
Problem is: MPEG2 streams within an MP4 container can contain a start
time - at several places. There is a starttime within the video
and audio streams and one within the container.
FFMpeg commandline tool only uses the container starttime and we used
the stream starttime.
The world would be a better place, if those two timestamps always match
up, since in XDCAM-footage those two starttimes differ in 4
frames - and the container has the right one.
We now always use the container start time as ffmpeg commandline tool
does (in the hope, that there is a good explaination for this and this
is the right thing(tm) to do).
I tested this also with HDV footage, which seems to work with the new
code, too.
Additional fix: disabled seek_by_bytes again, since it will only work
correctly, if ffmpeg guessed the HDV bitrate right (which it doesn't).
If you have seeking issues with HDV and have an older version of ffmpeg
installed, please upgrade, newer versions have some fixes in them.
globbing vs explicit is discussed here.
http://www.cmake.org/pipermail/cmake/2008-December/025694.html
Practical implications are:
- developers need to keep CMakeLists.txt files up to date.
- Users wont get strange linking errors if they build after a file is added, since CMake detects CMakeLists.txt is modified and automatically reconfigure.
Reported by Lluc Romaní Brasó
Some of my earlier changes to the modifier handling code accidently sent out new events for modifier keys when they where held down (repeat).
Also lay foundation for shift+numpad handling.
double click didnt check mouse distance moved so you could click twice in different areas of the screen very fast and generate a double click event which had old mouse coords copied into it but was sent to an operator set to run on single click (because the double click wasnt handled).
Also added MEM_name_ptr function (included in debug mode only), prints the name of allocated memory.
used for debugging where events came from.
In 2.49, you could adjust the maximum length of Auto-IK Chains by using scrollwheel up/down or page up/down while moving Auto-IK bones. Now this is possible again with those hotkeys, but you need to hold SHIFT to get this to work, otherwise we get a conflict with the hotkeys for proportional edit nowadays.
Was broken when transform tools switched from using hardcoded key mappings to using a modal keymap.
It was impossible for keyboard layouts that use AltGr to create certain characters to insert
them in Text and Console.
The keyboard driver in Windows sends left control events when AltGr is pressed. This meant that
Blender thought control was being held, which is a PASS_THROUGH condition for the insert operator
in both editors.
Add testing of keyboard layout for AltGr, both on initialization and WM_INPUTLANGCHANGE.
To remedy AltGr problem, we send now a left control key up event to Blender before further processing
the AltGr key.
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]
- 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).
- option only available to cmake, scons and make have this enabled always.
- without this clang/llvm can compile blender
- this was the second biggest internal lib, 192mb -> 172mb for all blenders libs (with debug flags), so gives some speedup to linking.
Reported by Guy Smith.
MSVC-compiled code would fall over iterator decrease on empty list. Shortest snippet to redo: http://www.pasteall.org/15408/cpp
See also http://www.pasteall.org/15409/cpp for list.end() behaviour on MSVC. Thanks to Jörg Müller for assistance.