4 years agoCycles: Fix indentation
Mai Lavelle [Tue, 7 Mar 2017 10:21:36 +0000 (05:21 -0500)]
Cycles: Fix indentation

4 years agoCycles: Fix strict warning about unused variable
Mai Lavelle [Tue, 7 Mar 2017 10:16:57 +0000 (05:16 -0500)]
Cycles: Fix strict warning about unused variable

4 years agoCycles: Calculate size of split state buffer kernel side
Mai Lavelle [Sat, 4 Mar 2017 11:29:01 +0000 (06:29 -0500)]
Cycles: Calculate size of split state buffer kernel side

By calculating the size of the state buffer in the kernel rather than the host
less code is needed and the size actually reflects the requested features.

Will also be a little faster in some cases because of larger global work size.

4 years agoCycles: Fix crash after failed kernel build
Mai Lavelle [Sat, 4 Mar 2017 08:29:03 +0000 (03:29 -0500)]
Cycles: Fix crash after failed kernel build

Pointers to kernels were uninitialized leading to freeing of random memory
addresses. Another reason it would be good to use smart pointers.

4 years agoCycles: Faster building of split kernel
Mai Lavelle [Fri, 3 Mar 2017 09:10:17 +0000 (04:10 -0500)]
Cycles: Faster building of split kernel

Simple change to make it so that only kernels that have been modified are
rebuilt. Might only be useful during development.

4 years agoCycles: Initialize rng_state for split kernel
Mai Lavelle [Fri, 3 Mar 2017 09:07:26 +0000 (04:07 -0500)]
Cycles: Initialize rng_state for split kernel

Because the split kernel can render multiple samples in parallel it is
necessary to have everything initialized before rendering of any samples
begins. The code that normally handles initialization of
`rng_state` (`kernel_path_trace_setup()`) only does so for the first sample,
which was causing artifacts in the split kernel due to uninitialized
`rng_state` for some samples.

Note that because the split kernel can render samples in parallel this
means that the split kernel is incompatible with the LCG.

4 years agoCycles: Remove sum_all_radiance kernel
Mai Lavelle [Wed, 1 Mar 2017 06:47:08 +0000 (01:47 -0500)]
Cycles: Remove sum_all_radiance kernel

This was only needed for the previous implementation of parallel samples. As
we don't have that any more it can be removed.

Real reason for removal tho is this: `per_sample_output_buffers` was being
calculated too small and artifacts resulted. The tile buffer is already
the correct size and calculating the size for `per_sample_output_buffers`
is a bit difficult with the current layout of the code. As
`per_sample_output_buffers` was only needed for `sum_all_radiance`,
removing that kernel and writing output to the tile buffer directly
fixes the artifacts.

4 years agoCycles: Split path initialization into own kernel
Mai Lavelle [Wed, 1 Mar 2017 06:05:55 +0000 (01:05 -0500)]
Cycles: Split path initialization into own kernel

This makes it easier to initialize things correctly in the data_init kernel
before they are needed by path tracing.

4 years agoCycles: Seperate kernel loading time from render time
Mai Lavelle [Fri, 30 Dec 2016 04:05:40 +0000 (23:05 -0500)]
Cycles: Seperate kernel loading time from render time

4 years agoCycles: Add names to buffer allocations
Mai Lavelle [Wed, 14 Dec 2016 01:45:09 +0000 (20:45 -0500)]
Cycles: Add names to buffer allocations

This is to help debug and track memory usage for generic buffers. We
have similar for textures already since those require a name, but for
buffers the name is only for debugging proposes.

4 years agoCycles: CUDA implementation of split kernel
Mai Lavelle [Tue, 14 Feb 2017 10:50:29 +0000 (05:50 -0500)]
Cycles: CUDA implementation of split kernel

4 years agoCycles: CPU implementation of split kernel
Mai Lavelle [Tue, 14 Feb 2017 11:20:48 +0000 (06:20 -0500)]
Cycles: CPU implementation of split kernel

