3 years agoCleanup: code style & cmake
Campbell Barton [Sat, 11 Mar 2017 15:40:04 +0000 (02:40 +1100)]
Cleanup: code style & cmake

3 years agoAdd support for Objects in Drive variable `Rotational Difference`
Germano Cavalcante [Sat, 11 Mar 2017 13:43:23 +0000 (10:43 -0300)]
Add support for Objects in Drive variable `Rotational Difference`

Thus it is according to the Manual

3 years agoBMesh: Fix BM_face_loop_separate_multi
Campbell Barton [Sat, 11 Mar 2017 12:21:37 +0000 (23:21 +1100)]
BMesh: Fix BM_face_loop_separate_multi

When the loop region passed in had no loops to edge-split from,
it was assumed nothing needed to be done.

This ignored the case where loops share a vertex
without any shared edges.

Now BM_face_loop_separate_multi behaves like BM_face_loop_separate.

Fixed error where faces remained connected by verts in BM_mesh_separate_faces.

3 years agoCorrect recent bmesh separate addition
Campbell Barton [Sat, 11 Mar 2017 12:19:49 +0000 (23:19 +1100)]
Correct recent bmesh separate addition

- Was setting flag incorrectly to avoid re-use.
- Check edge has loops before accessing.

3 years agoFix T50888: Numeric overflow in split kernel state buffer size calculation
Mai Lavelle [Sat, 11 Mar 2017 10:23:11 +0000 (05:23 -0500)]
Fix T50888: Numeric overflow in split kernel state buffer size calculation

Overflow led to the state buffer being too small and the split kernel to
get stuck doing nothing forever.

3 years agoBMesh: add BM_mesh_separate_faces
Campbell Barton [Sat, 11 Mar 2017 09:39:28 +0000 (20:39 +1100)]
BMesh: add BM_mesh_separate_faces

Fast-path for bmesh split operator which duplicates and deletes.
Use when only separating faces, currently used by the intersect tool.

3 years agoMakefile: set tab width=4
Campbell Barton [Sat, 11 Mar 2017 06:14:39 +0000 (17:14 +1100)]
Makefile: set tab width=4

3 years agoFix text and icon positioning issue on high DPI, after recent changes in 32c5f3d.
Brecht Van Lommel [Sat, 11 Mar 2017 03:46:27 +0000 (04:46 +0100)]
Fix text and icon positioning issue on high DPI, after recent changes in 32c5f3d.

3 years agoFix OpenCL warnings about doubles on some platforms.
Brecht Van Lommel [Fri, 10 Mar 2017 23:55:23 +0000 (00:55 +0100)]
Fix OpenCL warnings about doubles on some platforms.

3 years agoBreakdowner - Constrain Transform and Axis
Joshua Leung [Fri, 10 Mar 2017 22:52:58 +0000 (11:52 +1300)]
Breakdowner - Constrain Transform and Axis

This commit adds new features to the breakdowner, giving animators more
control over what gets interpolated by the breakdowner. Specifically:

   "Just as G R S let you move rotate scale, and then X Y Z let you do that
   in one desired axis, when using the Breakdower it would be great to be
   able to add GRS and XYZ to constrain what transform / axis is being

As requested here:

* In addition to G/R/S, there's also B (Bendy Bone settings and C (custom properties)
* Pressing G/R/S/B/C or X/Y/Z again will turn these constraints off again

3 years agorBa81ea408367abe2f33b351ff6dcc6b09170fd088 "object" -> "target"
Germano Cavalcante [Fri, 10 Mar 2017 16:54:06 +0000 (13:54 -0300)]
rBa81ea408367abe2f33b351ff6dcc6b09170fd088 "object" -> "target"

3 years agofix T50899: Even though the Shrinkwrap options hide the possibility of using a non...
Germano Cavalcante [Fri, 10 Mar 2017 16:51:04 +0000 (13:51 -0300)]
fix T50899: Even though the Shrinkwrap options hide the possibility of using a non-mesh target, you can still circumvent this... Causing Crash

