blender-staging.git
2 years agoFix T53276: encoding output quality UI clarification.
Brecht Van Lommel [Thu, 23 Nov 2017 16:55:25 +0000 (17:55 +0100)]
Fix T53276: encoding output quality UI clarification.

2 years agoFix T53357: harmless assert after recent addition of render time pass.
Brecht Van Lommel [Thu, 23 Nov 2017 16:00:18 +0000 (17:00 +0100)]
Fix T53357: harmless assert after recent addition of render time pass.

2 years agoFix inaccuracy when storing material ID pass in half float multilayer EXR.
Brecht Van Lommel [Thu, 23 Nov 2017 15:27:22 +0000 (16:27 +0100)]
Fix inaccuracy when storing material ID pass in half float multilayer EXR.

These and other non-RGB passes should always be stored as full float, the
precision loss is too unpredictable.

Related to T53381, but that one is about file output nodes where we don't
know the type of data being saved currently.

2 years agoFix T53348: Cycles difference between gradient texture on CPU and GPU.
Brecht Van Lommel [Thu, 23 Nov 2017 15:10:38 +0000 (16:10 +0100)]
Fix T53348: Cycles difference between gradient texture on CPU and GPU.

2 years agoMoar attempt to fix bloody MSVC intrinsic mess...
Bastien Montagne [Thu, 23 Nov 2017 15:58:20 +0000 (16:58 +0100)]
Moar attempt to fix bloody MSVC intrinsic mess...

2 years agoAttempt to fix bloody MSVC atomic intrinsic mess...
Bastien Montagne [Thu, 23 Nov 2017 15:53:03 +0000 (16:53 +0100)]
Attempt to fix bloody MSVC atomic intrinsic mess...

2 years agoatomic_ops: add char versions of uint8_t atomic primitives.
Bastien Montagne [Thu, 23 Nov 2017 15:23:45 +0000 (16:23 +0100)]
atomic_ops: add char versions of uint8_t atomic primitives.

2 years agoCleanup: use signed atomic ops when needed.
Bastien Montagne [Thu, 23 Nov 2017 15:14:53 +0000 (16:14 +0100)]
Cleanup: use signed atomic ops when needed.

2 years agoatomic_ops: add signed versions of primitives.
Bastien Montagne [Thu, 23 Nov 2017 15:13:23 +0000 (16:13 +0100)]
atomic_ops: add signed versions of primitives.

Reason is motsly that dealing with type conversion in calling code is
not great, makes it less readable, and can generate hidden bugs in case
original type changes and atomic primitive calls are not updated
accordingly...

2 years agoDepsgraph: Cleanup, deduplicate code around component registration
Sergey Sharybin [Thu, 23 Nov 2017 14:23:19 +0000 (15:23 +0100)]
Depsgraph: Cleanup, deduplicate code around component registration

2 years agoDepsgraph: Cleanup, split build_object() a bit
Sergey Sharybin [Thu, 23 Nov 2017 11:01:31 +0000 (12:01 +0100)]
Depsgraph: Cleanup, split build_object() a bit

2 years agoDepsgraph: Cleanup, always call full `object`
Sergey Sharybin [Thu, 23 Nov 2017 10:39:28 +0000 (11:39 +0100)]
Depsgraph: Cleanup, always call full `object`

2 years agoRevert "BLI_utildefines: Support SWAP macro with two args"
Campbell Barton [Thu, 23 Nov 2017 04:19:24 +0000 (15:19 +1100)]
Revert "BLI_utildefines: Support SWAP macro with two args"

This reverts commit d749320e3b10161430bc4cb7dd92edb63712bf8c.

It's possible the container struct is larger,
we could do sizeof checks that falls back to memmove
but rather avoid complicating things.

2 years agoUse custom SWAP macro for swapping userdef data
Campbell Barton [Thu, 23 Nov 2017 04:18:22 +0000 (15:18 +1100)]
Use custom SWAP macro for swapping userdef data

Avoids complicating the common case

2 years agoFix T53274: Saving template prefs overwrites default prefs
Campbell Barton [Wed, 22 Nov 2017 16:10:58 +0000 (03:10 +1100)]
Fix T53274: Saving template prefs overwrites default prefs

2 years agoBLI_utildefines: Support SWAP macro with two args
Campbell Barton [Wed, 22 Nov 2017 15:44:02 +0000 (02:44 +1100)]
BLI_utildefines: Support SWAP macro with two args