4 years agoCycles: Remove ccl_fetch and SOA
Mai Lavelle [Thu, 16 Feb 2017 11:24:13 +0000 (06:24 -0500)]
Cycles: Remove ccl_fetch and SOA

4 years agoCycles: Report device maximum allocation and detected global size
Sergey Sharybin [Mon, 20 Feb 2017 12:02:11 +0000 (13:02 +0100)]
Cycles: Report device maximum allocation and detected global size

4 years agoCycles: Workaround for driver hangs
Mai Lavelle [Tue, 31 Jan 2017 11:48:15 +0000 (06:48 -0500)]
Cycles: Workaround for driver hangs

Simple workaround for some issues we've been having with AMD drivers hanging
and rendering systems unresponsive. Unfortunately this makes things a bit
slower, but its better than having to do hard reboots. Will be removed when
drivers have been fixed.

Define CYCLES_DISABLE_DRIVER_WORKAROUNDS to disable for testing purposes.

4 years agoCycles: OpenCL split kernel refactor
Mai Lavelle [Wed, 22 Feb 2017 13:10:02 +0000 (08:10 -0500)]
Cycles: OpenCL split kernel refactor

This does a few things at once:

- Refactors host side split kernel logic into a new device
  agnostic class `DeviceSplitKernel`.
- Removes tile splitting, a new work pool implementation takes its place and
  allows as many threads as will fit in memory regardless of tile size, which
  can give performance gains.
- Refactors split state buffers into one buffer, as well as reduces the
  number of arguments passed to kernels. Means there's less code to deal
  with overall.
- Moves kernel logic out of OpenCL kernel files so they can later be used by
  other device types.
- Replaced OpenCL specific APIs with new generic versions
- Tiles can now be seen updating during rendering

4 years agoCycles: Add OpenCL kernel for zeroing memory buffers
Mai Lavelle [Thu, 26 Jan 2017 06:41:48 +0000 (01:41 -0500)]
Cycles: Add OpenCL kernel for zeroing memory buffers

Transferring memory to the device was very slow and there's really no
need when only zeroing a buffer.

4 years agoCycles: Add more atomic operations
Mai Lavelle [Wed, 22 Feb 2017 12:41:18 +0000 (07:41 -0500)]
Cycles: Add more atomic operations

4 years agoCycles: Expose passes size to device tasks
Mai Lavelle [Fri, 20 Jan 2017 08:05:32 +0000 (03:05 -0500)]
Cycles: Expose passes size to device tasks

This is needed so devices can know the size of a tile buffer before any
tiles are acquired.

4 years agoCycles: Allow device_memory to be used directly
Mai Lavelle [Wed, 22 Feb 2017 12:32:57 +0000 (07:32 -0500)]
Cycles: Allow device_memory to be used directly

This is useful for when theres no host side memory attched to the buffer

4 years agoTask scheduler: Add concept of suspended pools
Sergey Sharybin [Tue, 7 Mar 2017 16:29:39 +0000 (17:29 +0100)]
Task scheduler: Add concept of suspended pools

Suspended pools allows to push huge amount of initial tasks
without any threading synchronization and hence overhead.

This gives ~50% speedup of cached rigid body with file from
T50027 and seems to have no negative affect in other scenes

4 years agoDepsgraph: Remove workarounds from depsgraph for keeping threads alive
Sergey Sharybin [Fri, 3 Mar 2017 09:58:53 +0000 (10:58 +0100)]
Depsgraph: Remove workarounds from depsgraph for keeping threads alive

This is something what should be done in the task scheduler instead
with local thread queues so we handle this in a single place.

4 years agoTask scheduler: Initial implementation of local tasks queues
Sergey Sharybin [Mon, 6 Mar 2017 14:40:05 +0000 (15:40 +0100)]
Task scheduler: Initial implementation of local tasks queues

The idea is to allow some amount of tasks to be pushed from working
thread to it's local queue, so we can acquire some work without doing
whole mutex lock.

This should allow us to remove some hacks from depsgraph which was
added there to keep threads alive.

