3 years agoFix T53146: incomplete multi GPU and CPU + GPU memory statistics.
Brecht Van Lommel [Tue, 24 Oct 2017 14:59:17 +0000 (16:59 +0200)]
Fix T53146: incomplete multi GPU and CPU + GPU memory statistics.

Part due to recent changes, part old bug.

3 years agoCycles: Fix compilation in debug mode
Sergey Sharybin [Tue, 24 Oct 2017 10:09:02 +0000 (12:09 +0200)]
Cycles: Fix compilation in debug mode

Please check compilation before committing refactor changes!

3 years agoCycles: Fix compilation error without C++11
Sergey Sharybin [Tue, 24 Oct 2017 09:14:01 +0000 (11:14 +0200)]
Cycles: Fix compilation error without C++11

3 years agoCycles: Fix memory leak in test and simplify code
Sergey Sharybin [Tue, 24 Oct 2017 09:12:28 +0000 (11:12 +0200)]
Cycles: Fix memory leak in test and simplify code

3 years agoCycles: Fix test compilation failure after recent refactor
Sergey Sharybin [Tue, 24 Oct 2017 08:47:02 +0000 (10:47 +0200)]
Cycles: Fix test compilation failure after recent refactor

The test will leak CPU devices, but is all passing other than that.
Leak will be fixed shortly.

P.S. Committing code refactor without running regression tests, tsk ;)

3 years agoFix T53143: Knife Crash after Grid Fill
Campbell Barton [Tue, 24 Oct 2017 06:05:10 +0000 (17:05 +1100)]
Fix T53143: Knife Crash after Grid Fill

BM_ELEM_INTERNAL_TAG flag wasn't ensured to be cleared.

3 years agoFix BMesh PyAPI internal flag clearing logic
Campbell Barton [Tue, 24 Oct 2017 05:52:54 +0000 (16:52 +1100)]
Fix BMesh PyAPI internal flag clearing logic

Would leave the flag set on raising an exception.

3 years agoFix edge-split bmesh operator giving empty result
Campbell Barton [Tue, 24 Oct 2017 05:29:29 +0000 (16:29 +1100)]
Fix edge-split bmesh operator giving empty result

3 years agoFix T53130: NLA Tweak (moved) Tracks + Alt+RMB Select does not work in Graph Editor
Joshua Leung [Tue, 24 Oct 2017 03:27:21 +0000 (16:27 +1300)]
Fix T53130: NLA Tweak (moved) Tracks + Alt+RMB Select does not work in Graph Editor

3 years agoFix T53134: denoising with CPU + GPU render leaves some tiles noisy.
Brecht Van Lommel [Tue, 24 Oct 2017 02:07:24 +0000 (04:07 +0200)]
Fix T53134: denoising with CPU + GPU render leaves some tiles noisy.

3 years agoCode refactor: move more memory allocation logic into device API.
Brecht Van Lommel [Fri, 20 Oct 2017 23:09:59 +0000 (01:09 +0200)]
Code refactor: move more memory allocation logic into device API.

* Remove tex_* and pixels_* functions, replace by mem_*.
* Add MEM_TEXTURE and MEM_PIXELS as memory types recognized by devices.
* No longer create device_memory and call mem_* directly, always go
  through device_only_memory, device_vector and device_pixels.

3 years agoCode refactor: use device_only_memory and device_vector in more places.
Brecht Van Lommel [Mon, 23 Oct 2017 17:32:59 +0000 (19:32 +0200)]
Code refactor: use device_only_memory and device_vector in more places.

3 years agoCode refactor: store device/interp/extension/type in each device_memory.
Brecht Van Lommel [Fri, 20 Oct 2017 21:31:13 +0000 (23:31 +0200)]
Code refactor: store device/interp/extension/type in each device_memory.

3 years agoCode refactor: pass device to scene, check OSL with device info.
Brecht Van Lommel [Fri, 20 Oct 2017 03:08:26 +0000 (05:08 +0200)]
Code refactor: pass device to scene, check OSL with device info.