2 years agoWM: minor correction to user-pref writing
Campbell Barton [Wed, 22 Nov 2017 06:11:03 +0000 (17:11 +1100)]
WM: minor correction to user-pref writing

When saving templates had wrong return value.

2 years agoFix T53313: bevel shader with transmission render artifacts.
Brecht Van Lommel [Tue, 21 Nov 2017 23:49:12 +0000 (00:49 +0100)]
Fix T53313: bevel shader with transmission render artifacts.

2 years agoRemoving OMP: get rid of usages in /bmesh/ area.
Bastien Montagne [Tue, 21 Nov 2017 16:55:07 +0000 (17:55 +0100)]
Removing OMP: get rid of usages in /bmesh/ area.

Just removing it, such cases are not bottlenecks and not worth the
complication of doing real threading with own BLI_task.

Other (remaining) usages may be relevant, need case-by-case check.

2 years agoRemoving OMP: get rid of last bit in /editors/ area.
Bastien Montagne [Tue, 21 Nov 2017 16:52:25 +0000 (17:52 +0100)]
Removing OMP: get rid of last bit in /editors/ area.

Just removing it, such cases are not bottlenecks and not worth the
complication of doing real threading with own BLI_task.

2 years agoCleanup: We do not use camel case in Blender code
Sergey Sharybin [Tue, 21 Nov 2017 16:34:44 +0000 (17:34 +0100)]
Cleanup: We do not use camel case in Blender code

At least not for variables.

2 years agoFix T53371: Keying Node fails with values above 1
Sergey Sharybin [Tue, 21 Nov 2017 16:31:45 +0000 (17:31 +0100)]
Fix T53371: Keying Node fails with values above 1

This was expected behavior for over-exposured lamps when the mode was originally
created for Tears of Steel. Turns out, there could be really bad green screen in
real production which will only have green (or rather screen) channel over
exposured.

Tweaked condition now so we use least bright channel to see if the area has
proper exposure or not.

Seems to work fine in tests, but further tweaks are possible.

2 years agoCycles: Fixed compilation of CUDA kernels. Follow-up fix for my last commit.
Stefan Werner [Tue, 21 Nov 2017 09:43:40 +0000 (10:43 +0100)]
Cycles: Fixed compilation of CUDA kernels. Follow-up fix for my last commit.

2 years agoCycles: Fix OSL brick node after recent fix
Mai Lavelle [Tue, 21 Nov 2017 09:29:31 +0000 (04:29 -0500)]
Cycles: Fix OSL brick node after recent fix

2 years agoCycles: Workaround for performance loss with the CUDA 9.0 SDK.
Stefan Werner [Tue, 21 Nov 2017 09:29:11 +0000 (10:29 +0100)]
Cycles: Workaround for performance loss with the CUDA 9.0 SDK.

CUDA 9.0.176 apparently caused some slow down on high-end Pascal cards that can be mitigated by increasing the number of registers. See https://developer.blender.org/F1142667 for a detailed comparison.

2 years agoFix T53365: OpenCL has wrong shading of brick texture
Mai Lavelle [Tue, 21 Nov 2017 05:38:02 +0000 (00:38 -0500)]
Fix T53365: OpenCL has wrong shading of brick texture

Looks like some weird compiler difference with signed vs unsigned ints.

2 years agoDisable adding scene sequence strips into themselves
Campbell Barton [Tue, 21 Nov 2017 05:33:36 +0000 (16:33 +1100)]
Disable adding scene sequence strips into themselves

D2923 by @spockTheGray w/ edits, see T52586 for details

2 years agoCleanup: redundant ELEM use
Campbell Barton [Tue, 21 Nov 2017 05:14:31 +0000 (16:14 +1100)]
Cleanup: redundant ELEM use

2 years agoCode cleanup: fix harmless compiler warning.
Brecht Van Lommel [Mon, 20 Nov 2017 22:32:06 +0000 (23:32 +0100)]
Code cleanup: fix harmless compiler warning.

2 years agoFix build with OSL 1.9.x, automatically aligns to 16 bytes now.
Brecht Van Lommel [Sat, 18 Nov 2017 05:11:17 +0000 (06:11 +0100)]
Fix build with OSL 1.9.x, automatically aligns to 16 bytes now.

2 years agoCycles: Fix wrong behavior of sharpness in Cubic SSS
Sergey Sharybin [Mon, 20 Nov 2017 10:40:55 +0000 (11:40 +0100)]
Cycles: Fix wrong behavior of sharpness in Cubic SSS

