62812 Commits

Author SHA1 Message Date
Ulysse Martin
c4c2bd1350 BGE: Allow access to light shadow settings with python
This patch adds a new API which allow us to access light shadow settings from python. The new API can be used to write custom GLSL materials with shadows.

Reviewers: brecht, kupoman, agoose77, panzergame, campbellbarton, moguri, hg1

Reviewed By: agoose77, panzergame, campbellbarton, moguri, hg1

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1690
2016-01-17 18:47:14 +01:00
Bastien Montagne
a5c419f4cc paint_cursor: OMP -> BLI_task. 2016-01-17 17:17:28 +01:00
Martijn Berger
5a20df6336 Bump boost to 1.60 2016-01-17 12:44:25 +01:00
Campbell Barton
36e65a7b73 CMake: clarify missing Python package message
Blender builds properly without extra Python packages,
avoid FUD for new devs.
2016-01-17 16:08:36 +11:00
Campbell Barton
63c848da26 Cleanup: spelling
Also use doxy formatting for warning/note.
2016-01-17 13:45:32 +11:00
Campbell Barton
e10a6f987b Cleanup: style 2016-01-17 13:40:22 +11:00
Campbell Barton
dad1cdad13 Revert "Make 'incompatible pointer type' gcc warning an error by default."
This reverts commit b5bd39b5182590fd4d5ddb24d7b7bdbe714d57bf.

This is problematic because it means minor differences in system headers can cause errors
(glew in this case errored for me both with system and Blender's bundled version).

Developers can enable -Werror=* locally for warnings that aren't reliable across different systems.
2016-01-17 13:25:47 +11:00
Campbell Barton
9145c6976c Revert "Fix compile error in gpu_debug (incompatible-pointer-type)."
This reverts commit 75cfc81ec39ac9953f25eb0ae5f9e70d3c24ee7e.
2016-01-17 13:25:47 +11:00
Kévin Dietrich
8194f223d8 Point Cache bake: make sure endframe is initialize with a decent value.
This is how the old code used to initialize it. Current value was
failing big time when baking all caches (always set to MAXFRAME), and it
was added right before commit to quiet a warning... (I know, I know...)
2016-01-17 03:13:15 +01:00
Kévin Dietrich
91096aefc5 Dynamic Paint: use job system for the image sequence bake operator.
Reviewers: brecht

Differential Revision: https://developer.blender.org/D1732
2016-01-17 02:04:46 +01:00
Kévin Dietrich
45b6893e70 Point Cache: use job system for bake operators.
Reviewers: brecht

Differential Revision: https://developer.blender.org/D1731
2016-01-17 02:01:41 +01:00
Kévin Dietrich
75cfc81ec3 Fix compile error in gpu_debug (incompatible-pointer-type). 2016-01-17 01:58:06 +01:00
Brecht Van Lommel
2beb0bfc6c Fix memory leak in (the still unused) WM_reportf. 2016-01-16 23:26:28 +01:00
Bastien Montagne
b5bd39b518 Make 'incompatible pointer type' gcc warning an error by default.
This is the second time at least that kind of stuff slips in during one of my refactor,
a mere warning here is really not enough (too easy to miss it)!
2016-01-16 23:00:42 +01:00
Bastien Montagne
143d423a19 Fix T47189: Large smoke simulation sometimes make Blender crash.
Issue was with very thin domains along one or two axes, these could lead to simulation
with only one cell width - and smoke code assumes we have at least 4 cells in each direction.

So now, we clamp resolution to a minimum of 4 in smoke_set_domain_from_derivedmesh().

Note: in extreme cases like this report, this will generate very un-cubic cells,
check it still works OK in 3DView is needed here.

Thanks to @genscher and @kevindietrich for help on this issue. :)
2016-01-16 22:45:04 +01:00
Brecht Van Lommel
cdaf5ac967 Fix incorrect function for sculpt multithreading task after recent refactor. 2016-01-16 22:28:32 +01:00
Brecht Van Lommel
05734d57e1 WM: remove unnecessary context argument from WM_report, no good reason to have it. 2016-01-16 22:28:03 +01:00
Bastien Montagne
33fd81e5e6 Fix smoke BLI_task'ed code after recent refactor.
Curse gcc for not erroring by default on passing wrong func pointers... :/
2016-01-16 21:44:07 +01:00
Brecht Van Lommel
7e18918fae OpenGL Smoke: fix possible inconsistency between fire shader/texture binding. 2016-01-16 18:53:55 +01:00
Sergey Sharybin
1c71b8e323 Cycles: Fix compilation with older OSL
We didn't switch to OSL-1.6.9 on all platforms yet,
so please keep codeabse compiled with 1.5 for the
time being.
2016-01-16 22:47:04 +05:00
Bastien Montagne
8acf14c55c Cleanup: BLI_task foreach looper API doc. 2016-01-16 16:06:27 +01:00
Bastien Montagne
31d907fa0a Cleanup: BLI_task - API changes.
Based on usages so far:
- Split callback worker func in two, 'basic' and 'extended' versions. The former goes back
  to the simplest verion, while the later keeps the 'userdata_chunk', and gets the thread_id too.