3 years agoVSE: draw grid lines at every second
Campbell Barton [Mon, 23 Oct 2017 11:27:21 +0000 (22:27 +1100)]
VSE: draw grid lines at every second

Was hard-coded to 25 frames.

D2893 by @jooert

3 years agoDocs: improve bmesh exception message
Campbell Barton [Mon, 23 Oct 2017 10:57:32 +0000 (21:57 +1100)]
Docs: improve bmesh exception message

Suggested in T53131

3 years agoCorrect gtest error in recent beautify change
Campbell Barton [Mon, 23 Oct 2017 03:20:35 +0000 (14:20 +1100)]
Correct gtest error in recent beautify change

3 years agoPolyfill Beautify: half-edge optimization
Campbell Barton [Sun, 22 Oct 2017 14:15:26 +0000 (01:15 +1100)]
Polyfill Beautify: half-edge optimization

Was using an edge hash for triangle -> edge lookups,
updating triangle indices for each edge-rotation.

Replace this with half-edge which can rotate edges much more simply,
writing triangles back once the solution has been calculated.

Gives ~33% speedup in own tests.

3 years agoCode refactor: avoid some unnecessary device memory copying.
Brecht Van Lommel [Fri, 20 Oct 2017 02:32:29 +0000 (04:32 +0200)]
Code refactor: avoid some unnecessary device memory copying.

3 years agoCode refactor: simplify image device memory allocation.
Brecht Van Lommel [Fri, 20 Oct 2017 02:20:37 +0000 (04:20 +0200)]
Code refactor: simplify image device memory allocation.

3 years agoFix issue with resumable rendering in recent changes.
Brecht Van Lommel [Sat, 21 Oct 2017 18:57:31 +0000 (20:57 +0200)]
Fix issue with resumable rendering in recent changes.

3 years agoCycles: disable progressive refine if denoising or save buffers is used.
Brecht Van Lommel [Tue, 10 Oct 2017 00:28:23 +0000 (02:28 +0200)]
Cycles: disable progressive refine if denoising or save buffers is used.

Progressive refine undoes memory saving from save buffers, so enabling
both does not make much sense. Previously enabling progressive refine
would disable denoising, but it should be the other way around since
denoise actually affects the render result.

Includes some code refactor for progressive refine render buffers, and
avoids recomputing tiles for each progressive sample.

3 years agoCycles: combined CPU + GPU rendering support.
Brecht Van Lommel [Sat, 21 Oct 2017 16:58:59 +0000 (18:58 +0200)]
Cycles: combined CPU + GPU rendering support.

CPU rendering will be restricted to a BVH2, which is not ideal for raytracing
performance but can be shared with the GPU. Decoupled volume shading will be
disabled to match GPU volume sampling.

The number of CPU rendering threads is reduced to leave one core dedicated to
each GPU. Viewport rendering will also only use GPU rendering still. So along
with the BVH2 usage, perfect scaling should not be expected.

Go to User Preferences > System to enable the CPU to render alongside the GPU.

Differential Revision:

3 years agoMove & rename uiLayoutOperatorButs to interface_templates.c
Julian Eisel [Sat, 21 Oct 2017 14:47:25 +0000 (16:47 +0200)]
Move & rename uiLayoutOperatorButs to interface_templates.c

3 years agoCleanup: use relative imports in bl_ui
Campbell Barton [Sat, 21 Oct 2017 01:41:42 +0000 (12:41 +1100)]
Cleanup: use relative imports in bl_ui

3 years agoFix T53109: denoising variance debug passes not working after recent changes.
Brecht Van Lommel [Fri, 20 Oct 2017 11:52:03 +0000 (13:52 +0200)]
Fix T53109: denoising variance debug passes not working after recent changes.