3 years agoCorrect glPixelTransfer function
Campbell Barton [Fri, 10 Mar 2017 16:02:03 +0000 (03:02 +1100)]
Correct glPixelTransfer function

3 years agoFix T50900: Text-Blocks created from "Edit Source" have zero users.
Bastien Montagne [Fri, 10 Mar 2017 14:41:14 +0000 (15:41 +0100)]
Fix T50900: Text-Blocks created from "Edit Source" have zero users.

3 years agoFix useless allocation of edge_vectors in threaded case of loop split generation.
Bastien Montagne [Tue, 7 Mar 2017 13:19:14 +0000 (14:19 +0100)]
Fix useless allocation of edge_vectors in threaded case of loop split generation.

3 years agoCycles: Cleanup, extra semicolon and space
Sergey Sharybin [Fri, 10 Mar 2017 14:34:54 +0000 (15:34 +0100)]
Cycles: Cleanup, extra semicolon and space

3 years agoAdjust kmi header
raa [Fri, 10 Mar 2017 12:10:40 +0000 (15:10 +0300)]
Adjust kmi header

3 years agoCleanup: struct flags for select picking
Campbell Barton [Fri, 10 Mar 2017 10:47:43 +0000 (21:47 +1100)]
Cleanup: struct flags for select picking

3 years agoCleanup: rename drawObjectSelect
Campbell Barton [Fri, 10 Mar 2017 10:27:33 +0000 (21:27 +1100)]
Cleanup: rename drawObjectSelect

After adding draw_object_select, noticed a similar name.
Rename drawObjectSelect to draw_object_selected_outline.

3 years agoFix T47690: Connected PET w/ individual origins
Campbell Barton [Fri, 10 Mar 2017 09:18:19 +0000 (20:18 +1100)]
Fix T47690: Connected PET w/ individual origins

- Connectivity length was overwritten by distance to closest selected.
- Vertices used the 'island' center of the closest vertex,
  even if it wasn't connected.

Now optionally keep track of the original index of used as the closest
connected distance.

To support this needed to add optional support for islands of 1 vertex.

3 years agoCycles: Enable SSS and volumes for CUDA and Nvidia OpenCL split kernel
Mai Lavelle [Fri, 10 Mar 2017 07:09:41 +0000 (02:09 -0500)]
Cycles: Enable SSS and volumes for CUDA and Nvidia OpenCL split kernel

3 years agoFix T50904: Imprecise timeline frame selection using mouse
Joshua Leung [Fri, 10 Mar 2017 00:38:02 +0000 (13:38 +1300)]
Fix T50904: Imprecise timeline frame selection using mouse

The changes introduced in rB3e628eefa9f55fac7b0faaec4fd4392c2de6b20e
made the non-subframe frame change behaviour less intuitive, by always
truncating downwards, instead of rounding to the nearest frame instead.
This made the UI a lot less forgiving of pointing precision errors
(for example, as a result of hand shake, or using a tablet on a highres scren)