Was giving difference when using sharpness of 1.0 and 0.999 even though the
result was expected to be really close to each other.

This SSS profile will probably be removed in the future in favor of more
physically bases Burley, but for the time being don't see anything wrong
fixing an existing code.

2 years agoFix (unreported) Crash: broken RNA accessors to tesselated MCol data.
Bastien Montagne [Mon, 20 Nov 2017 09:12:21 +0000 (10:12 +0100)]
Fix (unreported) Crash: broken RNA accessors to tesselated MCol data.

Regression from rB823bcf1689a3 (VPaint 2017 GSoC, this is not in 2.79 release).

Also cleanup, using fake-array-ification to access struct members is
generally not a great idea, but when we already have a totally confusing
broken struct layout, this is pure evil, as demonstrated here!

Found while investigating T53341.

2 years agoUV Cube Project: improve default behavior
Campbell Barton [Mon, 20 Nov 2017 08:51:19 +0000 (19:51 +1100)]
UV Cube Project: improve default behavior

- initialize the cube-size from the bounding box when it's not set.
- no longer wrap faces to keep in 0-1 bounds,
  other projection methods don't do this and calculating the scale
  prevents the UV's from being too far outside the view.

2 years agoFix T53342: Outliner 'select hierarchy' broken
Campbell Barton [Mon, 20 Nov 2017 05:01:04 +0000 (16:01 +1100)]
Fix T53342: Outliner 'select hierarchy' broken

Was using cursor position from within menu,
clicking on the same position for every selected item (toggling).

Now operate on each selected outliner element, without toggling.

2 years agoFix T53343: Custom Normal Data Transfer Crashes when some vertexes have no faces.
Bastien Montagne [Sun, 19 Nov 2017 19:42:55 +0000 (20:42 +0100)]
Fix T53343: Custom Normal Data Transfer Crashes when some vertexes have no faces.

Odd nobody noticed this earlier, was obvious bug in code logic here... :/

To be backported to 2.79a.

2 years agoOption not to select with un-hide
Campbell Barton [Sun, 19 Nov 2017 15:28:07 +0000 (02:28 +1100)]
Option not to select with un-hide

D1518 from @mba105 w/ edits

2 years agoCleanup: remove BKE_utildefines
Campbell Barton [Sun, 19 Nov 2017 14:35:49 +0000 (01:35 +1100)]
Cleanup: remove BKE_utildefines

This was meant to be used for less general macros but was never used.

Rename BKE_BIT_TEST_SET to SET_FLAG_FROM_TEST

2 years agoFix: Undo pushes were missing for Add/Remove Driver Variable buttons, and Remove...
Joshua Leung [Sun, 19 Nov 2017 14:06:13 +0000 (03:06 +1300)]
Fix: Undo pushes were missing for Add/Remove Driver Variable buttons, and Remove Driver button

2 years agoCleanup - Style
Joshua Leung [Sun, 19 Nov 2017 13:56:40 +0000 (02:56 +1300)]
Cleanup - Style

2 years agoFix T53300: Bone Extrude via Ctrl + Click is not done from active bone tail
Joshua Leung [Sun, 19 Nov 2017 13:55:17 +0000 (02:55 +1300)]
Fix T53300: Bone Extrude via Ctrl + Click is not done from active bone tail

2 years agoFix compiler warning
Joshua Leung [Sun, 19 Nov 2017 13:08:55 +0000 (02:08 +1300)]
Fix compiler warning

--> render_result.c:832 - formal parameter 6 different from declaration

2 years agoFix: "Lock Markers" option was not being obeyed by the "Sync Markers (when transformi...
Joshua Leung [Sun, 19 Nov 2017 12:47:21 +0000 (01:47 +1300)]
Fix: "Lock Markers" option was not being obeyed by the "Sync Markers (when transforming)" option

2 years agoBake Action operator: Added missing Bendy Bones support
Joshua Leung [Sun, 19 Nov 2017 12:32:03 +0000 (01:32 +1300)]
Bake Action operator: Added missing Bendy Bones support