3 years agoFix compositor node links getting lost on file load for custom render passes.
Brecht Van Lommel [Fri, 20 Oct 2017 12:35:12 +0000 (14:35 +0200)]
Fix compositor node links getting lost on file load for custom render passes.

3 years agoFix T46163: NLA properties with drivers aren't displayed as having drivers
Joshua Leung [Fri, 20 Oct 2017 04:04:57 +0000 (17:04 +1300)]
Fix T46163: NLA properties with drivers aren't displayed as having drivers

While such drivers will generally get evaluated too late to be of much
use during animations, it can still be useful to allow using drivers to
control a whole bunch of NLA strip properties (i.e. syncing NLA strip
timings via a single property/control).

Keyframe insertion however is still not allowed on these properties
(and an error message will now be displayed when trying to do so,
instead of silently failing), as it is useless.

3 years agoCleanup: redundant casts
Campbell Barton [Fri, 20 Oct 2017 03:03:22 +0000 (14:03 +1100)]
Cleanup: redundant casts

3 years agoCleanup: replace gpencil tri vars w/ array
Campbell Barton [Thu, 19 Oct 2017 22:28:12 +0000 (09:28 +1100)]
Cleanup: replace gpencil tri vars w/ array

3 years agoCorrect last commit, use WM_exit
Campbell Barton [Thu, 19 Oct 2017 13:19:58 +0000 (00:19 +1100)]
Correct last commit, use WM_exit

Without this temp directory isn't removed.

3 years agoExit with invalid command line arguments
Campbell Barton [Thu, 19 Oct 2017 12:57:03 +0000 (23:57 +1100)]
Exit with invalid command line arguments

Loading blender with an unknown name would interpret it as a blend file.

This meant passing `--arg` arguments would end up creating new
blend files which could be confusing if you made a typo on a command
line argument.

Now check the string has a blend file extension,
exiting if it doesn't.

3 years agoAllow non-initialized memory to be passed to BKE_id_copy_ex
Sergey Sharybin [Thu, 19 Oct 2017 11:55:08 +0000 (13:55 +0200)]
Allow non-initialized memory to be passed to BKE_id_copy_ex

This only applies when LIB_ID_CREATE_NO_ALLOCATE flag is used and guarantees
that non-memset-zero memory can be used (or, that same memory chunk might be
used over and over again without need to clean it from the calleer).

3 years agoAdd note about handling of root nodetree in ID copydata.
Bastien Montagne [Thu, 19 Oct 2017 10:31:58 +0000 (12:31 +0200)]
Add note about handling of root nodetree in ID copydata.

OUr beloved root nodetrees... Had to check again the code to undersand
why we copy them with bmain even though they are not in bmain, so this
is worth a comment. ;)

3 years agoCycles: Add extra logging in CUDA device detection code
Sergey Sharybin [Thu, 19 Oct 2017 09:26:10 +0000 (11:26 +0200)]
Cycles: Add extra logging in CUDA device detection code

3 years agoCleanup: redundant comments
Campbell Barton [Thu, 19 Oct 2017 05:19:07 +0000 (16:19 +1100)]
Cleanup: redundant comments

Class names are readable, no need for explanations of each one.

3 years agoUI: 3D View, object menu
Campbell Barton [Thu, 19 Oct 2017 05:09:21 +0000 (16:09 +1100)]
UI: 3D View, object menu

Changes from D2876 by @meta-androcto /w own edits

- Move "Relations" into own menu.

3 years agoUI: 3D View, undo menu reorganization
Campbell Barton [Thu, 19 Oct 2017 04:38:34 +0000 (15:38 +1100)]
UI: 3D View, undo menu reorganization

Changes from D2876 by @meta-androcto /w own edits

Move 3x undo items into Undo menu,
these are such common operations they're typically accessed by keys.

Also add to menus which didn't have undo
(seemed random which modes had undo, undo history in their menus).

3 years agoUI: 3D View, minor menu reorganization
Campbell Barton [Thu, 19 Oct 2017 04:10:41 +0000 (15:10 +1100)]
UI: 3D View, minor menu reorganization