4 years agoTask scheduler: Use real pthread's TLS to access active thread's data
Sergey Sharybin [Mon, 6 Mar 2017 10:21:50 +0000 (11:21 +0100)]
Task scheduler: Use real pthread's TLS to access active thread's data

This allows us to avoid TLS stored in pool which gives us advantage of
using pre-allocated tasks pool for the pools created from non-main thread.

Even on systems with slow pthread TLS it should not be a problem because
we access it once at a pool construction time. If we want to use this more
often (for example, to get rid of push_from_thread) we'll have to do much
more accurate benchmark.

4 years agoTask scheduler: Refactor the way we store thread-spedific data
Sergey Sharybin [Mon, 6 Mar 2017 10:12:07 +0000 (11:12 +0100)]
Task scheduler: Refactor the way we store thread-spedific data

Basically move all thread-specific data (currently it's only task
memory pool) from a dedicated array of taskScheduler to TaskThread.
This way we can add more thread-specific data in the future with
less of a hassle.

4 years agoTask scheduler: Remove per-pool threads limit
Sergey Sharybin [Fri, 3 Mar 2017 09:48:13 +0000 (10:48 +0100)]
Task scheduler: Remove per-pool threads limit

This feature was adding extra complexity to task scheduling
which required yet extra variables to be worried about to be
modified in atomic manner, which resulted in following issues:

- More complex code to maintain, which increases risks of
  something going wrong when we modify the code.

- Extra barriers and/or locks during task scheduling, which
  causes extra threading overhead.

- Unable to use some other implementation (such as TBB) even for
  the comparison tests.

Notes about other changes.

There are two places where we really had to use that limit.

One of them is the single threaded dependency graph. This will
now construct a single-threaded scheduler at evaluation time.
This shouldn't be a problem because it only happens when using
debugging command line arguments and the code simply don't
run in regular Blender operation.

The code seems a bit duplicated here across old and new
depsgraph, but think it's OK since the old depsgraph is already
gone in 2.8 branch and i don't see where else we might want
to use such a single-threaded scheduler.

When/if we'll want to do so, we can move it to a centralized
single-threaded scheduler in threads.c.

OpenGL render was a bit more tricky to port, but basically we
are using conditional variables to wait background thread to
do all the job.

4 years agoFix typo in command line arg list
Aaron Carlisle [Tue, 7 Mar 2017 14:07:58 +0000 (09:07 -0500)]
Fix typo in command line arg list

4 years agoUpdate keymap presets for recent transform manipulator changes
Julian Eisel [Tue, 7 Mar 2017 10:54:10 +0000 (11:54 +0100)]
Update keymap presets for recent transform manipulator changes

Part of T50565.

4 years agoOnce more T50565: Allow using planar constraints for scale manipulator
Julian Eisel [Tue, 7 Mar 2017 10:23:07 +0000 (11:23 +0100)]
Once more T50565: Allow using planar constraints for scale manipulator

4 years agoRigid body: fix viewport not updating on properties change.
Clément Foucault [Mon, 6 Mar 2017 15:25:26 +0000 (16:25 +0100)]
Rigid body: fix viewport not updating on properties change.

4 years agoFix width calculation for split layouts
raa [Mon, 6 Mar 2017 13:35:56 +0000 (16:35 +0300)]
Fix width calculation for split layouts

4 years agoCycles: Fix strict -Wpedantic warnings with GCC
Sergey Sharybin [Mon, 6 Mar 2017 13:16:45 +0000 (14:16 +0100)]
Cycles: Fix strict -Wpedantic warnings with GCC

Patch by Stefan Werner, thanks!

4 years agoTask scheduler: Cleanup, use BLI_assert() instead of assert()
Sergey Sharybin [Mon, 6 Mar 2017 10:33:27 +0000 (11:33 +0100)]
Task scheduler: Cleanup, use BLI_assert() instead of assert()

4 years agoFFmpeg: Update for the deprecated API in 3.2.x
Sergey Sharybin [Mon, 6 Mar 2017 09:34:57 +0000 (10:34 +0100)]
FFmpeg: Update for the deprecated API in 3.2.x