2 years agoTweaks to make it easier to update bone motion paths (without the active bone needing...
Joshua Leung [Sun, 19 Nov 2017 12:00:27 +0000 (01:00 +1300)]
Tweaks to make it easier to update bone motion paths (without the active bone needing to have any paths itself)

This commit introduces the following changes:
* Modified the poll callback on the "Update Paths" operator for bones
  so that it only checks if there are bones that have motion paths
  (instead of checking whether the active bone has paths).

  This makes it easier to update paths without having to first select one
  that has them - useful when the paths are all on hidden/hard-to-select bones.

* Add a readonly property, "has_motion_paths" to the animviz.motion_path
  RNA struct, providing easier access to the internal flag used above.
  This makes it possible for the UI to display the "Update" button without
  having to check various bones for motion paths.

Notes:
* The flag being used in these changes already existed, and was only really
  intended for internal use. However, since it was already used in many places
  for determining if auto-update of all bone paths was needed (e.g. after certain
  editing ops), it should be safe to use here too.

* The update_paths operator currently bakes all paths when activated, so there's
  currently no loss of functionality with changing to not checking if the active
  bone has any paths (e.g. we couldn't only update the active bone only either).
  That is still listed as a todo in the code.

2 years agoPasting poses now updates motion paths
Joshua Leung [Sun, 19 Nov 2017 11:31:07 +0000 (00:31 +1300)]
Pasting poses now updates motion paths

2 years agoFix T53229: "Sample Keyframes" errors with multiple pairs of keyframes selected
Joshua Leung [Sun, 19 Nov 2017 11:28:03 +0000 (00:28 +1300)]
Fix T53229: "Sample Keyframes" errors with multiple pairs of keyframes selected

There were 2 issues here (first was the one reported):
1) Curve shape changes if multiple consecutive pairs of keyframes
   are selected. The problem is that after the first pair is handled,
   subsequent pairs get sampled on the basis of the modified curve.

2) With multiple separate "islands" selected, unselected points in between
   would get ignored, causing the entire curve to get sampled.

2 years agoSwap priority of system path overrides for dev builds
Julian Eisel [Sun, 19 Nov 2017 11:24:12 +0000 (12:24 +0100)]
Swap priority of system path overrides for dev builds

Suggested by Campbell, thanks!

Also moved the exception into own function and improved comments.

Fixes T53008.

2 years agoVertex Paint: missed removing settings from UI
Campbell Barton [Sun, 19 Nov 2017 06:00:56 +0000 (17:00 +1100)]
Vertex Paint: missed removing settings from UI

2 years agoFix T53347: Vertex paint crash on undo/exit
Campbell Barton [Sun, 19 Nov 2017 05:45:27 +0000 (16:45 +1100)]
Fix T53347: Vertex paint crash on undo/exit

2 years agoCMake: remove solaris path
Campbell Barton [Sat, 18 Nov 2017 16:46:50 +0000 (03:46 +1100)]
CMake: remove solaris path

2 years agoCleanup: outdated comment
Campbell Barton [Sat, 18 Nov 2017 16:25:52 +0000 (03:25 +1100)]
Cleanup: outdated comment

2 years agoCleanup: style
Campbell Barton [Sat, 18 Nov 2017 06:22:54 +0000 (17:22 +1100)]
Cleanup: style

2 years agoFix BGE sound actuator property access
Campbell Barton [Sat, 18 Nov 2017 06:16:25 +0000 (17:16 +1100)]
Fix BGE sound actuator property access

2 years agoAdd select similar custom bone shape
Campbell Barton [Sat, 18 Nov 2017 02:52:02 +0000 (13:52 +1100)]
Add select similar custom bone shape

D2820 by @col-one w/ edits

2 years agoMikktspace: Speed up the merging of identical vertices
Lukas Stockner [Sun, 4 Jun 2017 21:04:47 +0000 (23:04 +0200)]
Mikktspace: Speed up the merging of identical vertices

Previously, Mikktspace just bucketed the vertices based on one spatial coordinate and then ran full pairwise comparisons inside each bucket.
However, since models are three-dimensional, the bucketing has a massive false-positive rate, and since pairwise comparison is O(n^2), the merging process is very slow.

But, since we only care about exactly identical vertices, there is a much more efficient approach - we can just hash all values belonging to each vertex and form buckets based on the hash.
Since the hash has 32 bits and considers all values, false-positives are very unlikely - and since both hashing and the radixsort that's used for bucketing are O(n), both asymptotical and
real-world performance (as well as code complexity) are significantly improved.

2 years agoCycles: Add per-tile render time debug pass
Lukas Stockner [Fri, 17 Nov 2017 13:23:48 +0000 (14:23 +0100)]
Cycles: Add per-tile render time debug pass