Changes from D2876 by @meta-androcto

- Move "Delete" to the first menu item in most toplevel menus.
- Add separators.
- Consistent order of Undo/Redo

3 years agoUI: 3D View Mesh "Select" menu reorganization
Campbell Barton [Thu, 19 Oct 2017 03:45:56 +0000 (14:45 +1100)]
UI: 3D View Mesh "Select" menu reorganization

Changes from D2876 by @meta-androcto /w own edits

- Move "Select Linked" into own menu.
- Move "Select Loop" into own menu.

3 years agoUI: 3D View "View" menu reorganization
Campbell Barton [Thu, 19 Oct 2017 01:35:58 +0000 (12:35 +1100)]
UI: 3D View "View" menu reorganization

Changes from D2876 by @meta-androcto /w own edits

- Move view axis & camera selection into "Viewpoint" menu.
- Move render border and clipping into border menu.
- Move Camera operators into own menu.
- View Selected was located in two menus,
  Only expose the "use_all_regions" version when quad-view is used.

3 years agoCleanup: pep8/line length
Campbell Barton [Thu, 19 Oct 2017 00:24:01 +0000 (11:24 +1100)]
Cleanup: pep8/line length

3 years agoDocs: correct descriptions
Campbell Barton [Thu, 19 Oct 2017 00:09:27 +0000 (11:09 +1100)]
Docs: correct descriptions

3 years agoFix part of T53038: principled BSDF clearcoat weight has no effect with 0 roughness.
Brecht Van Lommel [Wed, 18 Oct 2017 21:11:16 +0000 (23:11 +0200)]
Fix part of T53038: principled BSDF clearcoat weight has no effect with 0 roughness.

3 years agoFix mistake in new ID copy code in 'no allocate' case.
Bastien Montagne [Wed, 18 Oct 2017 15:11:29 +0000 (17:11 +0200)]
Fix mistake in new ID copy code in 'no allocate' case.

Spotted by @sergey, thanks.

3 years agoFix wrong comment (leftover from dev time).
Bastien Montagne [Wed, 18 Oct 2017 14:55:33 +0000 (16:55 +0200)]
Fix wrong comment (leftover from dev time).

3 years agoCycles: Fix wrong shading when some mesh triangle has non-finite coordinate
Sergey Sharybin [Wed, 18 Oct 2017 10:19:53 +0000 (12:19 +0200)]
Cycles: Fix wrong shading when some mesh triangle has non-finite coordinate

This is fully unpredictable for artists when one damaged object makes the whole
scene to render incorrectly. This involves two main changes:

- It is not enough to check triangle bounds to be valid when building BVH.
  This is because triangle might have some finite vertices and some non-finite.

- We shouldn't add non-finite triangle area to the overall area for MIS.

3 years agoCleanup: Use const for RNA EnumPropertyItem args
Campbell Barton [Wed, 18 Oct 2017 04:07:26 +0000 (15:07 +1100)]
Cleanup: Use const for RNA EnumPropertyItem args

Practically all access to enum data is read-only.

3 years agoFix T53098, T53079: OpenCL world texture errors after recent changes.
Brecht Van Lommel [Wed, 18 Oct 2017 01:11:03 +0000 (03:11 +0200)]
Fix T53098, T53079: OpenCL world texture errors after recent changes.

3 years agoMake auto handle placement aware of cyclic extrapolation.
Alexander Gavrilov [Tue, 17 Oct 2017 16:39:10 +0000 (19:39 +0300)]
Make auto handle placement aware of cyclic extrapolation.

Cyclic extrapolation is implemented as an f-curve modifier, so this
technically violates abstraction separation and is something of a hack.
However without such behavior achieving smooth looping with cyclic
extrapolation is extremely cumbersome.

The new behavior is applied when the first modifier is Cyclic
extrapolation in Repeat or Repeat with Offset mode without
using influence, repeat count or range restrictions.

