blender.git
4 years agoFix T49623: Immediately crash trying to render attached file in Cycles
Sergey Sharybin [Tue, 11 Oct 2016 09:54:04 +0000 (11:54 +0200)]
Fix T49623: Immediately crash trying to render attached file in Cycles

Original fix in this area was not really complete (but was the safest at
the release time). Now all the crazy configurations of slots going out
of sync should be handled here.

4 years agoinstall_deps.sh: remove libglewmx from deb for now, the package is broken in deb...
Bastien Montagne [Mon, 10 Oct 2016 17:29:04 +0000 (19:29 +0200)]
install_deps.sh: remove libglewmx from deb for now, the package is broken in deb testing...

4 years agoinstall_deps.sh: first attempt to support cxx11.
Bastien Montagne [Mon, 10 Oct 2016 17:17:43 +0000 (19:17 +0200)]
install_deps.sh: first attempt to support cxx11.

For now, we merely add an option that sets CXXFLAGS envvar with
'--std=c++11' option.

There is no check done to ensure compatibility with the system
libraries, mainly because:
  - It is all but trivial to get this information in a generic and
    reliable way.
  - Currently even cutting edge distributions may still distribute some c++98
    libraries.
  - With recent stdlibc++, both ABIs are supported together, which means
    that incompatibilities are rather unlikely.

To summarize: if your system is recent and built with gcc-5.1 or more,
you should not experience too much troubles with c++11.

4 years agoOpenGL animation: Fix stupid mistake form previous commit
Sergey Sharybin [Mon, 10 Oct 2016 13:52:10 +0000 (15:52 +0200)]
OpenGL animation: Fix stupid mistake form previous commit

Flagging of pool to cancel was done in the wrong place, making last
frames missing in the final video.

4 years agoFix viewport camera gets out of sync in certain cases
Sergey Sharybin [Mon, 10 Oct 2016 12:47:03 +0000 (14:47 +0200)]
Fix viewport camera gets out of sync in certain cases

It was possible to have two viewports opened and start using Ctrl-0
to make different objects an active camera for the viewport. This
worked fine for viewports which had decoupled camera from the scene,
but if viewport was locked to scene camera it was possible to run into
situation when two different viewports are locked to scene camera but
had different v3d->camera pointers.

4 years agoOpenGL render: Fix missing file output after pressing Esc
Sergey Sharybin [Mon, 10 Oct 2016 10:51:01 +0000 (12:51 +0200)]
OpenGL render: Fix missing file output after pressing Esc

Apparently, the whole G.is_break is not used by OpenGL render, meaning
this flag will not be clear before running the operator. This was
causing missing file output after pressing Esc once for the rest of
Blender session.