Should be no functional changes.

4 years agoSurface Deform Modifier: Respect object transforms at bind time
Luca Rood [Mon, 6 Mar 2017 05:40:29 +0000 (02:40 -0300)]
Surface Deform Modifier: Respect object transforms at bind time

This slightly changes SDef behavior, by now respecting object transforms
at bind time, thus not requiring the objects to be aligned in their
respective local spaces, but instead using world space.

4 years agoMulti-View: Map cursor coordinates to visual coordinates
Julian Eisel [Sun, 5 Mar 2017 23:40:48 +0000 (00:40 +0100)]
Multi-View: Map cursor coordinates to visual coordinates

When rendering multi-view in side-by-side or top-bottom mode, we squash
the UI to half of its size and draw it twice on screen. That means the
cursor coordinates used for UI interaction don't match what's visible on
This commit is a little event system hack (tm) to fix this. It has some
small glitches with cursor grabbing, but nothing to bad.
We'll also use it for viewport HMD support.

D1350, thanks for the feedback @dfelinto!

4 years agoCMake: confine WIN32 options
Campbell Barton [Sun, 5 Mar 2017 17:05:00 +0000 (04:05 +1100)]
CMake: confine WIN32 options

4 years agoCleanup: typos
Campbell Barton [Sun, 5 Mar 2017 12:13:40 +0000 (23:13 +1100)]
Cleanup: typos

4 years agoBMesh: Add 'cut' separate mode for intersect tool
Campbell Barton [Sun, 5 Mar 2017 12:20:04 +0000 (23:20 +1100)]
BMesh: Add 'cut' separate mode for intersect tool

It was only possible to separate all geometry from an intersection or none.

Made this into an enum with a 3rd option to 'Cut', (now default)
which keeps each side of the intersection separate
without splitting faces in half.

4 years agoFix T50855: Intersect (knife) w/o separate doesn't select
Campbell Barton [Sun, 5 Mar 2017 11:23:12 +0000 (22:23 +1100)]
Fix T50855: Intersect (knife) w/o separate doesn't select

4 years agoFix T50843: Pitched Audio renders incorrectly in VSE
Jörg Müller [Sun, 5 Mar 2017 11:19:32 +0000 (12:19 +0100)]
Fix T50843: Pitched Audio renders incorrectly in VSE

There was a bug in the intended code behaviour to always seek with a
pitch of 1.0 regardless of pitch/pitch animation/doppler effects.

Check the bug report for a more detailed explanation of problems
concerning pitch and seeking.

4 years agoBLI_rect: add init from point functions
Campbell Barton [Sun, 5 Mar 2017 09:51:23 +0000 (20:51 +1100)]
BLI_rect: add init from point functions

Initialize a rectangle from point+size.

4 years agoFix T50838: Surface Deform DM use after free issue
Luca Rood [Sat, 4 Mar 2017 06:16:50 +0000 (03:16 -0300)]
Fix T50838: Surface Deform DM use after free issue

Implementd fix suggested by @sergey in T50838.

4 years agoCleanup: expose struct for ED_view3d_mats_rv3d_*
Campbell Barton [Sat, 4 Mar 2017 02:32:40 +0000 (13:32 +1100)]
Cleanup: expose struct for ED_view3d_mats_rv3d_*