This change in behavior means that curve handles have to be updated
when the modifier is added, removed or its options change. Due to the
way code is structured, it seems it requires a helper link to the
containing curve from the modifier object.

Reviewers: aligorith

Differential Revision:

3 years agoFix T52959: Local view looses clip range on exit
Campbell Barton [Tue, 17 Oct 2017 14:40:01 +0000 (01:40 +1100)]
Fix T52959: Local view looses clip range on exit

3 years agoFix T53074: Use the pybuffer->itemsize to get the corresponding GLtype
Germano [Tue, 17 Oct 2017 14:06:52 +0000 (12:06 -0200)]
Fix T53074: Use the pybuffer->itemsize to get the corresponding GLtype

It seems that `typestr` does not always define the final size of the element. And it varies by operating system.

Then use the `typestr` only to know the itemtype is `float` type or not.

3 years agoFix T53007: OpenSubdiv + transparency = artefact/crashes
Sergey Sharybin [Tue, 17 Oct 2017 10:12:15 +0000 (12:12 +0200)]
Fix T53007: OpenSubdiv + transparency = artefact/crashes

3 years agoGPU: Report number of compressed texture formats to help nailing crahs down in the...
Sergey Sharybin [Tue, 17 Oct 2017 09:53:15 +0000 (11:53 +0200)]
GPU: Report number of compressed texture formats to help nailing crahs down in the future

3 years agoGPU: Fix memory corruption in GPU_debug on GTX1080
Sergey Sharybin [Tue, 17 Oct 2017 09:51:05 +0000 (11:51 +0200)]
GPU: Fix memory corruption in GPU_debug on GTX1080

Number of texture formats is 51, which is greater than allowed size of 32.

3 years agoAdded alpha channel check to Alembic unit test
Sybren A. Stüvel [Tue, 17 Oct 2017 08:59:02 +0000 (10:59 +0200)]
Added alpha channel check to Alembic unit test

It was broken due to 823bcf1689a3dbd44dd77b2c8ea46b9b54073c46, which added
alpha information and thus changed tuple size from 3 to 4 items.

3 years agoWM: move gesture operator callbacks into own file
Campbell Barton [Tue, 17 Oct 2017 04:09:29 +0000 (15:09 +1100)]
WM: move gesture operator callbacks into own file

`wm_operators.c` is near 5k LOC with lots of mixed functionality,
extract gesture callbacks since they aren't closely related.

3 years agoCleanup: use 'e' prefix for enum typedefs
Campbell Barton [Tue, 17 Oct 2017 02:43:10 +0000 (13:43 +1100)]
Cleanup: use 'e' prefix for enum typedefs

Convention was only followed loosely,
apply to DNA where changes aren't likely to conflict.

(Skipped ModifierType for eg).

3 years agoWM: immediate line-gesture activation on tweak
Campbell Barton [Tue, 17 Oct 2017 01:37:26 +0000 (12:37 +1100)]
WM: immediate line-gesture activation on tweak

Matches border-gesture behavior,
needed for binding bisect to tweak event.

3 years agoKnife Tool: add wait_for_event option
Campbell Barton [Tue, 17 Oct 2017 00:50:59 +0000 (11:50 +1100)]
Knife Tool: add wait_for_event option

3 years agoReplace freeing checks with MEM_SAFE_FREE
Joshua Leung [Mon, 16 Oct 2017 11:44:20 +0000 (00:44 +1300)]
Replace freeing checks with MEM_SAFE_FREE

3 years agoWM: refactor gestures for use as tools
Campbell Barton [Mon, 16 Oct 2017 10:58:51 +0000 (21:58 +1100)]
WM: refactor gestures for use as tools

Border and circle select wait for input by default.
This commit uses bool properties on the operators instead of
magic number (called "gesture_mode").

Keymaps that define 'deselect' for border/circle select
begin immediately, exiting when on button release.