Reviewers: sergey, brecht

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

2 years agoCycles: Add Volume Direct and Volume Indirect passes for volume-scattered light
Lukas Stockner [Tue, 14 Nov 2017 06:21:07 +0000 (07:21 +0100)]
Cycles: Add Volume Direct and Volume Indirect passes for volume-scattered light

No color pass because it's hard to define what to use as color in a volume.

Reviewers: sergey, brecht

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

2 years agoCycles: Refactor PassType from bitflag to index in order to allow for more passes
Lukas Stockner [Tue, 14 Nov 2017 06:20:02 +0000 (07:20 +0100)]
Cycles: Refactor PassType from bitflag to index in order to allow for more passes

2 years agoDepsgraph: Add missing checks from previous commit
Sergey Sharybin [Fri, 17 Nov 2017 14:27:02 +0000 (15:27 +0100)]
Depsgraph: Add missing checks from previous commit

2 years agoDepsgraph: Don't make non-dynamic hair dependent on time
Sergey Sharybin [Fri, 17 Nov 2017 13:56:51 +0000 (14:56 +0100)]
Depsgraph: Don't make non-dynamic hair dependent on time

This way hair system used for static forest does not make playblack slow.

A bit dangerous, but let's see how far we can go!

2 years agoFix UV Projection Center Calculation
Campbell Barton [Fri, 17 Nov 2017 11:30:28 +0000 (22:30 +1100)]
Fix UV Projection Center Calculation

UV project mixed up global/local space,
3D cursor offset didn't take object scale into account.

Minor improvements:

- Match Cube Project 'center' behavior w/ sphere & cylinder.
- Add active-element center.
- Wrap UV's in Cube Project based on center instead of first vertex.

2 years agoBLI listbase: add bytes finding helpers.
Bastien Montagne [Thu, 16 Nov 2017 11:49:31 +0000 (12:49 +0100)]
BLI listbase: add bytes finding helpers.

Quite similar to string ones actually, except more generic. Used in
id_override_static branch currently.

2 years agoCycles: Fix crash with split branched path tracing
Mai Lavelle [Thu, 16 Nov 2017 08:32:02 +0000 (03:32 -0500)]
Cycles: Fix crash with split branched path tracing

ShaderData memory was getting clobbered in the branched path code paths.

Was caused by 087331c495b04ebd37903c0dc0e46262354cf026

2 years agoBLI_utildefines: sync w/ 2.8
Campbell Barton [Wed, 15 Nov 2017 12:06:34 +0000 (23:06 +1100)]
BLI_utildefines: sync w/ 2.8

2 years agoCleanup: use 'uint'
Campbell Barton [Wed, 15 Nov 2017 11:50:25 +0000 (22:50 +1100)]
Cleanup: use 'uint'

2 years agoGSet: utils to access data stored outside the set
Campbell Barton [Wed, 15 Nov 2017 11:45:37 +0000 (22:45 +1100)]
GSet: utils to access data stored outside the set

2 years agoFix T53309: Remove default 'Clear loc/rot/scale delta transform' shortcuts.
Bastien Montagne [Tue, 14 Nov 2017 21:47:42 +0000 (22:47 +0100)]
Fix T53309: Remove default 'Clear loc/rot/scale delta transform' shortcuts.

The loc one (shift-alt-G) was same as 'remove selected from active group'
action... Clear delta transform is not a common operation, so we can
live without a default shortcut for it.

Note that using same key (G) in same space for two completely different
kind of operations is probably a rather bad thing, nice topic for future
keymap work. ;)

Probably nice to have in 2.79a.

2 years agoSmoke: Pass non-trivial arguments by const reference
Sergey Sharybin [Tue, 14 Nov 2017 16:11:25 +0000 (17:11 +0100)]
Smoke: Pass non-trivial arguments by const reference

2 years agoFix compilation error with clang-5
Sergey Sharybin [Tue, 14 Nov 2017 16:00:54 +0000 (17:00 +0100)]
Fix compilation error with clang-5

2 years agoAlembic: Fix mismatch in forward declaration with definition
Sergey Sharybin [Tue, 14 Nov 2017 15:50:19 +0000 (16:50 +0100)]
Alembic: Fix mismatch in forward declaration with definition

2 years agoFix missing SpinLock typedef on macOS
Arto Kitula [Tue, 14 Nov 2017 14:51:34 +0000 (16:51 +0200)]
Fix missing SpinLock typedef on macOS