This commit restores the old behaviour in this case only (subframe inspection
isn't affected by these changes)

3 years ago3D View: x-ray support for depth picking
Campbell Barton [Thu, 9 Mar 2017 16:15:58 +0000 (03:15 +1100)]
3D View: x-ray support for depth picking

Selection loop would draw the selection ignoring xray.
Now draw in a separate pass after clearing the depth buffer,
as with regular drawing.

Also disable depth sorting,
caller can sort the hit-list by depth if needed.

3 years agoCycles: add single program debug option for split kernel
Hristo Gueorguiev [Wed, 8 Mar 2017 16:56:06 +0000 (17:56 +0100)]
Cycles: add single program debug option for split kernel

Single program generally compiles kernels faster (2-3 times), loads faster,
takes less drive space (2-3 times), and reduces the number of cached kernels.

3 years agoCycles: split kernel_shadow_blocked to AO & DL parts
Hristo Gueorguiev [Wed, 8 Mar 2017 16:39:40 +0000 (17:39 +0100)]
Cycles: split kernel_shadow_blocked to AO & DL parts

Reduces memory allocation for split kernel.

This allows for faster rendering due to bigger global size,
specially when GPU memory is limited.

Perfromance results:

                         R9 290 total render time
                        Before    After   Change
BMW                      4:37      4:34   -1.1 %
Classroom               14:43     14:30   -1.5 %
Fishy Cat               11:20     11:04   -2.4 %
Koro                    12:11     12:04   -1.0 %
Pabellon Barcelona      22:01     20:44   -5.8 %
Pabellon Barcelona(*)   15:32     15:09   -2.5 %

(*) without glossy connected to volume

3 years agoCycles: Speedup transparent shadows in split kernel
Hristo Gueorguiev [Wed, 8 Mar 2017 15:26:39 +0000 (16:26 +0100)]
Cycles: Speedup transparent shadows in split kernel

This commit enables record-all transparent shadows rays.

Perfromance results:

               R9 290 render time (without synchronization), seconds
                        Before    After   Change
BMW                      261.5    262.5   +0.4 %
Classroom                869.6    867.3   -0.3 %
Fishy Cat                657.4    639.8   -2.7 %
Koro                    1909.8    692.8  -63.7 %
Pabellon Barcelona      1633.3   1238.0  -24.2 %
Pabellon Barcelona(*)   1158.1    903.8  -22.0 %

(*) without glossy connected to volume

3 years agoCycles: SSS and Volume rendering in split kernel
Hristo Gueorguiev [Wed, 8 Mar 2017 14:42:26 +0000 (15:42 +0100)]
Cycles: SSS and Volume rendering in split kernel

Decoupled ray marching is not supported yet.

Transparent shadows are always enabled for volume rendering.

Changes in kernel/bvh and kernel/geom are from Sergey.
This simiplifies code significantly, and prepares it for
record-all transparent shadow function in split kernel.

3 years agoRemove (ifdef) draw_documentation from text_draw.c
Dalai Felinto [Thu, 9 Mar 2017 16:02:32 +0000 (17:02 +0100)]
Remove (ifdef) draw_documentation from text_draw.c

This was no longer supported.

3 years ago3D View: wrap GPU_select cache calls
Campbell Barton [Thu, 9 Mar 2017 09:47:37 +0000 (20:47 +1100)]
3D View: wrap GPU_select cache calls

Avoids including GPU_select and makes it more clear that the cache is
needed for view3d_opengl_select calls.

Also use typed enum for select mode.

3 years ago3D View: use cache for armature select
Campbell Barton [Wed, 8 Mar 2017 22:22:56 +0000 (09:22 +1100)]
3D View: use cache for armature select

3 years agoCycles: Fix CUDA build error for some compilers
Mai Lavelle [Wed, 8 Mar 2017 21:44:43 +0000 (16:44 -0500)]
Cycles: Fix CUDA build error for some compilers

Needed to include `util_types.h` before using `uint`.

3 years ago3D View: new nethod of opengl selection
Campbell Barton [Wed, 8 Mar 2017 18:17:55 +0000 (05:17 +1100)]
3D View: new nethod of opengl selection

Intended to replace legacy GL_SELECT, without the limitations of
sample queries which can't access depth information.

which access the depth buffers to detect whats under the pointer,
so initial selection is always the closest item.

The performance of this method depends a lot on the OpenGL
implementations glReadPixels.

Since reading depth can be slow, buffers are cached for object picking
so selecting re-uses depth data, performing 1 draw instead of 3
(for 24, 18, 10 px regions, picking with many items under the pointer).

Occlusion queries draw twice when picking nearest,
so worst case 6x draw calls per selection.

Even with these improvements occlusion queries is faster on AMD hardware.

Depth selection is disabled by default, toggle option under select method.
May enable by default if this works well on different hardware.

Reviewed as D2543

3 years agoFix T50849: Transparent background produces artifacts in this compositing setup
Sergey Sharybin [Wed, 8 Mar 2017 14:56:50 +0000 (15:56 +0100)]
Fix T50849: Transparent background produces artifacts in this compositing setup

The issue was caused by sometimes negative color returned by the filter node.

Seems to be caused by precision issues. Don't see any reason why we would want
negative colors in output. Those only causing issues later on.

3 years agoCycles: Make it more obvious message which initialization failed
Sergey Sharybin [Wed, 8 Mar 2017 12:57:21 +0000 (13:57 +0100)]
Cycles: Make it more obvious message which initialization failed

3 years agoFix T49603: Blender/Cycles 2.78 CUDA error on Jetson-TX1~
Sergey Sharybin [Wed, 8 Mar 2017 12:38:01 +0000 (13:38 +0100)]
Fix T49603: Blender/Cycles 2.78 CUDA error on Jetson-TX1~

Patch by Bruno d'Arcangeli (@arcangeli), thanks!

3 years agoOpenGL Select: integer rect for passing region
Campbell Barton [Wed, 8 Mar 2017 12:22:42 +0000 (23:22 +1100)]
OpenGL Select: integer rect for passing region

3 years agoCleanup: replace short -> int for selection hits
Campbell Barton [Wed, 8 Mar 2017 12:15:12 +0000 (23:15 +1100)]
Cleanup: replace short -> int for selection hits

3 years agoRename BLI_rct*_init_pt_size -> radius
Campbell Barton [Wed, 8 Mar 2017 12:10:31 +0000 (23:10 +1100)]
Rename BLI_rct*_init_pt_size -> radius

3 years agoCycles: Use 1-based line number for #line directives
Sergey Sharybin [Wed, 8 Mar 2017 11:45:18 +0000 (12:45 +0100)]
Cycles: Use 1-based line number for #line directives

AMD CPU platform was complaining about #line 0 directives in the code.

3 years agoCycles: Log which device kernels are being loaded for
Sergey Sharybin [Wed, 8 Mar 2017 11:33:51 +0000 (12:33 +0100)]
Cycles: Log which device kernels are being loaded for

3 years agoCycles: Make it possible to access KernelGlobals from split data initialization function
Sergey Sharybin [Wed, 8 Mar 2017 10:02:54 +0000 (11:02 +0100)]
Cycles: Make it possible to access KernelGlobals from split data initialization function

3 years agoCycles: Cleanup, remove residue of previous split kernel data
Sergey Sharybin [Wed, 8 Mar 2017 09:26:29 +0000 (10:26 +0100)]
Cycles: Cleanup, remove residue of previous split kernel data

This is all in split data state array.

3 years agoFix T50886: Blender crashes on render
Sergey Sharybin [Wed, 8 Mar 2017 08:41:38 +0000 (09:41 +0100)]
Fix T50886: Blender crashes on render

Was a mistake in one of the previous TLS commits.

See comment in the pool_create to see some details why it was crashing.

3 years agoupdate theme back to black re: T50869
meta-androcto [Wed, 8 Mar 2017 07:31:24 +0000 (18:31 +1100)]
update theme back to black re: T50869

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

3 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

3 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.

3 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.

3 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.

3 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.

3 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.

3 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.

3 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

3 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.

3 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

3 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

3 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

3 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

3 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.

3 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

3 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.

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

3 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.

3 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

3 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

3 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.

3 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.

3 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.

3 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.

3 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.

3 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

3 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.

3 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

3 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.

3 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

3 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!

3 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()

3 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.

3 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.

3 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!

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

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

3 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.

3 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

3 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.

3 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.

3 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.

3 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_*

3 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 :(

3 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.

3 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.

3 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

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

3 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

3 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

3 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

3 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:

3 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.

3 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. :(

3 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...