3 years agoFix T53054: Parentless bone + IK crashes
Campbell Barton [Mon, 16 Oct 2017 11:20:34 +0000 (22:20 +1100)]
Fix T53054: Parentless bone + IK crashes

3 years agoCleanup: modal operator border callback names
Campbell Barton [Mon, 16 Oct 2017 06:01:28 +0000 (17:01 +1100)]
Cleanup: modal operator border callback names

Use same convention as all others.
Remove 'select' since these are used for zoom as well.

3 years agoWM: store modal operator last-properties
Campbell Barton [Mon, 16 Oct 2017 05:35:22 +0000 (16:35 +1100)]
WM: store modal operator last-properties

Avoids modal operators needing to explicitly store them.

3 years agoWM: Don't save mouse-paths to operator history
Campbell Barton [Mon, 16 Oct 2017 05:11:04 +0000 (16:11 +1100)]
WM: Don't save mouse-paths to operator history

In preparation for modal operators storing their properties,
no need to keep mouse-paths around.

Also use generic function for lasso properties.

3 years agoWM: remove hard-coded circle radius memory
Campbell Barton [Mon, 16 Oct 2017 04:32:09 +0000 (15:32 +1100)]
WM: remove hard-coded circle radius memory

Replace with operator type 'last_properties'.

Also use generic function for circle gesture properties.

3 years agoEvent System: Prevent mouse motion in click events
Campbell Barton [Mon, 16 Oct 2017 03:19:03 +0000 (14:19 +1100)]
Event System: Prevent mouse motion in click events

Don't convert mouse button events to click if they include dragging.
Double-click events already checked for this.

3 years agoCleanup: simplify lasso reallocation
Campbell Barton [Mon, 16 Oct 2017 02:18:50 +0000 (13:18 +1100)]
Cleanup: simplify lasso reallocation

Remove unneeded define, double allocations when increasing.

3 years agoCleanup: rename gesture mode to is_active
Campbell Barton [Mon, 16 Oct 2017 02:01:09 +0000 (13:01 +1100)]
Cleanup: rename gesture mode to is_active

Wasn't obvious what this did at a glance.

3 years agoCode cleanup: deduplicate primitive refit code.
Brecht Van Lommel [Fri, 13 Oct 2017 17:36:10 +0000 (18:36 +0100)]
Code cleanup: deduplicate primitive refit code.

3 years agoFix bad 'poll' prop callback API doc.
Bastien Montagne [Sun, 15 Oct 2017 18:38:29 +0000 (20:38 +0200)]
Fix bad 'poll' prop callback API doc.

This was added to all prop types, when it is only available for Pointer ones.

3 years agoFix OpenCL performance regression after cubic interpolation.
Brecht Van Lommel [Sun, 15 Oct 2017 15:40:01 +0000 (17:40 +0200)]
Fix OpenCL performance regression after cubic interpolation.

Reorganize code to reduce register pressure.

3 years agoEdit Mesh/Curve: Median center for click extrude
Campbell Barton [Sat, 14 Oct 2017 08:22:44 +0000 (19:22 +1100)]
Edit Mesh/Curve: Median center for click extrude

Was using bound-box center which depends on rotation.

3 years agoAdd some basic 4K render presets.
Bastien Montagne [Sat, 14 Oct 2017 08:07:02 +0000 (10:07 +0200)]
Add some basic 4K render presets.

This difinition is becomming rather common now, time to add it to our
collection imho (requested in T53064).

3 years agoEdit Mesh: click extrude, ensure inverse matrix
Campbell Barton [Sat, 14 Oct 2017 07:43:02 +0000 (18:43 +1100)]
Edit Mesh: click extrude, ensure inverse matrix

Relied on this being set elsewhere which isn't assured.

3 years agoCorrect bezier curve assert
Campbell Barton [Sat, 14 Oct 2017 06:54:43 +0000 (17:54 +1100)]
Correct bezier curve assert

Bezier curves should have v-points zero'd.