- Add use_threading to simple BLI_task_parallel_range(), turns out we need this pretty much systematically,
  and allows to get rid of most usages of BLI_task_parallel_range_ex().
- Now BLI_task_parallel_range() expects 'basic' version of callback, while BLI_task_parallel_range_ex()
  expectes 'extended' version of the callback.

All in all, this should make common usage of BLI_task_parallel_range simpler (less verbose), and add
access to advanced callback to thread id, which is mandatory in some (future) cases.
2016-01-16 15:59:37 +01:00
Bastien Montagne
724809655c Fix (unreported) missing scene->gm.dome.warptext in libquery looper. 2016-01-16 12:47:14 +01:00
Bastien Montagne
2c5bc023c2 Fix T47188: Blender crashes when trying to undo adding new scene with "copy settings".
Our RenderSettings struct may have a bit too much levels, makes it hard to track
all 'pointer' data during copy...

Fixed several issues here, but not sure I found all existing ones. :/
2016-01-16 12:47:14 +01:00
Sergey Sharybin
36aa7e659e Fix T47180: Cycles deform motion blur + displacement behaves weirdly
Displacement shader was not updating motion vertex positions.

Current solution is not totally correct because it applies same offset
for all time steps. Ideally we'll need to evaluate displacement shader
for every time offset separately, but currently we don't have subframe
image access.

For the time being will consider this a TODO.
2016-01-16 15:36:42 +05:00
Mike Erwin
ddc75d7e8a OpenGL: remove redundant state change 2016-01-16 02:19:16 -05:00
Mike Erwin
384a16bfbc cleanup: C99
- tighter scoping
- declare closer to use
- struct initializers
- bool vs int
2016-01-16 02:17:05 -05:00
Mike Erwin
a29e2c379e OpenGL: simplify some UI draw calls
- vectorscope grid
- color ramp handles
- box shadows (image file preview)
2016-01-16 01:17:51 -05:00
Mike Erwin
f4cd7ca9c6 OpenGL: pull glBegin/End out of loop
so that all points here are drawn between one Begin/End pair.
2016-01-16 00:11:49 -05:00
Mike Erwin
2d71d13ea2 OpenGL: fixes related to GL_POINTS
I put all usage of GL_POINTS under the microscope. Fixed problems &
optimized a couple of spots.

- reduce calls to glPointSize by about 50%
- draw selected & unselected vertices together for UV editor & EditMesh
- draw initial gpencil stroke point the proper size
- a few other smaller fixes

New policy: each GL_POINTS draw call needs to set its desired point
size. This eliminates half our calls to glPointSize (setting it back to
its 1.0 default after every draw).
2016-01-15 23:51:29 -05:00
Campbell Barton
31375a1b21 Cleanup: stdbool no longer optional, remove checks 2016-01-16 15:38:57 +11:00
Campbell Barton
92b222a158 Cleanup: use enum constant for DNA comparison 2016-01-16 15:00:22 +11:00
Campbell Barton
63de1e7e7a Blender Internal: subframe render support
Note this doesn't expose the option to the interface,
it just means scripts that set the subframe can render (as with Cycles).
2016-01-16 13:10:47 +11:00
Campbell Barton
b22dde0198 Cleanup: style 2016-01-16 13:01:49 +11:00
Lukas Stockner
70e16b3c99 Fix T47181: Blender OSL script node crash (OSL 1.6.9)
Compiling OSL scripts with errors in them would cause Blender to crash since the OSL version
bump to 1.6.9 instead of printing the error to the console as it did before.