4 years agoOpenGL: remove GLSL support query (it's always supported)
Mike Erwin [Mon, 10 Oct 2016 05:13:03 +0000 (01:13 -0400)]
OpenGL: remove GLSL support query (it's always supported)

4 years agoremove call to GLSL support query (it's always supported)
Mike Erwin [Mon, 10 Oct 2016 05:28:02 +0000 (01:28 -0400)]
remove call to GLSL support query (it's always supported)

Reworked logic in the one place that still called this. Deleted the "GLSL not supported" fallback.

(equivalent to rB78abbdf26451 on blender2.8 branch)

4 years agoBGE: remove calls to GLSL support query (it's always supported)
Mike Erwin [Mon, 10 Oct 2016 05:08:49 +0000 (01:08 -0400)]
BGE: remove calls to GLSL support query (it's always supported)

Reworked logic in the few places that still called this. Deleted the "GLSL not supported" fallbacks.

Also removed some nearby checks for ARB_multitexture and OpenGL 1.1. Blender 2.77 removed checks like this, but game engine still has some.

4 years agoCycles: Split device_opencl.cpp into multiple files for easier maintenance
Lukas Stockner [Wed, 14 Sep 2016 21:47:54 +0000 (23:47 +0200)]
Cycles: Split device_opencl.cpp into multiple files for easier maintenance

There are no user-visible changes, just some internal restructuring.

Differential Revision: https://developer.blender.org/D2231

4 years agoFix T49609: Point density textures: vertex colors are not properly averaged in BI
Daisuke Takahashi [Sun, 9 Oct 2016 11:16:19 +0000 (13:16 +0200)]
Fix T49609: Point density textures: vertex colors are not properly averaged in BI

Nice to have in 2.78a, though not a regression.

4 years agoCMake changes for new macOS target 10.9 / libc++ libraries.
Brecht Van Lommel [Wed, 14 Sep 2016 09:41:20 +0000 (11:41 +0200)]
CMake changes for new macOS target 10.9 / libc++ libraries.

Differential Revision: https://developer.blender.org/D2283

4 years agoAmmend to rB00dc0666b3fe: forgot to fix boid->ground of first particle.
Bastien Montagne [Sat, 8 Oct 2016 17:13:50 +0000 (19:13 +0200)]
Ammend to rB00dc0666b3fe: forgot to fix boid->ground of first particle.

This code is confusing, such dirty details should not sneak out of
particles' own private code. :(

4 years agoFix T49608: runtime-only particle's boid->ground Object pointer was left dangling...
Bastien Montagne [Sat, 8 Oct 2016 13:18:35 +0000 (15:18 +0200)]
Fix T49608: runtime-only particle's boid->ground Object pointer was left dangling to invalid value in read code...

4 years agoFix a few compile errors with C++11 on macOS.
Brecht Van Lommel [Wed, 14 Sep 2016 09:41:20 +0000 (11:41 +0200)]
Fix a few compile errors with C++11 on macOS.

4 years agoBLI_task: fix case were some pool could work in more threads than allowed.
Bastien Montagne [Sat, 8 Oct 2016 12:46:01 +0000 (14:46 +0200)]
BLI_task: fix case were some pool could work in more threads than allowed.

We were checking for number of tasks from given pool already active, and
then atomically increasing it if allowed - this is not correct, number
could be increased by another thread between check and atomic op!

Atomic primitives are nice, but you must be very careful with *how* you
use them... Now we atomically increase counter, check result, and if we
end up over max value, abort and decrease counter again.

Spotted by Sergey, thanks!

4 years agoCollision: skip expensive BVH update if the collider doesn't move.
Alexander Gavrilov [Fri, 7 Oct 2016 10:27:11 +0000 (13:27 +0300)]
Collision: skip expensive BVH update if the collider doesn't move.

Since the collision modifier cannot be disabled, it causes a constant
hit on the viewport animation playback FPS. Most of this overhead can
be automatically removed in the case when the collider is static.

The updates are only skipped when the collider was stationary during
the preceding update as well, so the state is stored in a field.
Knowing that the collider is static can also be used to disable similar
BVH updates for substeps in the actual cloth simulation code.

Differential Revision: https://developer.blender.org/D2277

4 years agoCycles: Fix OpenCL split kernel compilation after recent CUDA 8 performance fix
Lukas Stockner [Fri, 7 Oct 2016 16:50:43 +0000 (18:50 +0200)]
Cycles: Fix OpenCL split kernel compilation after recent CUDA 8 performance fix

4 years agoOpenGL render: Limit number of scheduled frames for write
Sergey Sharybin [Fri, 7 Oct 2016 15:46:13 +0000 (17:46 +0200)]
OpenGL render: Limit number of scheduled frames for write

Previously if the rendering is much faster than saving (for example,
when transcoding stuff via VSE) it was possible to have 100s of frames
in memory.

This isn't ideal because of limited amount of RAM, so need to have
some sort of limit. This is exactly what is implemented in this commit.

4 years agoOpenGL render: Fix non-deterministic order of frame writes for movies
Sergey Sharybin [Fri, 7 Oct 2016 15:12:27 +0000 (17:12 +0200)]
OpenGL render: Fix non-deterministic order of frame writes for movies

By the design of task scheduler it was possible that tasks from somewhere
in the middle of scheduled list will be handled first.

For example, one thread might be iterating over the scheduled list and
ignore tasks because there is other thread is working on task from the
same pool. However, if that other thread finishes task before iteration
is over current thread will pick up task from somewhere in in the middle
of the list.

This isn't a problem in general case, but for movie rendering we do need
to have strict order of frames.

4 years agoOpenGL: Don't write frames when rendering was canceled
Sergey Sharybin [Fri, 7 Oct 2016 14:51:19 +0000 (16:51 +0200)]
OpenGL: Don't write frames when rendering was canceled

4 years agoCleanup: Use more clear name for where allocation is coming from
Sergey Sharybin [Fri, 7 Oct 2016 14:06:24 +0000 (16:06 +0200)]
Cleanup: Use more clear name for where allocation is coming from

4 years agoOpenGL: Do not schedule new frames for write if error happens
Sergey Sharybin [Fri, 7 Oct 2016 14:05:51 +0000 (16:05 +0200)]
OpenGL: Do not schedule new frames for write if error happens

Also do not attempt to write any already scheduled frames.

4 years agoProxied → Proxified
Sybren A. Stüvel [Fri, 7 Oct 2016 11:33:43 +0000 (13:33 +0200)]
Proxied → Proxified

4 years agoRe-establish link to proxies when they are made local after appending.
Sybren A. Stüvel [Thu, 6 Oct 2016 14:52:13 +0000 (16:52 +0200)]
Re-establish link to proxies when they are made local after appending.

This allows appending of an entire scene from another blend file into
this one, even when that blend file contains proxified armatures.

Since the proxified object needs to be linked (not local), this will
only work when the "Localize all" checkbox is disabled. The appended
proxy object should also not be referenced from anything in a library
(for example in a constraint). Referencing it from the appended data
should be fine.

Fixes T49495.

4 years agoDatablock management: remove 'proxy_from' pointer from 'is ID used' checks.
Bastien Montagne [Fri, 7 Oct 2016 08:20:40 +0000 (10:20 +0200)]
Datablock management: remove 'proxy_from' pointer from 'is ID used' checks.

Pretty much same reason as for the 'from' pointer of shapekeys - runtime
data creating loops and 'ghost' dependencies between datablocks.

We need to handle them in cases like remapping, but whall not take them
into account to check dependencies between datablocks... :/

4 years agoFix T49595: bpy - negative skin_vertices radius crashes Blender
Bastien Montagne [Fri, 7 Oct 2016 08:19:22 +0000 (10:19 +0200)]
Fix T49595: bpy - negative skin_vertices radius crashes Blender

This is unsigned value (negative radius does not have much sense anyway!).

4 years agoFix wrong separator line width after drawing vec icon
Julian Eisel [Thu, 6 Oct 2016 20:44:15 +0000 (22:44 +0200)]
Fix wrong separator line width after drawing vec icon

Was visible in Dynamic Context Menu add-on.

4 years agoGPencil: Fix interpolate stroke keymap conflict with sculpt
Antonioya [Thu, 6 Oct 2016 20:21:10 +0000 (22:21 +0200)]
GPencil: Fix interpolate stroke keymap conflict with sculpt

The initial idea was to use Ctrl+E to interpolate stroke because this is
similar to Pose breakdown, but the Ctrl+E keymap is used to inverse
grease pencil sculpt effect.

The new keymap is Ctrl+Alt+E in order to fix the conflict

4 years agoFix T49523: very slow normal map tangent computation for rendering in 2.78.
Brecht Van Lommel [Thu, 6 Oct 2016 01:09:46 +0000 (03:09 +0200)]
Fix T49523: very slow normal map tangent computation for rendering in 2.78.

4 years agoFix T49501: Animations imported via alembic render with wrong or no motion blur
Sergey Sharybin [Wed, 5 Oct 2016 10:37:09 +0000 (12:37 +0200)]
Fix T49501: Animations imported via alembic render with wrong or no motion blur

4 years ago[msvc] make.bat, no need to set the cuda path at all, cmake will figure it out on...
lazydodo [Tue, 4 Oct 2016 19:30:38 +0000 (13:30 -0600)]
[msvc] make.bat, no need to set the cuda path at all, cmake will figure it out on it's own.

4 years ago[msvc] make.bat remove mixed cuda 7.5/8.0 build for release since all kernels can...
lazydodo [Tue, 4 Oct 2016 17:51:04 +0000 (11:51 -0600)]
[msvc] make.bat remove mixed cuda 7.5/8.0 build for release since all kernels can now be properly build with 8.0

4 years agoCleanup: Update links to online py API doc, and remove old commented stuff.
Bastien Montagne [Tue, 4 Oct 2016 14:44:24 +0000 (16:44 +0200)]
Cleanup: Update links to online py API doc, and remove old commented stuff.

4 years agoFix T49553: Blender 2.78 crashes when File->Data Previews ->Refresh Datablock Previews
Bastien Montagne [Tue, 4 Oct 2016 13:03:34 +0000 (15:03 +0200)]
Fix T49553: Blender 2.78 crashes when File->Data Previews ->Refresh Datablock Previews

New recursive iteration over IDs in BKE_library_foreach_ID_link() was
broken by the infamous nodetree case. We cannot really recusively call
this function in that case, so better to deffer handling of
non-datablock NodeTrees as if real IDs here.

Also fixed initial ID not being stored as handled, in rare cases this
could also lead to infinite looping.

To be backported to 2.78a.

4 years agoCycles CUDA: make CUDA 8.0 the officially supported version for all platforms.
Brecht Van Lommel [Mon, 3 Oct 2016 20:14:43 +0000 (22:14 +0200)]
Cycles CUDA: make CUDA 8.0 the officially supported version for all platforms.

4 years agoFix Cycles CUDA performance on CUDA 8.0.
Brecht Van Lommel [Sun, 2 Oct 2016 12:48:39 +0000 (14:48 +0200)]
Fix Cycles CUDA performance on CUDA 8.0.

Mostly this is making inlining match CUDA 7.5 in a few performance critical
places. The end result is that performance is now better than before, possibly
due to less register spilling or other CUDA 8.0 compiler improvements.

On benchmarks scenes, there are 3% to 35% render time reductions. Stack memory
usage is reduced a little too.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D2269

4 years agoFix fluid sim build error with MSVC.
Brecht Van Lommel [Mon, 3 Oct 2016 20:07:13 +0000 (22:07 +0200)]
Fix fluid sim build error with MSVC.

4 years agoFix memory leak caused by unknown opeartor of keymap item
Julian Eisel [Mon, 3 Oct 2016 15:52:46 +0000 (17:52 +0200)]
Fix memory leak caused by unknown opeartor of keymap item

4 years agoFix T49548: Entering Cycles Rendered Viewport Unlinks Material from Objects.
Bastien Montagne [Mon, 3 Oct 2016 15:38:14 +0000 (17:38 +0200)]
Fix T49548: Entering Cycles Rendered Viewport Unlinks Material from Objects.

We *always* want to increase mat user count when from Object (and not
Data), because in that case we are moving mat from object to temp
generated mesh, material can never be 'borrowed' in that case.

To be backported to 2.78a

4 years agoFix missing operator-type registration
Julian Eisel [Mon, 3 Oct 2016 14:34:51 +0000 (16:34 +0200)]
Fix missing operator-type registration

Removed in a7dbc0704f217a, but only should've removed default keymap entry.

4 years agoFix T49506: Remove unused File Browser theme settings
Julian Eisel [Mon, 3 Oct 2016 11:26:52 +0000 (13:26 +0200)]
Fix T49506: Remove unused File Browser theme settings

If I didn't miss anything these are indeed not used. Old themes should still work (will only print info on redundant theme defines into console), but updated non-contrib themes already.

4 years agoFix missing new eyedropper keymap entry in keyconfig_utils.py
Bastien Montagne [Mon, 3 Oct 2016 10:29:18 +0000 (12:29 +0200)]
Fix missing new eyedropper keymap entry in keyconfig_utils.py

Missing from rBe9bcdcdbbd91d9.

4 years ago[Windows/Cycles/Clang] Fix compilation error with clang-cl on windows
lazydodo [Sun, 2 Oct 2016 20:01:23 +0000 (14:01 -0600)]
[Windows/Cycles/Clang] Fix compilation error with clang-cl on windows

4 years agoFluids: improve multithreaded CPU usage.
Brecht Van Lommel [Sun, 2 Oct 2016 13:43:02 +0000 (15:43 +0200)]
Fluids: improve multithreaded CPU usage.

Fixes for clamp-omp, fewer shared variables, fix some cases of threads writing
to the same memory location. Issue found by Jens Verwiebe, who reports 30%
speedup with 16 core CPU, when using this with a recent clang-omp version.

4 years agoFix T49520: broken vertex colors in the game engine.
Brecht Van Lommel [Sat, 1 Oct 2016 20:40:35 +0000 (22:40 +0200)]
Fix T49520: broken vertex colors in the game engine.

4 years ago[Fix unreported bug] Snap align with normal was not working in derivade mesh
Germano Cavalcante [Sat, 1 Oct 2016 19:50:34 +0000 (16:50 -0300)]
[Fix unreported bug] Snap align with normal was not working in derivade mesh

The `use_snapp_align_rotation` option was using only the first vertex

4 years ago[msvc] make.bat - Fix:msbuild platform wasn't set when the architecture was auto...
lazydodo [Sat, 1 Oct 2016 17:21:42 +0000 (11:21 -0600)]
[msvc] make.bat - Fix:msbuild platform wasn't set when the architecture was auto detected.

4 years agoFix T49502: file browser on OS X not highlighting system folders and bookmarks.
Brecht Van Lommel [Sat, 1 Oct 2016 17:14:38 +0000 (19:14 +0200)]
Fix T49502: file browser on OS X not highlighting system folders and bookmarks.

4 years ago[MSVC] Make.bat updates.
lazydodo [Sat, 1 Oct 2016 16:22:28 +0000 (10:22 -0600)]
[MSVC] Make.bat updates.
- Explicitly specify the platform for msbuild, to facilitate builds with just the Visual C++ Build Tools installed.
- When vs2013 is not found, try looking for 2015 as a fallback
- Clear up any batch variables that might have been set from previous runs

4 years agoFix wrong Cycles GLSL pointiness, still not supported but should be neutral 0.5.
Brecht Van Lommel [Sat, 1 Oct 2016 12:44:11 +0000 (14:44 +0200)]
Fix wrong Cycles GLSL pointiness, still not supported but should be neutral 0.5.

4 years agoCycles: implement partial constant folding for exponentiation.
Alexander Gavrilov [Wed, 28 Sep 2016 21:35:53 +0000 (00:35 +0300)]
Cycles: implement partial constant folding for exponentiation.

This is also an important mathematical operation that can be folded
if it is known that one argument is a certain constant. For colors
the operation is provided as a Gamma node.

The SVM Gamma node needs a small fix to make it follow the 0 ^ 0 == 1
rule, same as the Power node, or the Gamma node itself in OSL mode.

Reviewers: #cycles

Differential Revision: https://developer.blender.org/D2263

4 years agoAdd default UV coordinates for torus primitive.
Sebastian Witt [Fri, 30 Sep 2016 23:54:44 +0000 (01:54 +0200)]
Add default UV coordinates for torus primitive.

Fixes T47489.

Reviewed By: brecht

4 years agoFix MSVC compiler warning due to using */* to start comment.
Brecht Van Lommel [Mon, 26 Sep 2016 01:42:09 +0000 (03:42 +0200)]
Fix MSVC compiler warning due to using */* to start comment.

4 years agoCleanup: Naming in EditNormals modifier
Sergey Sharybin [Fri, 30 Sep 2016 10:15:18 +0000 (12:15 +0200)]
Cleanup: Naming in EditNormals modifier

4 years agoNormal edit modifier: Fix relation builder for the new dependency graph
Sergey Sharybin [Fri, 30 Sep 2016 09:13:28 +0000 (11:13 +0200)]
Normal edit modifier: Fix relation builder for the new dependency graph

4 years agoDepsgraph: Report proper error when modifier fails to create relation link
Sergey Sharybin [Fri, 30 Sep 2016 09:05:01 +0000 (11:05 +0200)]
Depsgraph: Report proper error when modifier fails to create relation link

4 years agoCUEW: Use latest upstream version
Sergey Sharybin [Fri, 30 Sep 2016 08:36:11 +0000 (10:36 +0200)]
CUEW: Use latest upstream version

Fixes typo in README :)

Thanks to @jesterKing!

4 years agoFix T49489: Pose marker in camera action + marker bound to camera -> crash.
Bastien Montagne [Fri, 30 Sep 2016 08:11:29 +0000 (10:11 +0200)]
Fix T49489: Pose marker in camera action + marker bound to camera -> crash.

'camera' Object pointer of TimeMarkers is a 'temp' hack since Durian project...
Would need to be either made definitive now, or removed/reworked/whatever.

But since we intend to use that object pointer for other needs, and current code
could lead to crashing .blend files, for now let's fix that mess (was missing
some bits in read code, and also totally ignored in libquery code).

Should be safe for 2.78a.

4 years agoUPBGE: Fix crash when calling shade_light texture when mtex has no tex.
Ulysse Martin [Fri, 30 Sep 2016 05:40:17 +0000 (07:40 +0200)]
UPBGE: Fix crash when calling shade_light texture when mtex has no tex.

4 years agoCycles: Support earlier tile rendering termination on cancel
Sergey Sharybin [Thu, 29 Sep 2016 14:00:25 +0000 (16:00 +0200)]
Cycles: Support earlier tile rendering termination on cancel

It will discard the whole tile, but it's still kind of more friendly than
fully locked interface (sort of) for until tile is fully sampled.

Sorry if it causes PITA to merge for the opencl split work, but this issue
bothering a lot when collecting benchmarks.

4 years agoCycles: Fix typo in shader cancel routines
Sergey Sharybin [Thu, 29 Sep 2016 13:48:10 +0000 (15:48 +0200)]
Cycles: Fix typo in shader cancel routines

4 years agoAdopt referenced scene in the context when evaluating sequences within a Scene Strip
Sergey Sharybin [Thu, 29 Sep 2016 13:00:03 +0000 (15:00 +0200)]
Adopt referenced scene in the context when evaluating sequences within a Scene Strip

This change makes it so that when the sequences within a Scene strip are
evaluated, they use the Scene that they come from as the context as opposed
the Scene that the Scene strip is in. This is necessary, for example, in the
case of the MulticamSelector where it needs to reference strips in the original
Scene as opposed to the Scene where the Scene strip is located.

Patch by @Matt (HyperSphere), thanks!

4 years agoCycles: Improve OpenCL line information handling
Sergey Sharybin [Thu, 29 Sep 2016 08:20:24 +0000 (10:20 +0200)]
Cycles: Improve OpenCL line information handling

Previously it was falling back to just a path after #include
statement was finished. Now we fall back to a proper current
file name after dealing with the preprocessor statement.

4 years agoCycles: Cleanup file headers
Sergey Sharybin [Thu, 29 Sep 2016 08:11:40 +0000 (10:11 +0200)]
Cycles: Cleanup file headers

Some of the files were wrongly attributing code to some other
organizations and in few places proper attribution was missing.

This is mainly either a copy-paste error (when new file was
created from an existing one and header wasn't updated) or due
to some refactor which split non-original-BF code with purely
BF code.

Should solve some confusion around.

4 years agoUpdate source tgz builder script
Sergey Sharybin [Thu, 29 Sep 2016 08:05:42 +0000 (10:05 +0200)]
Update source tgz builder script

Was broken since splitting BKE_blender_version from BKE_blender.

4 years ago[MSVC] make.bat updates.
lazydodo [Thu, 29 Sep 2016 01:57:25 +0000 (19:57 -0600)]
[MSVC] make.bat updates.

- The build folder name used to be depended on the order of the parameters, this is now normalized to
"build_windows_[Release/Full/Lite/Headless/Cycles/Bpy]_[x86/x64]_vc[12/14]_[Release/Debug]" regardless of the order of the parameters.

-Use CUDA8 for all kernels when building the release convenience target with visual studio 2015

4 years agoRevert "[Windows/MSVC] Blosc doesn't require debug libraries."
lazydodo [Wed, 28 Sep 2016 23:27:35 +0000 (17:27 -0600)]
Revert "[Windows/MSVC] Blosc doesn't require debug libraries."

turns out it's a C++ lib now-days and it *DOES* require debug libs.

This reverts commit bde5eb8b6303d8d92b7c41d4a3f041bbb73c162d.

4 years agoFix Windows mouse wheel scroll speed
lazydodo [Wed, 28 Sep 2016 23:19:16 +0000 (17:19 -0600)]
Fix Windows mouse wheel scroll speed

In Windows, event dispatching code is throwing out the wheel scroll count value.
Despite of how many fast you move the wheel, it only make one-notch scroll event.

This patch convert wheel event to multiple 1-notch wheel events.

This also correct the handling of smooth scroll mouse wheel (which can report smaller than 1-notch wheel movement) by accumulating the small wheel delta values.

Reviewers: djnz, shadowrom, elubie, #platform:_windows, sergey, juicyfruit, brecht

Reviewed By: shadowrom, elubie, #platform:_windows, brecht

Subscribers: dingto, elubie, brachi, brecht

Differential Revision: https://developer.blender.org/D143

4 years agoFix T49478: triangulate of face hangs Blender.
Bastien Montagne [Wed, 28 Sep 2016 18:03:59 +0000 (20:03 +0200)]
Fix T49478: triangulate of face hangs Blender.

Another case of float imprecision leading to endless loop. INcreasing a bit 'noise threashold' seems to work OK.

Not a regression, but might be nice to have in 2.78a.

4 years agoCycles: Cleanup, indentation
Sergey Sharybin [Wed, 28 Sep 2016 15:05:33 +0000 (17:05 +0200)]
Cycles: Cleanup, indentation

4 years agoCycles: Fix compilation error with minimal feature set
Sergey Sharybin [Wed, 28 Sep 2016 15:03:42 +0000 (17:03 +0200)]
Cycles: Fix compilation error with minimal feature set

4 years agoFix T49471: Vertex Connect randomly broken.
Bastien Montagne [Wed, 28 Sep 2016 14:56:19 +0000 (16:56 +0200)]
Fix T49471: Vertex Connect randomly broken.

Not sure where this comes from, but code was converting BMEdge* to BMVert* to check oflags,
i.e. not accessing correct memory.

Regression, to be backported to 2.78a.

4 years agoFixes for pose library change 601ce6a89c4
Sybren A. Stüvel [Wed, 28 Sep 2016 13:40:05 +0000 (15:40 +0200)]
Fixes for pose library change 601ce6a89c4

Apparently the keying sets system doesn't support subclassing
KeyingSetInfo subclasses. I have added a note to the top of the file to
indicate this to future developers.

4 years agoCurve pinning: Allow pinning object data without animated object
Sergey Sharybin [Wed, 28 Sep 2016 13:18:15 +0000 (15:18 +0200)]
Curve pinning: Allow pinning object data without animated object

Special case, so now we can pin tricky cases like animated camera DOF
without requiring to have animation on the object level.

4 years agoFix T49460: Particle group instance 'Use Count' value gets reset on file-load.
Bastien Montagne [Wed, 28 Sep 2016 13:06:50 +0000 (15:06 +0200)]
Fix T49460: Particle group instance 'Use Count' value gets reset on file-load.

Regression caused rBbcc863993ad, write code was assuming dw->ob was always valid,
wich is no more the case right after reading file e.g.

Another good example of how bad it is to use 'hidden' dependencies between datablocks. :(
And another fix to be backported to 2.78a. :(((

4 years agoPOSELIB_OT_pose_add: only create keyframes for selected bones.
Sybren A. Stüvel [Wed, 28 Sep 2016 11:54:57 +0000 (13:54 +0200)]
POSELIB_OT_pose_add: only create keyframes for selected bones.

Previously the pose library used the WholeCharacter key set, which ignores
selection and add keys for almost all bones in the rig. This is a very
slow operation on complex rigs. With this patch, only selected bones are
keyed, defaulting to keying all bones when none are selected.

Note that this fixes the FIXME previously mentioned in the source.

4 years agoFix missing properties editor update when changing 3D View camera
Julian Eisel [Tue, 27 Sep 2016 22:44:31 +0000 (00:44 +0200)]
Fix missing properties editor update when changing 3D View camera

Actually two errors here:
* Properties editor wasn't refreshing on (NC_SCENE | ND_RENDER_OPTIONS) notifiers
* Was using notifier info bits wrongly, needs to send two separate notifiers

Decided to remove ND_RENDER_OPTIONS rather than adding properties editor scene context refresh for it, this is more than a render option change.

4 years agoDynamic Paint: Don't store duplicate adjacency links.
Alexander Gavrilov [Tue, 27 Sep 2016 09:21:44 +0000 (12:21 +0300)]
Dynamic Paint: Don't store duplicate adjacency links.

Duplicates can happen at UV seams in case of resolution mismatch
or other complications. It's better not to store them in case it
confuses some math later on.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D2261

4 years agoDynamic Paint: Fix adjacency computations at UV seams.
Alexander Gavrilov [Tue, 27 Sep 2016 08:13:04 +0000 (11:13 +0300)]
Dynamic Paint: Fix adjacency computations at UV seams.

1. When adding one pixel border to UV islands prefer grid directions.
   This is more logical as it means neighbor pixels will commonly
   share a border, opposed to just corners.
2. Don't subtract 0.5 when converting float UVs to int in computing
   adjacency across a UV seam. Pixels cover a square with corners
   at int positions and adding/subtracting 0.5 is only for dealing
   with the center point of a pixel.
3. Use the neighbour_pixel field from the correct pixel, and check
   it's not back to the origin point.
4. In the connected UV case, ensure that the returned index actually
   refers to a valid active pixel.

This fixes paint spread not traversing some UV seams, while at the
same time spreading to random unrelated points on other seams.
The first problem is primarily fixed by 2, while the second one
is addressed by item 4.

Differential Revision: https://developer.blender.org/D2261

4 years ago[Windows/MSVC] Blosc doesn't require debug libraries.
lazydodo [Tue, 27 Sep 2016 16:24:09 +0000 (10:24 -0600)]
[Windows/MSVC] Blosc doesn't require debug libraries.

4 years agoFix T49466: Stupid typo in logicbricks new copy code from rB776a8548f03a
Bastien Montagne [Tue, 27 Sep 2016 15:55:12 +0000 (17:55 +0200)]
Fix T49466: Stupid typo in logicbricks new copy code from rB776a8548f03a

Moved that code forth and back a few times while creating rB776a8548f03a fix,
ended up forgetting to update it correctly for function where it layed down in the end.

Last-minute fixes are never a good thing... Now we already have real reason for 2.78 'a' release :(

4 years agoFix T49423: Data Preview of group containing only group instances is empty.
Bastien Montagne [Tue, 27 Sep 2016 15:03:03 +0000 (17:03 +0200)]
Fix T49423: Data Preview of group containing only group instances is empty.

Code was not getting correct boundbox in some cases (group only instancing other groups e.g.), now
compute our own bbox in those cases.

Based on patch by @lichtwerk, but extended the fix to include linked datablocks in some cases
(linked objects in local groups, linked objects in local scene, etc.), this was also broken in existing code.

Reviewers: mont29

Subscribers: duarteframos

Differential Revision: https://developer.blender.org/D2257

4 years agofix Mac build for Xcode < 8
Mike Erwin [Tue, 27 Sep 2016 14:16:47 +0000 (16:16 +0200)]
fix Mac build for Xcode < 8

We need a long-term fix, but this will get 2.78 out the door.

4 years agocleanup: spacing & alignment
Mike Erwin [Tue, 27 Sep 2016 12:56:58 +0000 (14:56 +0200)]
cleanup: spacing & alignment

4 years agoFix T49461: Dynamic paint wetmap flickers.
Bastien Montagne [Tue, 27 Sep 2016 11:54:26 +0000 (13:54 +0200)]
Fix T49461: Dynamic paint wetmap flickers.

Regression from rBa4a968f, we would adjust current point's wetness without actually protecting it
in new multi-threaded context, leading to concurrent access mess.

Now delay applying wetness reduction to current point to end of function, allows us to avoid having
to lock current point twice together with neighbor one (and reducing spinlock awainting too).

To be backported to 2.78a.

4 years agoFix T49464: Data Transfer modifier slows down redraw of window.
Bastien Montagne [Tue, 27 Sep 2016 10:03:18 +0000 (12:03 +0200)]
Fix T49464: Data Transfer modifier slows down redraw of window.

Never call function that might recompute a DM in an RNA itemf callback (or any UI-related func in general)!
There was an XXX comment asking if this was OK - well, no, it was not. :P

Could be ported back to some 2.78 flavour should we need it.

4 years agoFix export image generated by export UV layout
Sergey Sharybin [Mon, 26 Sep 2016 14:43:06 +0000 (16:43 +0200)]
Fix export image generated by export UV layout

Was only happening with new dependency graph.

The issue here is that scene's depsgraph layers will be 0 unless
it was ever visible. Worked around by checking for 0 layer in the
update_tagged of new depsgraph. This currently kind of following
logic of visible_layers, but is weak.

Committing so studio is unlocked here, will re-evaluate this layer.

4 years agoFix Scene datablocks being created with a real user while never having any real datab...
Bastien Montagne [Mon, 26 Sep 2016 14:35:52 +0000 (16:35 +0200)]
Fix Scene datablocks being created with a real user while never having any real datablock user.

Now using new system dedicated to that kind of cases, id_ensure_real_user(), instead.
That way, usercount of Scenes is handled correctly at deletion time.

Reported by @sergey over IRC, thanks.

4 years agoCleanup: stereo windowmanager code
Dalai Felinto [Mon, 26 Sep 2016 13:56:45 +0000 (13:56 +0000)]
Cleanup: stereo windowmanager code

This will make the changes in blender2.8 branch simpler

4 years agoFix crash in own recent rB776a8548f03a049.
Bastien Montagne [Mon, 26 Sep 2016 07:49:34 +0000 (09:49 +0200)]
Fix crash in own recent rB776a8548f03a049.

New ID may be null, have to check this too!

Reported by @panzergame over IRC, thanks.

To be ported to 2.78 as well.

4 years agoCycles: Use correct light sampling PDF for MIS calculation with Branched Path Tracing
Lukas Stockner [Sun, 25 Sep 2016 20:11:50 +0000 (22:11 +0200)]
Cycles: Use correct light sampling PDF for MIS calculation with Branched Path Tracing

The light sampling functions calculate light sampling PDF for the case that the light has been randomly selected out of all lights.
However, since BPT handles lamps and meshlights separately, this isn't the case. So, to avoid a wrong result, the code just included the 0.5 factor in the throughput.

In theory, however, the correction should be made to the sampling probability, which needs to be doubled. Now, for the regular calculation, that's no real difference since the throughput is divided by the pdf.
However, it does matter for the MIS calculation - it's unbiased both ways, but including the factor in the PDF instead of the throughput should give slightly better results.

Reviewers: sergey, brecht, dingto, juicyfruit

Differential Revision: https://developer.blender.org/D2258

4 years agoCleanup: remove unused function.
Kévin Dietrich [Sun, 25 Sep 2016 20:11:09 +0000 (22:11 +0200)]
Cleanup: remove unused function.

4 years agoAlembic: only interpolate vertices when their number don't differ
Kévin Dietrich [Sun, 25 Sep 2016 20:09:05 +0000 (22:09 +0200)]
Alembic: only interpolate vertices when their number don't differ
between samples.

This could cause some crashes.

4 years agoCycles: Fix T49411: Multiscatter GGX with zero roughness when Filter Glossy is enabled
Lukas Stockner [Sun, 25 Sep 2016 20:08:08 +0000 (22:08 +0200)]
Cycles: Fix T49411: Multiscatter GGX with zero roughness when Filter Glossy is enabled

4 years agoVolume slice settings: tweak/fix UI enabling conditions.
Kévin Dietrich [Sun, 25 Sep 2016 19:55:29 +0000 (21:55 +0200)]
Volume slice settings: tweak/fix UI enabling conditions.

It was still possible to have some properties enabled when it does not
make sense to have them so.

4 years agoSmoke debug draw: take adaptive domain position into account.
Kévin Dietrich [Sun, 25 Sep 2016 19:45:09 +0000 (21:45 +0200)]
Smoke debug draw: take adaptive domain position into account.

Eventually the various functions that deals with adaptive domain
bounding box shall de-duplicated.

4 years agoViewport smoke: fix a couple of issues in the new display settings.
Kévin Dietrich [Sun, 25 Sep 2016 15:02:46 +0000 (17:02 +0200)]
Viewport smoke: fix a couple of issues in the new display settings.

- WITH_SMOKE macro was not defined so some code was not compiled, though
it was still accessible from the UI
- some UI elements were disappearing due to bad indentation, also rework
the UI code to not hide but rather disable/grey out button in the UI
- Display thickness was not used due to bad manual merge of the code
from the patch.

4 years agoFix T49310: incorrect Cycles standalone normals with negative scale.
Brecht Van Lommel [Sun, 25 Sep 2016 03:07:38 +0000 (05:07 +0200)]
Fix T49310: incorrect Cycles standalone normals with negative scale.

4 years agoCurve Fitting: re-fitting heap pre-allocated too much
Campbell Barton [Sun, 25 Sep 2016 02:11:46 +0000 (12:11 +1000)]
Curve Fitting: re-fitting heap pre-allocated too much