3 years agoCleanup: use const for events
Campbell Barton [Sat, 14 Oct 2017 06:29:54 +0000 (17:29 +1100)]
Cleanup: use const for events

3 years agoHide "Confirm on Release" button from transfor redo options
Julian Eisel [Fri, 13 Oct 2017 23:07:31 +0000 (01:07 +0200)]
Hide "Confirm on Release" button from transfor redo options

Hide-flag wasn't set so option shows up in keymap editor. But seems like
that flag is ignored there by now anyway.

3 years agoFix T53052: ID decrement error when deleting a scene, either python or GUI.
Bastien Montagne [Thu, 12 Oct 2017 13:54:43 +0000 (15:54 +0200)]
Fix T53052: ID decrement error when deleting a scene, either python or GUI.

User count of scenes was inconsistant, screens only have 'user_one' kind
of owning over scenes, which means they shall never increment or
decrement their real user count. And usually, scenes have no real user
at all.

3 years agoFix T52999: floating (popup) panels/menus could jump around screen in some cases.
Bastien Montagne [Thu, 12 Oct 2017 12:43:45 +0000 (14:43 +0200)]
Fix T52999: floating (popup) panels/menus could jump around screen in some cases.

Would happen during panel's refresh drawing, if drawing code had to adjust
final panel position compared to the initial one computed based on the
mouse coordinates, and user had dragged the floating panel around.

Issue fixed by adjusting stored mouse coordinates once final panel
position is known, such that they would directly generate those
coordinates. that way, the basic offset applied to those stored mouse
coordinates during panel dragging is valid, and recreating panel based
on those won't make it jump in screen.

Note that panel will still jump in case user dragged it partially out of
view - we could prevent that, but imho it's better to keep that
behavior, since redraw can generate a popup of different size, which
could end up with a totally out-of-view one...

Hopefully this fix does not break anything else!

3 years agoDocs: add note for bmesh face_split_edgenet
Campbell Barton [Thu, 12 Oct 2017 11:46:04 +0000 (22:46 +1100)]
Docs: add note for bmesh face_split_edgenet

3 years agoFix T53048: OSL Volume is broken in Blender 2.79
Sergey Sharybin [Wed, 11 Oct 2017 10:21:26 +0000 (15:21 +0500)]
Fix T53048: OSL Volume is broken in Blender 2.79

Was a mistake in optimization commit which was disconnecting closures and nodes
which does not make sense for volume output.

OSL script we can't ignore and can't currently know in advance if it's a proper
volume shader or not. So we never disconnect OSL nodes from volume output.

This is a good candidate for corrective release.

3 years agoCycles: Speedup up tangent space calculation
Sergey Sharybin [Fri, 25 Aug 2017 20:26:04 +0000 (22:26 +0200)]
Cycles: Speedup up tangent space calculation

This patch goes away form using C++ RNA during tangent space calculation which
avoids quite a bit of overhead. Now all calculation is done using data which
already exists in ccl::Mesh. This means, tangent space is now calculated from
triangles, which doesn't seem to be any different (at least as far as regression
tests are concerned).

One of the positive sides is that this change makes it possible to move tangent
space calculation from blender/ to render/ so we will have Cycles standalone
supporting tangent space.

Reviewers: brecht, lukasstockner97, campbellbarton

Differential Revision:

3 years agoCycles: Add utility function to calculate triangle's normal
Sergey Sharybin [Tue, 10 Oct 2017 08:12:06 +0000 (13:12 +0500)]
Cycles: Add utility function to calculate triangle's normal

3 years agoCycles: Add utility function to remove given attribute
Sergey Sharybin [Fri, 25 Aug 2017 20:51:44 +0000 (22:51 +0200)]
Cycles: Add utility function to remove given attribute

3 years agoCycles: Fix possible race condition when initializing devices list
Sergey Sharybin [Wed, 11 Oct 2017 07:48:19 +0000 (12:48 +0500)]
Cycles: Fix possible race condition when initializing devices list

