Commit Graph

2969 Commits

Author SHA1 Message Date
Nicholas Bishop
3447f2ade1 Add missing virtual destructor for VirtualMemoryAllocator
Fixes a warning from GCC 4.7.2.
2013-01-20 15:36:32 +00:00
Campbell Barton
f414d2980a code cleanup: remove some paranoid checks which would have crashed anyway earlier on.
Also some minor formatting.
2013-01-20 14:50:50 +00:00
Jason Wilkins
160dd1dc3b More win32 multimon (r53923). Changed getNumDisplays so that it will actually succeed. 2013-01-20 14:40:31 +00:00
Jason Wilkins
5a8d04bbb6 Add multimon support to GHOST_DisplayManagerWin32.cpp (It seemed to work before, but recent changes to GHOST_ASSERT caused it to abort if WITH_ASSERT_ABORT was configured). 2013-01-20 13:46:53 +00:00
Thomas Dinges
1a131171cb Cycles Test App:
* Fix compile for camera xml properties.
2013-01-17 22:51:54 +00:00
Thomas Dinges
61ce87e741 Cycles:
* Fix for [#33909]. If "Progressive" checkbox was disabled but device was GPU, it still used the amount of "aa_samples" instead of "samples"
2013-01-17 19:52:59 +00:00
Campbell Barton
60e5583933 add NULL check for XInput device, since its possible only one is valid. 2013-01-17 02:06:54 +00:00
Campbell Barton
9e7b954ed0 fix for GHOST/X11 using uninitialized memory for the tablets active state. (possible cause of reported glitches in tablet use). 2013-01-16 22:00:03 +00:00
Campbell Barton
6e7ee2649d style cleanup 2013-01-16 18:16:05 +00:00
Campbell Barton
cda2b7db0f fix for glitch in X11 with tablets.
Notices this while using continuous-grab, since this is disabled when the tablet is being used.
Quite often I would use the tablet then drag a button with the mouse but blender would still have the tablet enabled.
This error would cause other parts of blender to behave incorrectly too since wmEvents would have wmTabletData set, operators check for this in some cases.


The problem was blender didn't reliably get ProximityOut events, eg:
  moving the cursor outside the window with the tablet, then back over the window with the mouse -
  meant blender didn't get a 'ProximityOut' event and would keep the active stylus value set.

For now, when the processing events and the active stylus is set, run a check that the tablet is still in proximity.
2013-01-16 18:05:17 +00:00
Sergey Sharybin
b01233b07f Movies support for Cycles
This adds support of movie textures for Cycles rendering.

Uses the same builtin images routines as packed/generated images,
but with some extra non-rna hookups from blender_session side.

Basically, it's not so clear how to give access to video frames
via C++ RNA -- it'll require exposing ImBuf to API, doing some
threading locks and so. Ended up adding two more functions which
are actually bad level call, but don't consider it's so much bad
-- we have few bad calls already, which are actually related.

Changed a bit how builtin images names are passing to image
manager. Now it's not just an ID datablock name, but also a frame
number concatenated via '@' character, which makes itpossible to
easily know frame number to be used for movie images, without
adding extra descriptors to image manager.

Decoding of builtin name is a bit slower now, but it should be
still nothing in comparison with rendering complexity.

Also exposed image user's frame_current to python API, which
is needed to get absolute frame number of movie from node's
image user.

P.S. Generated/packed images are also using bad level call but
only does it to make things more clear here.  Either all images
are using C++ RNA here or no images does. That's the most clear
for now.
2013-01-16 17:07:25 +00:00
Thomas Dinges
c997f69bf9 UI / Scene Context:
* Made Color Management and Audio panel closed by default to save space. 
* Added COMPAT_ENGINES to color management panel.
2013-01-16 13:59:19 +00:00
Ton Roosendaal
b5cffb48ea Mac OS X, Intuos tablet fix
Touch input events map nicely to trackpad input now.
However, I noticed the event values are a factor 10 scaled larger compared
to other touch delta's. Makes using touch input on the tablet not so nice.

I found a hack to detect Wacom events, but if it works for more devices?

Anyway - for me the Wacom works perfectly smooth for view manipulations now.
2013-01-16 13:45:11 +00:00
Sergey Sharybin
2095b2cddb Fix #33877: Pressure Sensitivity stop after opening User Preferences Window
Issue was caused by opening the same device id twice and closing one of
descriptors on closing window. This used to close device used by other
windows.

Now moved all device-specific code to SystemX11, so opening and closing
happens only once.
2013-01-16 12:28:25 +00:00
Campbell Barton
f2cfe4b2e9 minor changes to ghost
- use WITH_ASSERT_ABORT define, so GHOST_ASSERT will abort.
- rename XTablet -> GHOST_TabletX11, was confusing since it was named like an xlib struct.
2013-01-16 01:10:06 +00:00
Campbell Barton
769ab3eed8 code cleanup:
- cycles ui used 'cscene' for scene.cycles and scene.cycles_curves
- style cleanup
2013-01-15 23:17:45 +00:00
Brecht Van Lommel
486abf01c6 Fix CUDA compile after last commit. 2013-01-15 20:13:19 +00:00
Stuart Broadfoot
3373b8154b Cycles Hair: Introduction of Cardinal Spline Curve Segments and minor fixes.
The curve segment primitive has been added. This includes an intersection function and changes to the BVH.

A few small errors in the line segment intersection routine are also fixed.
2013-01-15 19:44:41 +00:00
Brecht Van Lommel
0967b39be1 Fix #33838: light render passes for non-progressive integrator were not correct. 2013-01-15 19:17:51 +00:00
Thomas Dinges
f146317b09 Cycles:
* CUDA: Make it more clear that sm_12 and below is not supported.
* OpenCL: __KERNEL_SHADING__ was declared twice for nvidia opencl device.
* Some reshuffle of defines in kernel_types.h. No functional changes.
2013-01-15 19:02:17 +00:00
Brecht Van Lommel
6adfd91657 Fix #33830: cycles normal mapping was not quite correct, was not correctly
respecting the assumption that normal and tangent are interpolated without
normalization.
2013-01-15 16:35:05 +00:00
Campbell Barton
dfdf07c21a fix [#33831] "Alt" key is "Alt Window Deactivated"
Patch from Patrick Zulke (pazul)
2013-01-14 20:04:36 +00:00
Antony Riakiotakis
f2891d3731 For non-windows systems, check for CUDA compiler during runtime 2013-01-14 19:33:16 +00:00
Brecht Van Lommel
8869c135e3 Cycles: enable lamp multiple importance sampling on the GPU, seems to be
working ok with sm_20 and sm_21.
2013-01-14 17:52:11 +00:00
Sergey Sharybin
e5179bfefc Remove usage WITH_CYCLES_CUDA_BINARIES in code, use check for
precompiled cubins instead,

Logic here is following now:
- If there're precompiled cubins, assume CUDA compute is available,
  otherwise
- If cuda toolkit found, assume CUDA compute is available
- In all other cases CUDA compute is not available

For windows there're still check for only precompiled binaries,
no runtime compilation is allowed.

Ended up with such decision after discussion with Brecht. The thing
is, if we'll support runtime compilation on windows we'll end up
having lots of reports about different aspects of something doesn't
work (you need particular toolkit version, msvc installed, environment
variables set properly and so) and giving feedback on such reports
will waste time.
2013-01-14 17:30:33 +00:00
Sergey Sharybin
36f44c6e02 Change some big functions from __device_inline to __device, which
makes CPU kernel compilation much faster when using MSVC.

Sideeffect of this change is that CPU rendering is few percent
faster now. CUDA rendering is the same speed.
2013-01-14 17:30:20 +00:00
Brecht Van Lommel
6cdbd1b1aa Fix #33868: cycles sample as lamp for world background not rendering with the
correct intensity on the GPU.
2013-01-14 16:24:47 +00:00
Sergey Sharybin
f102953634 Further tweaks to support libav from wheezy 2013-01-13 17:54:09 +00:00
Sergey Sharybin
21e5451c3b Tweak to ffmpeg compatibility layer to support debian's wheezy libav 2013-01-13 17:10:10 +00:00
Ton Roosendaal
fa759d8ffd Mac HiDPI ("retina") handling:
OK - so you have this nice crisp screen, and still you want to add extra 
monitors to the laptop! That means Blender should switch back and forth to HiDPI 
modes, when you move a window to another monitor.

This code makes the pixelsize scale factor a window property, and handles
an event when a window moves to another monitor. It then changes the
native pixelsize nicely and refreshes entire UI.

You can also have one Blender window on high, and other on low resolution.

Stretching a Blender window from 1 monitor to the other works too, but that
is Apple magic handling it.
2013-01-12 17:07:49 +00:00
Sergey Sharybin
aab01c86cf Patch #33837: ffmpeg1.1 and libav9.1 compatibility update
Patch makes it possible to compile blender with recent ffmpeg
and libav libraries, mainly by getting rid of deprecated API.

Original patch by Campbell Barton with own modifications to
support compilation with older ffmpeg versions.

This patch could break compatibility of FFV1 videos playing
back in older players, mainly because of alpha support changes.
Preserving compatibility with such players became a headache
and think it's high time to get rid of workarounds here.
2013-01-12 12:51:10 +00:00
Sergey Sharybin
7a90af7b5a Packed and generated images support for Cycles
This commit adds support of packed and generated images
for Cycles when using SVM backend. Movies are still not
supported. This changes also doesn't touch OSL which is
much less trivial to adopt for any images which are not
saved to disk.

Implementation details:

- When adding images to Image Manager is now possible
  to mark image as builtin. Builtin images will bypass
  OIIO loader and will use special loading callbacks.

- Callbacks are set by Blender Session and they're
  using C++ RNA interface to obtain needed data (pixels,
  dimensions, is_float flag).

- Image Manager assumes file path is used as reference
  to a builtin images, but in fact currently image
  datablock name is used for reference. This makes it
  easy to find an image in BlendData database.

- Added some extra properties to Image RNA:
  * channels, which denotes actual number of channels
    in ImBuf. This is needed to treat image's pixels
    correct (before it wasn't possible because API
    used internal number of channels for pixels which
    is in fact doesn't correlate with image depth)
  * is_float, which is truth if image is stored in
    float buffer of ImBuf.

- Implemented string lookup for C++ RNA collections
  for cases there's no manual lookup function.

OSL is not supported because it used own image loading
and filtering routines and there's seems to be no API
to feed pre-loaded pixels directly to the library.

Think we'll either need to add some API to support
such kind of feeding or consider OSL does not have
support of packed images at all.

Movies are not supported at this moment because of lack
of RNA API to load specified frame. It's not difficult
to solve, just need to consider what to best here:
* Either write some general python interface for ImBuf
  and use it via C++ API, or
* Write a PY API function which will return pixels for
  given frame, or
* Use bad-level BKE_* call

Anyway, small steps, further improvements later.

Reviewed by Brecht, thanks!
2013-01-12 10:59:13 +00:00
Campbell Barton
4d7583b66f code cleanup: warnings, also add check in crash handler that a wmWindowManager is present. 2013-01-11 03:21:24 +00:00
Brecht Van Lommel
0deb074f1c Fix #33824: cycles non-progressive render mode did not do correct path termination,
leading to too much noise when the min bounce setting was lower than max bounce.
2013-01-10 19:28:16 +00:00
Brecht Van Lommel
057f0a63d4 Fix #33821: cycles background intensity fix had uninitialized memory usage
for area lights.
2013-01-10 17:37:26 +00:00
Brecht Van Lommel
04754cc112 Fix too bright result in background multiple importance after recent changes. 2013-01-10 12:35:09 +00:00
Brecht Van Lommel
8cf374d401 Cycles: different fix for perlin noise generating nan values, now check for
the result to be finite afterwards which is a bit faster and works for OSL
too without needing to slow down OSL itself.
2013-01-09 22:06:03 +00:00
Brecht Van Lommel
ad10cbf04a Cycles: multiple importance sampling for lamps, which helps reduce noise for
big lamps and sharp glossy reflections. This was already supported for mesh
lights and the background, so lamps should do it too.

This is not for free and it's a bit slower than I hoped even though there is
no extra BVH ray intersection. I'll try to optimize it more later.

* Area lights look a bit different now, they had the wrong shape before.
* Also fixes a sampling issue in the non-progressive integrator.
* Only enabled for the CPU, will test on the GPU later.
* An option to disable this will be added for situations where it does not help.

Same time comparison before/after:
http://www.pasteall.org/pic/show.php?id=43313
http://www.pasteall.org/pic/show.php?id=43314
2013-01-09 21:09:20 +00:00
Ton Roosendaal
96b44c622c Mac HiDPI support:
With the good help from googling, here's code that compiles for
10.6 natively. Will check on 10.7 and 10.8 right after commit.
2013-01-09 11:25:16 +00:00
Sergey Sharybin
f5317b5f0c Style cleanup in OCIO area
Also fixed typo in function name.
2013-01-08 20:55:07 +00:00
Ton Roosendaal
74d85d2882 Macbook HiDPI support: reshuffled code to make it compile for 10.6 and work
in 10.7 and later. OS X Gurus might check though :)
2013-01-08 17:27:11 +00:00
Sergey Sharybin
fd35b0aa66 Fix for recent tile_order feature not working properly with persistent data 2013-01-08 16:56:04 +00:00
Campbell Barton
08358a60b0 style cleanup 2013-01-08 01:48:14 +00:00
Thomas Dinges
41c588256b Cycles / Tile Rendering:
* Added new option to chose the tile order.
In addition to the "Center" method, 4 new methods are available now, like Top -> Bottom and Right -> Left. 

Thanks to Sergey for code review and some tweaks!
2013-01-07 19:55:49 +00:00
Mike Erwin
eca21a2532 fix for bugs 30300, 31107: pen pressure with multiple open windows on MS Windows 2013-01-07 01:23:09 +00:00
Ton Roosendaal
0fd4a102e0 With some help in irc (thanks erwin, markus!) and some googling, here's code
that compiles for OSX 10.6 for new momentumPhase usage.

Jens Verwiebe can give final blessings, I'm just copypasting stuff and test it :)
2013-01-06 12:49:32 +00:00
Jason Wilkins
0ea3c285ea device_network.cpp is completely elided when WITH_NETWORK is not defined, so do not include it in the build in that case 2013-01-06 07:10:22 +00:00
Ton Roosendaal
c6a0818642 Removal of old code trying to detect trackpads.
This was causing error in previous commit "wheel only worked after using trackpad once".
2013-01-05 18:23:05 +00:00
Ton Roosendaal
8dfe7620fb New version of code to detect whether a wheel is involved, or a trackpad.
It was compiled with "deploy target 10.6" tested on macbook with 10.8.
More tests follow quick.
2013-01-05 17:13:07 +00:00
Stuart Broadfoot
ec33cacc62 Added vertex color attributes (currently limited to one) and UVs included for triangle mesh hair.
I have also included a small speedup for the intersection test.
2013-01-04 12:44:38 +00:00