With version 1.6.2, OSL added a pointer to an OpenImageIO ErrorHandler as an argument to the
OSLCompiler constructor. However, since it defaults to the NULL pointer, Blender still compiled
fine after the OSL version bump.
It turns out, though, that this pointer is used without further checks inside the OSL code, which
makes it crash when it tries to report an error unless a valid ErrorHandler pointer is specified.
Therefore, this commit simply passes a pointer to the static default handler that OIIO offers,
which prints the error to the console just like OSL did before.

Using this feature for a more advanced error handling and displaying from the Blender side would
be possible and seems reasonable, but for now it's not really relevant for fixing this bug.
2016-01-16 01:32:22 +01:00
Dalai Felinto
9a76354585 Cycles-Bake: Custom Baking passes
The combined pass is built with the contributions the user finds fit.

It is useful for lightmap baking, as well as non-view dependent effects
baking.

The manual will be updated once we get closer to the 2.77 release.
Meanwhile the new page can be found here:

http://dalaifelinto.com/blender-manual/render/cycles/baking.html

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D1674
2016-01-15 13:00:56 -02:00
Bastien Montagne
9137a44014 Fix T47185: Wrong items order with template_icon_view. 2016-01-15 15:19:14 +01:00
Sergey Sharybin
7776f03873 Changes around update normals from PBVH to CDDM
- Only do this if PBVH is not used for display, this should correspond
  to whats' happening in sculpt.c now.

- No need to do such synchronization for solid drawing, it supports
  optimal display from PBVH.

In fact, such synchronization is only needed in the following case:

Drawing callback does not support PBVH draw and sculpt session is
configured to use PBVH for display and related operations.
2016-01-15 16:29:57 +05:00
Sergey Sharybin
2414832bf1 Tracking: Make plane track sliding aware of closest mouse
Also made threshold aware of zoom, so now it's always 12px threshold
regardless of how much you're zoomed in.
2016-01-15 15:37:46 +05:00
Sergey Sharybin
585574dc30 Tracking: Split tracking_ops into smaller files
The file started to be rather really huge and difficult to follow.
Should be no functional changes.
2016-01-15 15:15:56 +05:00
Sergey Sharybin
bdd79ef880 Tracking: Cleanup, use more strict code style
Should be no functional changes.
2016-01-15 15:15:56 +05:00
Campbell Barton
d21eeffbbf Cleanup: used pre-defined atoms in ghost 2016-01-15 18:40:15 +11:00
Sergey Sharybin
663a2f6e0c Tracking: Use sliding zone which is closer to the mouse
Previously it was simplier logic which only checked whether the mouse
is inside of some area around sliding zone, which was resulting in
wrong sliding zone used when zoomed out.
2016-01-15 12:23:24 +05:00
Campbell Barton
c282373116 Fix T31063: X11 window resize fails on PPC
X11 property access was using wrong sized types that only worked for little endian systems.
2016-01-15 16:47:41 +11:00
Campbell Barton
f81bc88ac7 Fix crash w/ scripts run from the command line that load files
Also refactor context backup/restore into functions.
2016-01-15 10:23:26 +11:00
Campbell Barton
fc8730d4c2 DNA: partial revert of long removal
924c626 broke loading on systems with different endian.
We could support reading values from SDNA, it isn't really worth the extra hassle.

Long support is still removed, just keep enum values the same.
2016-01-15 09:18:50 +11:00
Campbell Barton
5d45c2bf65 Fix T47168: Project image looses float precision 2016-01-15 07:32:30 +11:00
Campbell Barton
b4e56dce30 Doc: more detailed ImBuf.rect/rect_float comments 2016-01-15 07:10:07 +11:00
Campbell Barton
63a718e50f Cleanup: warning, whitespace 2016-01-15 05:36:07 +11:00
Campbell Barton
76197a2b96 Improve multi-paint tip 2016-01-15 05:21:42 +11:00