3 years agoCycles tests: Don't proint braces for empty status
Sergey Sharybin [Tue, 10 Oct 2017 14:58:37 +0000 (19:58 +0500)]
Cycles tests: Don't proint braces for empty status

3 years agoFix T53040: Vertex paint, texure & symmetry fail
Campbell Barton [Tue, 10 Oct 2017 12:23:53 +0000 (23:23 +1100)]
Fix T53040: Vertex paint, texure & symmetry fail

Removed old logic for brush texture which was being applied twice.

3 years agoVertex Paint: add back missing VertProjHandle free
Campbell Barton [Tue, 10 Oct 2017 11:32:30 +0000 (22:32 +1100)]
Vertex Paint: add back missing VertProjHandle free

Also avoid passing large struct as value.

3 years agoCorrect logic for vertex paint smear
Campbell Barton [Tue, 10 Oct 2017 09:25:11 +0000 (20:25 +1100)]
Correct logic for vertex paint smear

Swapping gave values from the state before the last.
Thanks to @angavrilov for spotting.

3 years agoFix Sculpt 2D falloff, missing brush caused crash
Campbell Barton [Tue, 10 Oct 2017 08:49:31 +0000 (19:49 +1100)]
Fix Sculpt 2D falloff, missing brush caused crash

3 years agoCycles: Fix compilation of sm_20 and sm_21 kernels
Sergey Sharybin [Tue, 10 Oct 2017 07:26:02 +0000 (12:26 +0500)]
Cycles: Fix compilation of sm_20 and sm_21 kernels

Was broken since the bicubic commit for GPU support.

3 years agoRecent check for navigation missed NULL check
Campbell Barton [Mon, 9 Oct 2017 15:43:56 +0000 (02:43 +1100)]
Recent check for navigation missed NULL check

3 years agoUI: VSE strip menu reorganization
Aaron Carlisle [Mon, 9 Oct 2017 02:47:05 +0000 (13:47 +1100)]
UI: VSE strip menu reorganization

Add Inputs and Transform submenus.

3 years agoCycles: schedule more work for non-display and compute preemption CUDA cards.
Brecht Van Lommel [Sun, 8 Oct 2017 17:08:44 +0000 (19:08 +0200)]
Cycles: schedule more work for non-display and compute preemption CUDA cards.

This change affects CUDA GPUs not connected to a display or connected to a
display but supporting compute preemption so that the display does not
freeze. I couldn't find an official list, but compute preemption seems to be
only supported with GTX 1070+ and Linux (not GTX 1060- or Windows).

This helps improve small tile rendering performance further if there are
sufficient samples x number of pixels in a single tile to keep the GPU busy.

3 years agoFix T53017: Cycles not detecting AMD GPU when there is an NVidia GPU too.
Mathieu Menuet [Sun, 8 Oct 2017 16:20:55 +0000 (18:20 +0200)]
Fix T53017: Cycles not detecting AMD GPU when there is an NVidia GPU too.

Best guess is that cuInit() somehow interferes with the AMD graphics driver
on Windows, and switching the initialization order to do OpenCL first seems
to solve the issue.

3 years agoFix potential string buffer overruns.
Bastien Montagne [Sun, 8 Oct 2017 14:08:00 +0000 (16:08 +0200)]
Fix potential string buffer overruns.

Note that our library path handling is still rather dodgy on this
regards, shall take some time at some point to seriously sanitize it...

3 years agoCode refactor: use DeviceInfo to enable QBVH and decoupled volume shading.
Brecht Van Lommel [Sun, 8 Oct 2017 02:32:25 +0000 (04:32 +0200)]
Code refactor: use DeviceInfo to enable QBVH and decoupled volume shading.

3 years agoCleanup: --help text
Campbell Barton [Sun, 8 Oct 2017 07:46:26 +0000 (18:46 +1100)]
Cleanup: --help text

Sync with manual