4 years agoFix own previous commit, sorry about that :(
Bastien Montagne [Fri, 3 Mar 2017 16:23:22 +0000 (17:23 +0100)]
Fix own previous commit, sorry about that :(

4 years agoGet rid of `BLI_task_pool_stop()`.
Bastien Montagne [Fri, 3 Mar 2017 16:16:39 +0000 (17:16 +0100)]
Get rid of `BLI_task_pool_stop()`.

Comments said that function was supposed to 'stop worker threads', but
it absolutely did not do anything like that, was merely wiping out TODO
queue of tasks from given pool (kind of subset of what
`BLI_task_pool_cancel()` does).

Misleading, and currently useless, we can always add it back if we need
it some day, but for now we try to simplify that area.

4 years agoFix ugly mistake in BLI_task - freeing while some tasks are still being processed.
Bastien Montagne [Fri, 3 Mar 2017 16:12:03 +0000 (17:12 +0100)]
Fix ugly mistake in BLI_task - freeing while some tasks are still being processed.

Freeing pool was calling `BLI_task_pool_stop()`, which only clears
pool's tasks that are in TODO queue, whithout ensuring no more tasks
from that pool are being processed in worker threads.

This could lead to use-after-free random (and seldom) crashes.

Now use instead `BLI_task_pool_cancel()`, which does waits for all tasks
being processed to finish, before returning.

4 years agoUpdate comment which was remained in an old place
Sergey Sharybin [Fri, 3 Mar 2017 15:36:21 +0000 (16:36 +0100)]
Update comment which was remained in an old place

4 years agoCleanup: Indentation
Sergey Sharybin [Fri, 3 Mar 2017 14:53:02 +0000 (15:53 +0100)]
Cleanup: Indentation

4 years agoFix T50842: NLA Influence Curve draws out of bounds when it exceeds the 0-1 range
Joshua Leung [Fri, 3 Mar 2017 12:24:21 +0000 (01:24 +1300)]
Fix T50842: NLA Influence Curve draws out of bounds when it exceeds the 0-1 range

4 years agoCleanup: GPU_select never took NULL rect
Campbell Barton [Fri, 3 Mar 2017 04:40:54 +0000 (15:40 +1100)]
Cleanup: GPU_select never took NULL rect

4 years agoCleanup: redundant header, use const, short -> bool
Campbell Barton [Wed, 1 Mar 2017 15:14:02 +0000 (02:14 +1100)]
Cleanup: redundant header, use const, short -> bool

4 years agoWhen creating texture/image in Texture Paint mode, both datablocks should get the...
Bastien Montagne [Fri, 3 Mar 2017 09:47:22 +0000 (10:47 +0100)]
When creating texture/image in Texture Paint mode, both datablocks should get the same name

The paint slot name was not the same as what is displayed on the texture properties panel.
Instead, the slot type (e.g. "Diffuse Color") was used as the name.

Patch by Suchaaver (@minifigmaster125) with minor changes from @mont29.

Reviewers: mont29, sergey

Maniphest Tasks: T50704

Differential Revision:

4 years agoCycles: Fix possibly uninitialized variable
Sergey Sharybin [Fri, 3 Mar 2017 09:09:42 +0000 (10:09 +0100)]
Cycles: Fix possibly uninitialized variable

Hopefully this was a reason of randomly disappearing textures in our renders.

4 years agoFix T49655: Reloading library breaks proxies.
Bastien Montagne [Fri, 3 Mar 2017 07:52:19 +0000 (08:52 +0100)]
Fix T49655: Reloading library breaks proxies.

Can't say enough how much I hate those proxies... their duality (sharing
some aspects of both direct *and* indirect users) is a nightmare to handle. :(

4 years agoFix own stupid mistake in recent mesh 'split_faces' rework.
Bastien Montagne [Thu, 2 Mar 2017 16:22:03 +0000 (17:22 +0100)]
Fix own stupid mistake in recent mesh 'split_faces' rework.

Was assigning new edge index to ml_prev->e, and then assigning ml_pre->e
to orig_index...

4 years agoFix duplicated 'Accurate' property for manipulator keymap item
Julian Eisel [Thu, 2 Mar 2017 12:39:01 +0000 (13:39 +0100)]
Fix duplicated 'Accurate' property for manipulator keymap item

Is already added through Transform_Properties

4 years agoFix weird "use_planar_constraint" button in redo panel
Julian Eisel [Thu, 2 Mar 2017 12:23:00 +0000 (13:23 +0100)]
Fix weird "use_planar_constraint" button in redo panel

Issue was that the VIEW_OT_manipulator operator calls the transform
operators and passes them it's own operator properties. That means the
transform operator got properties passed that it doesn't have.

4 years agoThreads: Use atomics instead of spin when entering threaded malloc
Sergey Sharybin [Thu, 2 Mar 2017 08:56:25 +0000 (09:56 +0100)]
Threads: Use atomics instead of spin when entering threaded malloc

4 years agoFix another part of T50565: Planar constraints were always initialized to accurate...
Sergey Sharybin [Thu, 2 Mar 2017 11:18:07 +0000 (12:18 +0100)]
Fix another part of T50565: Planar constraints were always initialized to accurate transform

Now it is defined by keymap.

4 years agoFix second part T50565: Using planar transform once makes it enabled by default
Sergey Sharybin [Thu, 2 Mar 2017 10:20:57 +0000 (11:20 +0100)]
Fix second part T50565: Using planar transform once makes it enabled by default

Was caused by property being saved by the operator manager.

4 years agoFix T50830: Wrong context when calling surfacedeform_bind
Luca Rood [Wed, 1 Mar 2017 20:56:10 +0000 (17:56 -0300)]
Fix T50830: Wrong context when calling surfacedeform_bind

The custom poll function for surfacedeform_bind seems to have caused
issues when calling it from Python. Fixed by using the generic modifier
poll function, and setting the button to be active or not in the
Python UI code instead. (there might be a better way, but for now this
works fine)

4 years agoCorrect comment
Aaron Carlisle [Wed, 1 Mar 2017 19:12:03 +0000 (14:12 -0500)]
Correct comment

Thanks to @dingto for noticing.

4 years agoCleanup: Use .enabled instead of .active
Aaron Carlisle [Wed, 1 Mar 2017 18:05:34 +0000 (13:05 -0500)]
Cleanup: Use .enabled instead of .active

4 years agoFix T50565: Planar constraints don't work properly with non-Blender key configurations
Sergey Sharybin [Wed, 1 Mar 2017 16:57:22 +0000 (17:57 +0100)]
Fix T50565: Planar constraints don't work properly with non-Blender key configurations

The issue was introduced by 4df75e5 and seems we just need to explicitly
add new keymap item now.

There is still some difference from old behavior, which is planar transform
is using precision movement since e138cde and here i don't see nice solution
currently: the change was requested here in the studio and it's just a
conflict in picking shift key for something which is not supposed to be

At least now it's possible to invoke planar constraint and simply unhold

4 years agoTask scheduler: Remove query for the pool's number of threads
Sergey Sharybin [Wed, 1 Mar 2017 11:51:51 +0000 (12:51 +0100)]
Task scheduler: Remove query for the pool's number of threads

Not really happy of per-pool threads limit, need to find better
approach to that. But at least it's possible to get rid of half
of the nastyness here by removing getter which was only used in
an assert statement.

That piece of code was already well-tested and this code becomes
obsolete in the new depsgraph and does no longer exists in blender
2.8 branch.

4 years agoAll drop-down buttons should use the same width
raa [Wed, 1 Mar 2017 16:30:18 +0000 (19:30 +0300)]
All drop-down buttons should use the same width

4 years agoCleanup: code-style, duplicate header
Campbell Barton [Wed, 1 Mar 2017 13:16:36 +0000 (00:16 +1100)]
Cleanup: code-style, duplicate header

4 years agoFix text and icon positioning issues
raa [Wed, 1 Mar 2017 13:11:21 +0000 (16:11 +0300)]
Fix text and icon positioning issues

4 years agoTask scheduler: Remove counter of done tasks
Sergey Sharybin [Wed, 1 Mar 2017 11:45:51 +0000 (12:45 +0100)]
Task scheduler: Remove counter of done tasks

This was only used for progress report, and it's wrong because:

- Pool might in theory be re-used by different tasks
- We should not make any decision based on scheduling stats

Proper way is to take care of progress by the task itself.

4 years agoCleanup: Use explicit unsigned int in atomics
Sergey Sharybin [Wed, 1 Mar 2017 11:01:19 +0000 (12:01 +0100)]
Cleanup: Use explicit unsigned int in atomics

4 years agoCleanup: update copyright and Blender description
Aaron Carlisle [Tue, 28 Feb 2017 16:59:18 +0000 (11:59 -0500)]
Cleanup: update copyright and Blender description

4 years agoCycles: Fix division by zero in volume code which was producing -nan
Sergey Sharybin [Tue, 28 Feb 2017 16:33:06 +0000 (17:33 +0100)]
Cycles: Fix division by zero in volume code which was producing -nan

4 years agoFix/workaround T48549: Crash baking high-to-low-poly normal map in cycles
Sergey Sharybin [Tue, 28 Feb 2017 13:08:33 +0000 (14:08 +0100)]
Fix/workaround T48549: Crash baking high-to-low-poly normal map in cycles

For now only prevent crash.

4 years agoFix T49936: Cycles point density get's it's bounding box from basis shape key
Sergey Sharybin [Tue, 28 Feb 2017 11:39:40 +0000 (12:39 +0100)]
Fix T49936: Cycles point density get's it's bounding box from basis shape key

4 years agoCleanup: Grey --> Gray
Aaron Carlisle [Tue, 28 Feb 2017 00:33:57 +0000 (19:33 -0500)]
Cleanup: Grey --> Gray

4 years agoSurface Deform Modifier (SDef)
Luca Rood [Mon, 27 Feb 2017 15:39:14 +0000 (12:39 -0300)]
Surface Deform Modifier (SDef)

Implementation of the SDef modifier, which allows meshes to be bound by
surface, thus allowing things such as cloth simulation proxies.

User documentation:

Reviewers: mont29, sergey

Subscribers: Severin, dfelinto, plasmasolutions, kjym3

Differential Revision:

4 years agoFix memory leak when making duplicates real and parent had constraints
Sergey Sharybin [Mon, 27 Feb 2017 16:46:21 +0000 (17:46 +0100)]
Fix memory leak when making duplicates real and parent had constraints

Thanks Bastien for help!

4 years agoFix/workaround T50677: Shrinkwrap constraint don't get updated when target mesh gets...
Sergey Sharybin [Mon, 27 Feb 2017 15:27:53 +0000 (16:27 +0100)]
Fix/workaround T50677: Shrinkwrap constraint don't get updated when target mesh gets modified

Do a "full" update on leaving sculpt mode, so we are sure scene will be brought
to a consistent state.

Ideally we'll only do that when there are objects which depends on geometry
without re-calculating self geometry, but that's a bit tricky currently.

4 years agoSimilar to previous commit, but for object constraints
Sergey Sharybin [Mon, 27 Feb 2017 15:19:52 +0000 (16:19 +0100)]
Similar to previous commit, but for object constraints

4 years agoDepsgraph: Shrinkwrap constraint actually depends on geometry
Sergey Sharybin [Mon, 27 Feb 2017 15:00:39 +0000 (16:00 +0100)]
Depsgraph: Shrinkwrap constraint actually depends on geometry

4 years agoCycles: Fix compilation error on vanilla Ubuntu 16.10
Sergey Sharybin [Mon, 27 Feb 2017 14:22:51 +0000 (15:22 +0100)]
Cycles: Fix compilation error on vanilla Ubuntu 16.10

Patch by @swerner, thanks!

4 years agoFix T50634: Hair Primitive as Triangles + Hair shader with a texture = crash
Sergey Sharybin [Mon, 27 Feb 2017 14:11:51 +0000 (15:11 +0100)]
Fix T50634: Hair Primitive as Triangles + Hair shader with a texture = crash

Attributes were not resized after pushing new triangles to the mesh.

4 years agoFix part of T50634: Hair Primitive as Triangles + Hair shader with a texture = crash
Sergey Sharybin [Mon, 27 Feb 2017 12:39:23 +0000 (13:39 +0100)]
Fix part of T50634: Hair Primitive as Triangles + Hair shader with a texture = crash

Wrong formula was used to calculate needed verts and tris to be reserved.

4 years agoCycles: Make it more clear values never changes by using const qualifier
Sergey Sharybin [Mon, 27 Feb 2017 12:30:11 +0000 (13:30 +0100)]
Cycles: Make it more clear values never changes by using const qualifier

4 years agoCleanup: typo in struct name
Campbell Barton [Mon, 27 Feb 2017 09:44:59 +0000 (20:44 +1100)]
Cleanup: typo in struct name

4 years agoCycles: Forgot this in previous commit
Sergey Sharybin [Mon, 27 Feb 2017 11:54:35 +0000 (12:54 +0100)]
Cycles: Forgot this in previous commit

4 years agoCycles: Add more logs about what's going on in shader optimization
Sergey Sharybin [Mon, 27 Feb 2017 11:38:24 +0000 (12:38 +0100)]
Cycles: Add more logs about what's going on in shader optimization

4 years agoCycles: Experiment with replacing Sharp Glossy with GGX when Filter Glossy is used
Sergey Sharybin [Wed, 14 Dec 2016 11:22:57 +0000 (12:22 +0100)]
Cycles: Experiment with replacing Sharp Glossy with GGX when Filter Glossy is used

The idea is to make it simpler to remove noise from scenes when some prop uses
Sharp glossy closure and causes noise in certain cases. Previously Sharp Glossy
was not affected by Filter Glossy at all, which was quite confusing.

Here is a file which demonstrates the issue: {F417797}

After applying the patch all the noise from the scene is gone.

This change also solves fireflies reported in T50700.

Reviewers: brecht, lukasstockner97

Differential Revision:

4 years agoFix missing break setting curve auto-handles
Campbell Barton [Mon, 27 Feb 2017 02:32:45 +0000 (13:32 +1100)]
Fix missing break setting curve auto-handles

4 years agoFix unreported bug: Ensure you have the correct array directory even after the `dm...
Germano Cavalcante [Sun, 26 Feb 2017 17:16:54 +0000 (14:16 -0300)]
Fix unreported bug: Ensure you have the correct array directory even after the `dm->release(dm)`

4 years agoImprove add-on UI error message
Campbell Barton [Sun, 26 Feb 2017 16:54:12 +0000 (03:54 +1100)]
Improve add-on UI error message

Show the paths of the duplicate addons

D791 by @gregzaal

4 years agoCleanup: minor changes to array_store
Campbell Barton [Sun, 26 Feb 2017 04:25:19 +0000 (15:25 +1100)]
Cleanup: minor changes to array_store

- remove unused struct member.
- misleading variable name.

4 years agoFix compiling after a0b8a9f
Jens Verwiebe [Sat, 25 Feb 2017 13:58:08 +0000 (14:58 +0100)]
Fix compiling after a0b8a9f

4 years agoFix (unreported) missing update when adding constraint from RNA.
Bastien Montagne [Sat, 25 Feb 2017 10:27:11 +0000 (11:27 +0100)]
Fix (unreported) missing update when adding constraint from RNA.

4 years agoFix rows with fixed last item (D2524)
raa [Sat, 25 Feb 2017 10:18:41 +0000 (13:18 +0300)]
Fix rows with fixed last item (D2524)

4 years agoAlembic: avoid crashing when reading non-indexed UV params.
Kévin Dietrich [Sat, 25 Feb 2017 06:08:14 +0000 (07:08 +0100)]
Alembic: avoid crashing when reading non-indexed UV params.

4 years agoAlembic: addition of a scope timer to perform basic profiling.
Kévin Dietrich [Sat, 25 Feb 2017 05:18:32 +0000 (06:18 +0100)]
Alembic: addition of a scope timer to perform basic profiling.

4 years agoFix T50698: Cycles baking artifacts with transparent surfaces.
Brecht Van Lommel [Sat, 25 Feb 2017 02:09:02 +0000 (03:09 +0100)]
Fix T50698: Cycles baking artifacts with transparent surfaces.

4 years agoFix build error with macOS / clang / c++11.
Brecht Van Lommel [Sat, 25 Feb 2017 01:35:53 +0000 (02:35 +0100)]
Fix build error with macOS / clang / c++11.