2 years agoFix T53068: AMD Threadripper not working well with Blender
Sergey Sharybin [Tue, 14 Nov 2017 11:21:15 +0000 (12:21 +0100)]
Fix T53068: AMD Threadripper not working well with Blender

The issue was caused by SpinLock implementation in old pthreads we ar eusing on
Windows. Using newer one (2.10-rc) demonstrates same exact behavior. But likely
using own atomics and memory barrier based implementation solves the issue.

A bit annoying that we need to change such a core part of Blender just to make
specific CPU happy, but it's better to have artists happy on all computers.

There is no expected downsides of this change, but it is so called "works for
me" category. Let's see how it all goes.

2 years agoCleanup: order BLI before BKE headers
Campbell Barton [Tue, 14 Nov 2017 06:23:40 +0000 (17:23 +1100)]
Cleanup: order BLI before BKE headers

This was done nearly everywhere already

2 years agoBLI: sync changes from 2.8
Campbell Barton [Tue, 14 Nov 2017 05:10:48 +0000 (16:10 +1100)]
BLI: sync changes from 2.8

2 years agoCycles: Make per-object random value output also work for Lamps
Lukas Stockner [Sun, 5 Nov 2017 20:59:17 +0000 (21:59 +0100)]
Cycles: Make per-object random value output also work for Lamps

2 years agoCycles: Refactor closure roughness detection to fix a potential bug with Denoising...
Lukas Stockner [Sun, 5 Nov 2017 20:43:23 +0000 (21:43 +0100)]
Cycles: Refactor closure roughness detection to fix a potential bug with Denoising of specular shaders

2 years agoCleanup on depsgraph logic
Dalai Felinto [Mon, 13 Nov 2017 14:17:14 +0000 (12:17 -0200)]
Cleanup on depsgraph logic

2 years agoDepsgraph: Fix relations for metaballs
Sergey Sharybin [Mon, 13 Nov 2017 13:43:08 +0000 (14:43 +0100)]
Depsgraph: Fix relations for metaballs

Initially spotted and investigated by Dalai and Germano.

2 years agoCycles: Fix compilation error of standalone application
Sergey Sharybin [Mon, 13 Nov 2017 09:49:05 +0000 (10:49 +0100)]
Cycles: Fix compilation error of standalone application

2 years agoCycles: Fix compilation error with OIIO compiled against system PugiXML
Sergey Sharybin [Mon, 13 Nov 2017 09:40:19 +0000 (10:40 +0100)]
Cycles: Fix compilation error with OIIO compiled against system PugiXML

2 years agoFix T53289: CUDA missing textures not showing pink, after recent changes.
Brecht Van Lommel [Sun, 12 Nov 2017 19:43:40 +0000 (20:43 +0100)]
Fix T53289: CUDA missing textures not showing pink, after recent changes.

2 years agoFix T53273: render bake settings properties not showing correct Python path.
Brecht Van Lommel [Sun, 12 Nov 2017 19:04:56 +0000 (20:04 +0100)]
Fix T53273: render bake settings properties not showing correct Python path.

2 years agoFix T53294: bpy.ops.image.open crash
Campbell Barton [Sun, 12 Nov 2017 05:05:28 +0000 (16:05 +1100)]
Fix T53294: bpy.ops.image.open crash

2 years agoBMesh Py API: Expose color alpha
Campbell Barton [Sun, 12 Nov 2017 04:48:24 +0000 (15:48 +1100)]
BMesh Py API: Expose color alpha

2 years agoCycles: Set error if a split kernel fails to load
Mai Lavelle [Sat, 11 Nov 2017 05:57:59 +0000 (00:57 -0500)]
Cycles: Set error if a split kernel fails to load

To help catch cases where adding a new kernel is missed for one of the
device implementations.

2 years agomball_tessellate: Simplify face creation
Germano [Fri, 10 Nov 2017 14:58:34 +0000 (12:58 -0200)]
mball_tessellate: Simplify face creation

Faces that have the last two indices equal are considered triangles, and not those that the last index is 0
Improvement of 7% in performance of the `polygonize` function

2 years agoCycles: Fix compilation error with latest OIIO
Sergey Sharybin [Fri, 10 Nov 2017 09:04:33 +0000 (10:04 +0100)]
Cycles: Fix compilation error with latest OIIO

There was some changes about namespaces, which causes ambiguities.

Replaces using namespace with an explicit symbols we need. Is good idea to NOT
pull in the whole namespace anyway!

2 years agoCycles: better distance sampling for chromatic volume extinction.
Brecht Van Lommel [Thu, 9 Nov 2017 03:42:07 +0000 (04:42 +0100)]
Cycles: better distance sampling for chromatic volume extinction.

Previously we picked one of the RGB channels with equal probability, but this
works poorly in a dense volume after many bounces. Now we take into account
the throughput and single scattering albedo.

This makes it a little more practical to do brute force SSS with volumes, but
is still very inefficient because we do direct light sampling at every volume
bounce even when inside an opaque mesh. In theory there could be a light inside
the mesh so we can't automatically disable direct lighting.

2 years agoFix T53270: crash with multiscatter GGX after recent refactoring.
Brecht Van Lommel [Wed, 8 Nov 2017 20:58:17 +0000 (21:58 +0100)]
Fix T53270: crash with multiscatter GGX after recent refactoring.

In fact this was an existing issue when exceeding the number of available
closure, but it's more common now that we set the number to 0 for shadows
and emission

2 years agoFix (harmless) valgrind warning.
Brecht Van Lommel [Wed, 8 Nov 2017 20:58:09 +0000 (21:58 +0100)]
Fix (harmless) valgrind warning.

2 years agoCycles: avoid reallocating tile denoising memory many times during render.
Brecht Van Lommel [Wed, 8 Nov 2017 19:15:38 +0000 (20:15 +0100)]
Cycles: avoid reallocating tile denoising memory many times during render.

2 years agoMoved alignment attributes from my last commit to BLI_compiler_attrs.h for future...
Stefan Werner [Thu, 9 Nov 2017 13:59:31 +0000 (14:59 +0100)]
Moved alignment attributes from my last commit to BLI_compiler_attrs.h for future use.

2 years agoCompositor: Ensured 16 byte alignment for variables accessed by SSE instructions.
Stefan Werner [Thu, 9 Nov 2017 13:38:17 +0000 (14:38 +0100)]
Compositor: Ensured 16 byte alignment for variables accessed by SSE instructions.

Before this patch, the XBlur/YBlur compositor nodes would crash for me when run in a MSVC 2015 debug build (test scene: BMW27_cpu). I added the compiler instructions to explicitly align the local variables that the SSE instructions are accessing.

2 years agoCycles: Silence warning when building without OSL
Dalai Felinto [Thu, 9 Nov 2017 10:39:30 +0000 (08:39 -0200)]
Cycles: Silence warning when building without OSL

2 years agoFix: unselectable objects can be selected via the NLA editor
Dalai Felinto [Thu, 9 Nov 2017 10:27:37 +0000 (08:27 -0200)]
Fix: unselectable objects can be selected via the NLA editor

This is not reported anywhere, but it's easy to reproduce. I ran into this
while updating this code for the blender2.8 branch.

2 years agoFix logic for pinning textures users from context
Dalai Felinto [Thu, 9 Nov 2017 10:17:35 +0000 (08:17 -0200)]
Fix logic for pinning textures users from context

This was wrong since it's concenption in 28ee0f9218.
The if statement was returning true when pinid was NULL, and false otherwise.

However when scene is pinned we also want to run this code.
Code snippet by Brecht Van Lommel.

2 years agoDepsgraph: Add missing handlers of node IDs
Sergey Sharybin [Thu, 9 Nov 2017 08:46:50 +0000 (09:46 +0100)]
Depsgraph: Add missing handlers of node IDs

Worst thing was that point density did not pull object into dependency graph,
which could lead to wrong render results.

2 years agoDepsgraph: Remove chains of scene being passed all over in relations builder
Sergey Sharybin [Thu, 9 Nov 2017 08:17:47 +0000 (09:17 +0100)]
Depsgraph: Remove chains of scene being passed all over in relations builder

2 years agoDepsgraph: Cleanup, remove scene being passed all over
Sergey Sharybin [Wed, 8 Nov 2017 17:06:51 +0000 (18:06 +0100)]
Depsgraph: Cleanup, remove scene being passed all over

Use the state one instead.

2 years agoDepsgraph: Remove bmain from internal builder API
Sergey Sharybin [Wed, 8 Nov 2017 16:47:00 +0000 (17:47 +0100)]
Depsgraph: Remove bmain from internal builder API

Use the one from state.