blender.git
3 years agoDepsgraph: Fix missing ID node tag
Sergey Sharybin [Fri, 11 Nov 2016 13:25:26 +0000 (14:25 +0100)]
Depsgraph: Fix missing ID node tag

Might have caused nodes created multiple times for the same object.

3 years agoDepsgraph: Add some data builder logic to corresponding function
Sergey Sharybin [Fri, 11 Nov 2016 13:24:47 +0000 (14:24 +0100)]
Depsgraph: Add some data builder logic to corresponding function

3 years agoGrease Pencil: Fix python errors opening N panel -> GP with empty VSE
Sergey Sharybin [Fri, 11 Nov 2016 13:04:04 +0000 (14:04 +0100)]
Grease Pencil: Fix python errors opening N panel -> GP with empty VSE

Solves errors, but not sure interface is indeed what users will expect.

Will ask GP team to check on this.

3 years agoDepsgraph: cleanup, no functional changes
Sergey Sharybin [Fri, 11 Nov 2016 12:52:22 +0000 (13:52 +0100)]
Depsgraph: cleanup, no functional changes

3 years agoDepsgraph: Fix wrong relation names
Sergey Sharybin [Fri, 11 Nov 2016 10:42:43 +0000 (11:42 +0100)]
Depsgraph: Fix wrong relation names

3 years agoDepsgraph: Fix wrong relations in array modifier
Sergey Sharybin [Fri, 11 Nov 2016 10:41:33 +0000 (11:41 +0100)]
Depsgraph: Fix wrong relations in array modifier

3 years agoCycles: Add comments to endif directives
Mai Lavelle [Thu, 6 Oct 2016 12:55:56 +0000 (14:55 +0200)]
Cycles: Add comments to endif directives

`kernel_path.h` and `kernel_path_branched.h` have a lot of conditional code and
it was kind of hard to tell what code belonged to which directive. Should be
easier to read now.

3 years agoConsider Numpad Enter in pose slide operators
Sergey Sharybin [Thu, 10 Nov 2016 16:18:57 +0000 (17:18 +0100)]
Consider Numpad Enter in pose slide operators

It was annoying to only have regular Enter confirming input there.

3 years agoFix `BKE_library_make_local()` trying to also make local proxified objects.
Bastien Montagne [Thu, 10 Nov 2016 16:05:36 +0000 (17:05 +0100)]
Fix `BKE_library_make_local()` trying to also make local proxified objects.

Proxified objects can never be local, we can totally ignore them here.

This 'fixes' the asserts related to usercount when trying to remap poselib
of localized proxified objects (not sure what exactly was going on wrong here,
but proxies are a giant can of worms for sane data-blocks handling anyway :/).

3 years agoDepsgraph: Fix another issue which seems to be a bug
Sergey Sharybin [Thu, 10 Nov 2016 14:49:33 +0000 (15:49 +0100)]
Depsgraph: Fix another issue which seems to be a bug

Similar to a previous commit.

Doing separately for an easy of bisect.

3 years agoDepsgraph: Fix wrong relation from IK solver to pole target
Sergey Sharybin [Thu, 10 Nov 2016 14:46:22 +0000 (15:46 +0100)]
Depsgraph: Fix wrong relation from IK solver to pole target

Copy paste error...

How to avoid those?

3 years agoFix Grease Pencil render in VSE crashes when no strips (#T49975)
Dalai Felinto [Thu, 10 Nov 2016 11:23:09 +0000 (12:23 +0100)]
Fix Grease Pencil render in VSE crashes when no strips (#T49975)

Solution as suggested by Sergey Sharybin. Initial debugging by
Antonio Vazquez.

3 years agobuidlbot, msbuild is slightly different in that is wants to build debug anyway even...
Martijn Berger [Thu, 10 Nov 2016 10:00:04 +0000 (11:00 +0100)]
buidlbot, msbuild is slightly different in that is wants to build debug anyway even if we told cmake we want release

3 years agobuidlbot, msbuild is slightly different in that is wants to build debug anyway even...
Martijn Berger [Thu, 10 Nov 2016 09:55:46 +0000 (10:55 +0100)]
buidlbot, msbuild is slightly different in that is wants to build debug anyway even if we told cmake we want release

3 years agoAdded bpy.types.ID.make_local() that can make a single ID block local.
Sybren A. Stüvel [Thu, 10 Nov 2016 09:42:28 +0000 (10:42 +0100)]
Added bpy.types.ID.make_local() that can make a single ID block local.

This new `bpy.types.ID.make_local(clear_proxies=True)` allows Python
code to press the "Make Local" button on any ID block. I chose
`clear_proxies=True` as the default, since it's the default behaviour
of `id_make_local()` (defined in `library.c`).

The caller does need to take care of ensuring that linked-in objects
don't refer to local data, and that proxies aren't broken.

Reviewers: sergey, mont29

Reviewed By: mont29

Subscribers: dfelinto

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

3 years agolet cmake handle calling msbuild for windows buildbots
Martijn Berger [Thu, 10 Nov 2016 09:48:54 +0000 (10:48 +0100)]
let cmake handle calling msbuild for windows buildbots

3 years agoFix UI message.
Bastien Montagne [Wed, 9 Nov 2016 18:27:43 +0000 (19:27 +0100)]
Fix UI message.

3 years agoBMesh: face-join, remove redundant face assignment
Campbell Barton [Wed, 9 Nov 2016 16:19:44 +0000 (03:19 +1100)]
BMesh: face-join, remove redundant face assignment

Keep ifdef'd out for holes, this isn't needed currently.

3 years agoDepsgraph: Fix crash deleting bones in armature edit mode
Sergey Sharybin [Wed, 9 Nov 2016 15:59:29 +0000 (16:59 +0100)]
Depsgraph: Fix crash deleting bones in armature edit mode

For the new dependency graph we have to rebuild graph when
bones "topology" are changing.

3 years agoFix some assert when making local (due to infamous PITA ShapeKey ID).
Bastien Montagne [Wed, 9 Nov 2016 15:42:28 +0000 (16:42 +0100)]
Fix some assert when making local (due to infamous PITA ShapeKey ID).

3 years agoBMesh: Cleanup, remove hole ifdef
Campbell Barton [Wed, 9 Nov 2016 14:08:12 +0000 (01:08 +1100)]
BMesh: Cleanup, remove hole ifdef

3 years agoBMesh: face-flip, no need for temporary edge-array
Campbell Barton [Wed, 9 Nov 2016 11:25:31 +0000 (22:25 +1100)]
BMesh: face-flip, no need for temporary edge-array

Reverse loops in-place.

3 years agoFix: setting an audio callback before audio device initialization.
Jörg Müller [Tue, 8 Nov 2016 23:06:49 +0000 (00:06 +0100)]
Fix: setting an audio callback before audio device initialization.

3 years agoDepsgraph: Use atomics to tag ID when evaluating driver
Sergey Sharybin [Tue, 8 Nov 2016 16:54:14 +0000 (17:54 +0100)]
Depsgraph: Use atomics to tag ID when evaluating driver

This is required since new dependency graph evaluates drivers in threads
so it was possible to have some partially written ID tag there.

3 years agoAtomics: Add 32 bit version of fetch and AND/OR
Sergey Sharybin [Tue, 8 Nov 2016 16:11:35 +0000 (17:11 +0100)]
Atomics: Add 32 bit version of fetch and AND/OR

3 years agoBMesh: remove edge search when flipping faces
Campbell Barton [Tue, 8 Nov 2016 13:04:58 +0000 (00:04 +1100)]
BMesh: remove edge search when flipping faces

Replace search with direct lookup.

3 years agoFix memory leak when Blender is build without Bullet and files with RB is opened
Sergey Sharybin [Tue, 8 Nov 2016 10:54:04 +0000 (11:54 +0100)]
Fix memory leak when Blender is build without Bullet and files with RB is opened

3 years agoFix T49838: Noise randomization for frame should be done per interframes as well
Sergey Sharybin [Tue, 8 Nov 2016 10:16:37 +0000 (11:16 +0100)]
Fix T49838: Noise randomization for frame should be done per interframes as well

Add subframe to the animated seed hash calculation.

Should be no difference for the regular files, only for cases when scene is
rendered from sequencer with a speed effect, which is not really a common thing.

3 years agoCycles: Only use new light sample threshold for new files
Sergey Sharybin [Tue, 8 Nov 2016 09:54:38 +0000 (10:54 +0100)]
Cycles: Only use new light sample threshold for new files

This is a late follow-up commit to the light sample threshold changes which
caused difference in rendering all existing .blend files which is not something
we are happy about: it is fine to use new optimized defaults for new files, but
existing ones should always be rendering in the same way as they used to be.

Sorry for the inconveniece, but such thing should have been done to begin with.
If this setting was modified it will not be reset to zero.

Now all render tests should be passing again.

P.S. Also really annoying to bump subversion for such reasons, but currently we
don't have better way to achieve what we want.

3 years agoFix T49937: Blender is crashing because of Lamp Data Node
Sergey Sharybin [Tue, 8 Nov 2016 09:40:21 +0000 (10:40 +0100)]
Fix T49937: Blender is crashing because of Lamp Data Node

Lamp Data node requires shadow sample array which is only enabled when
Shadows are enabled in the shading settings.

This commit prevents crash but might not give expected render results
in such a configuration.

3 years agoBMesh: remove redundant edge-split loop initialize
Campbell Barton [Mon, 7 Nov 2016 20:05:29 +0000 (07:05 +1100)]
BMesh: remove redundant edge-split loop initialize

Would always set both first1 and first2.

3 years agoForgot this in last commit. (Brick GLSL).
Thomas Dinges [Mon, 7 Nov 2016 19:59:09 +0000 (20:59 +0100)]
Forgot this in last commit. (Brick GLSL).

3 years agoFix Brick Texture GLSL, broken after Mortar Smooth addition.
Thomas Dinges [Mon, 7 Nov 2016 19:55:12 +0000 (20:55 +0100)]
Fix Brick Texture GLSL, broken after Mortar Smooth addition.

3 years agoBMesh: remove redundant array size
Campbell Barton [Fri, 4 Nov 2016 20:05:20 +0000 (07:05 +1100)]
BMesh: remove redundant array size

Correct unhelpful comment & some comment edits.

Rename 'disk_is_flagged' -> 'bm_vert_is_manifold_flagged',
since the check is quite specific.

3 years agoBMesh: minor improvement to edge-split assignment
Campbell Barton [Mon, 7 Nov 2016 17:12:10 +0000 (04:12 +1100)]
BMesh: minor improvement to edge-split assignment

3 years agoFix compilation error when CUDA toolkit is not installed
Sergey Sharybin [Thu, 11 Feb 2016 12:51:47 +0000 (13:51 +0100)]
Fix compilation error when CUDA toolkit is not installed

After CUDA dynload changes having CUDA toolkit became required
in order to compile Cycles. This only happened due to wrong
default value to the option.

3 years agoBuildbot: Update copy of buildbot master configuration
Sergey Sharybin [Mon, 7 Nov 2016 13:29:11 +0000 (14:29 +0100)]
Buildbot: Update copy of buildbot master configuration

3 years agoCycles: Remove device settings from performance tab
Lukas Stockner [Mon, 7 Nov 2016 12:22:53 +0000 (13:22 +0100)]
Cycles: Remove device settings from performance tab

This was included in the commit by accident, it doesn't belong there.

3 years agoDepsgraph: Disable timing profile
Sergey Sharybin [Mon, 7 Nov 2016 11:50:45 +0000 (12:50 +0100)]
Depsgraph: Disable timing profile

3 years agofix building depsgraph after recent changes
Martijn Berger [Mon, 7 Nov 2016 11:32:00 +0000 (12:32 +0100)]
fix building depsgraph after recent changes

3 years agoDepsgraph: Do not rely on indirectly included cstring
Sergey Sharybin [Mon, 7 Nov 2016 11:09:42 +0000 (12:09 +0100)]
Depsgraph: Do not rely on indirectly included cstring

Also add comment why exactly cstring is needed.

3 years agoProxy: Construct pchan hash when syncing armature proxy
Sergey Sharybin [Fri, 4 Nov 2016 16:46:41 +0000 (17:46 +0100)]
Proxy: Construct pchan hash when syncing armature proxy

This makes bone lookup much faster (by avoiding liner string lookup)
and speeds up depsgraph construction time on file open.

3 years agoDespgraph: Optimize cycles detection algorithm
Sergey Sharybin [Fri, 4 Nov 2016 16:45:14 +0000 (17:45 +0100)]
Despgraph: Optimize cycles detection algorithm

The idea is simple: when falling back to one of the nodes which was partially
handled we "resume" checking outgoing relations from the index which we stopped.

This gives about 15-20% depsgraph construction time save.

3 years agoDepsgraph: Speedup initial rig build time
Sergey Sharybin [Thu, 3 Nov 2016 16:47:38 +0000 (17:47 +0100)]
Depsgraph: Speedup initial rig build time

We don't need to sort bone channels, it's all taken care about
by the depsgraph itself.

Gives up to 30% initial rig construction time speedup.

3 years agoDepsgraph: Move key implementation from header to dedicated file
Sergey Sharybin [Thu, 3 Nov 2016 15:25:26 +0000 (16:25 +0100)]
Depsgraph: Move key implementation from header to dedicated file

3 years agoDepsgraph: Move class implementation from header to implementation files
Sergey Sharybin [Thu, 3 Nov 2016 15:03:12 +0000 (16:03 +0100)]
Depsgraph: Move class implementation from header to implementation files

This is more proper way to go:

- Avoids re-compilation of all dependent files when implementation changes
  without changed API,

- Linker should have much simpler time now de-duplicating and getting rid
  of redundant implementations.

3 years agoDepsgraph: Fully switch from string to const char*
Sergey Sharybin [Thu, 3 Nov 2016 13:45:47 +0000 (14:45 +0100)]
Depsgraph: Fully switch from string to const char*

This brings up to 10-20% depsgraph build time improvement in the layout
files from the studio repository.

3 years agoDepsgraph: Add extra name tag for operation nodes
Sergey Sharybin [Thu, 3 Nov 2016 13:31:27 +0000 (14:31 +0100)]
Depsgraph: Add extra name tag for operation nodes

The idea here is to address issue that name on it's own is not
always unique: for example, when adding driver operations the
name used for nodes is the RNA path (and multiple drivers can
write to different array indices of the path). Basically, now
it's possible to pass extra integer value to distinguish
operations in such cases.

So now we've already switched from sprintf() to construct unique
operation name to pass RNA path and array index.

There should be no functional changes yet, but this work is
required for further work about replacing string with const
char*.

3 years agoDepsgraph: Cleanup, operation has name, not description
Sergey Sharybin [Thu, 3 Nov 2016 13:22:41 +0000 (14:22 +0100)]
Depsgraph: Cleanup, operation has name, not description

Hopefully should make things more clear here.

3 years agoDepsgraph: Remove unused function
Sergey Sharybin [Thu, 3 Nov 2016 13:18:19 +0000 (14:18 +0100)]
Depsgraph: Remove unused function

A residue from times where we thought to do partial graph updates,
which we are not committing any time soon.

3 years agoDepsgraph: Use const char for component API
Sergey Sharybin [Thu, 3 Nov 2016 11:14:47 +0000 (12:14 +0100)]
Depsgraph: Use const char for component API

3 years agoDepsgraph: Remove some includes which seems unused
Sergey Sharybin [Thu, 3 Nov 2016 11:08:47 +0000 (12:08 +0100)]
Depsgraph: Remove some includes which seems unused

3 years agoDepsgraph: Use const char instead of string in part of drivers construction
Sergey Sharybin [Thu, 3 Nov 2016 11:01:45 +0000 (12:01 +0100)]
Depsgraph: Use const char instead of string in part of drivers construction

3 years agoDepsgraph: Switch away form string to const char* for node names
Sergey Sharybin [Thu, 3 Nov 2016 10:50:18 +0000 (11:50 +0100)]
Depsgraph: Switch away form string to const char* for node names

There is no real reason to have nodes storing heap-allocated name
and description. Doing this increases amount of allocations during
dependency graph building, which usually means somewhat slowness.

We're temporarily loosing some eyecandy in the graphviz visualizer,
but those we can bring back as a part of graphiz dump (which happens
much less often than depsgraph build).

This will happen in multiple commits for the ease of bisect in the
future just in case this causes any regression. This commit contains
ID creation API changes.

3 years agoDepsgraph: Remove prototype of unused and non-implemented method
Sergey Sharybin [Thu, 3 Nov 2016 10:36:35 +0000 (11:36 +0100)]
Depsgraph: Remove prototype of unused and non-implemented method

3 years agoExpose Bullet rotational spring settings in the UI.
Alexander Gavrilov [Mon, 7 Nov 2016 09:56:58 +0000 (12:56 +0300)]
Expose Bullet rotational spring settings in the UI.

Bullet spring constraint already supports rotational springs, but
they are not exposed in blender UI, likely due to a simple oversight.
Supporting them is as simple as adding a few DNA/RNA properties
with appropriate UI and passing them on to Bullet.

Reviewers: sergof

Reviewed By: sergof

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

3 years agoCycles: Refactor Device selection to allow individual GPU compute device selection
Lukas Stockner [Mon, 7 Nov 2016 01:33:53 +0000 (02:33 +0100)]
Cycles: Refactor Device selection to allow individual GPU compute device selection

Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).

From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.

Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

Subscribers: brecht, juicyfruit, mib2berlin, Blendify

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

3 years agoCycles: Fix T49952: Bad MIS sampling of backgrounds with single bright pixels
Lukas Stockner [Sun, 6 Nov 2016 18:12:45 +0000 (19:12 +0100)]
Cycles: Fix T49952: Bad MIS sampling of backgrounds with single bright pixels

With this fix, using a MIS map resolution equal to the image size for closest imterpolation or twice the size for linear interpolation gets rid of all fireflies.
Previously, a much higher resolution was needed to get acceptable noise levels.

3 years agoMSVC Runtime copy : Remove erroneously left in diagnostic message from CMakeLists.txt
lazydodo [Sat, 5 Nov 2016 20:04:23 +0000 (14:04 -0600)]
MSVC Runtime copy : Remove erroneously left in diagnostic message from CMakeLists.txt

3 years ago[msvc2015] Add support for copying the vc runtime.
lazydodo [Sat, 5 Nov 2016 19:58:32 +0000 (13:58 -0600)]
[msvc2015] Add support for copying the vc runtime.

There's more dll's hanging out in the ucrt folder, but  I just grabbed the ones blender requested (not sure if that's a wise idea, but it seems to work)

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

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

3 years agochange default for quicktime suport for macOS to off
Martijn Berger [Sat, 5 Nov 2016 13:23:00 +0000 (14:23 +0100)]
change default for quicktime suport for macOS to off

3 years agocycles, cuDeviceComputeCapability is deprecated as of cuda 5.0
Martijn Berger [Fri, 4 Nov 2016 13:49:54 +0000 (14:49 +0100)]
cycles, cuDeviceComputeCapability is deprecated as of cuda 5.0

3 years agoFix T49905: Segfault when copying object data of linked object.
Bastien Montagne [Fri, 4 Nov 2016 08:55:46 +0000 (09:55 +0100)]
Fix T49905: Segfault when copying object data of linked object.

We have to clear `newid` of all datablocks, not only object ones.

Note that this whole stuff is still using some kind of older, primitive
'ID remapping', would like to see whether we can replace it with new,
more generic one, but that's for another day.

3 years agoFix (unreported) asserts in `make_object_duplilist_real()`.
Bastien Montagne [Fri, 4 Nov 2016 07:30:22 +0000 (08:30 +0100)]
Fix (unreported) asserts in `make_object_duplilist_real()`.

Code would try to add multiple time the same key in `parent_gh` (for this
ghash a lot of dupliobjects may generate same key).

Was making the tool unusable in debug builds.

Also optimise things a bit by avoiding creating parent_gh when only
`use_base_parent` is set.

3 years agoFix T49918: Make duplicates real crash on clicking operator toggles.
Bastien Montagne [Fri, 4 Nov 2016 07:11:40 +0000 (08:11 +0100)]
Fix T49918: Make duplicates real crash on clicking operator toggles.

handle_mutex may be NULL here...

3 years agoFix T49903: Blender crashes -> Append Group incl. Object using boolean modifier
Bastien Montagne [Thu, 3 Nov 2016 20:06:10 +0000 (21:06 +0100)]
Fix T49903: Blender crashes -> Append Group incl. Object using boolean modifier

New code dealing with getting rid of lib-only cycles of data-blocks
could add several time the same datablock to the list of candidates. Now
this is avoided, and pointers are further cleaned up as double-safety
measure.

3 years agoinstall_deps cleanup: some Debian stuff was still present in the 'generic compile...
Bastien Montagne [Thu, 3 Nov 2016 19:08:04 +0000 (20:08 +0100)]
install_deps cleanup: some Debian stuff was still present in the 'generic compile-only' part of the script.

3 years agoAdd 'Set From Faces' tool to custom split normals.
Bastien Montagne [Wed, 2 Nov 2016 14:11:58 +0000 (15:11 +0100)]
Add 'Set From Faces' tool to custom split normals.

Feature request during bconf, makes sense to have it even as an hack for
now, since this is probably one of the most common use cases. This should
be redone in bmesh once we have proper custom noramls handling in edit mode...

3 years agoDepsgraph: Add code for timing despgraph builder
Sergey Sharybin [Thu, 3 Nov 2016 12:24:41 +0000 (13:24 +0100)]
Depsgraph: Add code for timing despgraph builder

3 years agoCycles: Fix missing underscore in geom_object.h
Lukas Stockner [Thu, 3 Nov 2016 11:38:00 +0000 (12:38 +0100)]
Cycles: Fix missing underscore in geom_object.h

3 years agoFix T49826: NEW-DEPSGRAPH - Texture is not updated after changing its space color
Sergey Sharybin [Thu, 3 Nov 2016 10:31:49 +0000 (11:31 +0100)]
Fix T49826: NEW-DEPSGRAPH - Texture is not updated after changing its space color

The issue was caused by image ID nodes not being in the depsgraph.

Now, tricky part: we only add nodes but do not add relations yet. Reasoning:

- It's currently important to only call editor's ID update callback to solve
  the issue, without need to flush changes somewhere deeper.

- Adding relations might cause some unwanted updates, so will leave that for
  a later investigation.

3 years agoDepsgraph: Fix wrong comparison of ID type vs. node type
Sergey Sharybin [Thu, 3 Nov 2016 10:19:42 +0000 (11:19 +0100)]
Depsgraph: Fix wrong comparison of ID type vs. node type

3 years agoFix T49857: Blender crashes after adding texture node to compositing tree
Sergey Sharybin [Thu, 3 Nov 2016 09:25:31 +0000 (10:25 +0100)]
Fix T49857: Blender crashes after adding texture node to compositing tree

3 years agoCycles: Fix OpenCL build error caused by light termination commit
Lukas Stockner [Thu, 3 Nov 2016 02:15:39 +0000 (03:15 +0100)]
Cycles: Fix OpenCL build error caused by light termination commit

3 years agoCycles: Fix T49901: OpenCL build error after recent light texture coordinate commit
Lukas Stockner [Thu, 3 Nov 2016 02:08:14 +0000 (03:08 +0100)]
Cycles: Fix T49901: OpenCL build error after recent light texture coordinate commit

Basically, the problem here was that the transform that's used to bring texture coordinates
to world space is either fetched while setting up the shader (with Object Motion is enabled) or
fetched when needed (otherwise). That helps to save ShaderData memory on OpenCL when Object Motion isn't needed.

Now, if OM is enabled, the Lamp transform can just be stored inside the ShaderData as well. The original commit just assumed it is.
However, when it's not (on OpenCL by default, for example), there is no easy way to fetch it when needed, since the ShaderData doesn't
store the Lamp index.

So, for now the lamps just don't support local texture coordinates anymore when Object Motion is disabled.
To fix and support this properly, one of the following could be done:
- Just always pre-fetch the transform. Downside: Memory Usage increases when not using OM on OpenCL
- Add a variable to ShaderData that stores the Lamp ID to allow fetching it when needed
- Store the Lamp ID inside prim or object. Problem: Cycles currently checks these for whether an object was hit - these checks would need to be changed.
- Enable OM whenever a Texture Coordinate's Normal output is used. Downside: Might not actually be needed.

3 years agoDepsgraph: Fix race condition writing drivers to array property
Sergey Sharybin [Wed, 2 Nov 2016 17:05:38 +0000 (18:05 +0100)]
Depsgraph: Fix race condition writing drivers to array property

Animation system has separate fcurves for each of array elements and
dependency graph creates separate nodes for each of fcurve, This is
needed to keep granularity of updates, but causes issues because
animation system will actually write the whole array to property when
modifying single value (this is a limitation of RNA API).

Worked around by adding operation relation between array drivers
so we never write same array form multiple threads.

3 years agotests: Update hash for OBJ
Sergey Sharybin [Wed, 2 Nov 2016 14:35:18 +0000 (15:35 +0100)]
tests: Update hash for OBJ

Was a recent update of UV precision.

3 years agoLibmv: Update tests to make tests pass after recent Ceres update
Sergey Sharybin [Wed, 2 Nov 2016 14:32:11 +0000 (15:32 +0100)]
Libmv: Update tests to make tests pass after recent Ceres update

Just a precision issue, difference is around 1e-7. Should be fine to
simply update expected value.

3 years agoSolve threading conflict when calculating smooth normals
Sergey Sharybin [Wed, 2 Nov 2016 14:09:32 +0000 (15:09 +0100)]
Solve threading conflict when calculating smooth normals

It was possible to have synchronization issues whe naccumulating smooth
normal to a vertex, causing shading artifacts during playback.

Bug found by Dalai, thanks!

3 years agoCOLLADA: Removed obsolete Export select option 'Both' which created invalid data...
Gaia Clary [Wed, 2 Nov 2016 13:11:46 +0000 (14:11 +0100)]
COLLADA: Removed obsolete Export select option 'Both' which created invalid data (duplicate transformation information for nodes)

3 years agoDepsgraph: Fix some errors printed to the console
Sergey Sharybin [Wed, 2 Nov 2016 11:23:00 +0000 (12:23 +0100)]
Depsgraph: Fix some errors printed to the console

They were not real issues, it's just some areas of code tried to create
relations between non-existing nodes without checking whether such
relations are really needed.

Now it should be easier to see real bugs printed.

Hopefully should be no regressions here.

3 years agoCycles standalone, compile fix UINT_MAX is not defined in device_cuda.cpp
Martijn Berger [Wed, 2 Nov 2016 09:54:47 +0000 (10:54 +0100)]
Cycles standalone, compile fix UINT_MAX is not defined in device_cuda.cpp

3 years agoCMake: Make ld.gold linker optional
Sergey Sharybin [Wed, 2 Nov 2016 09:42:15 +0000 (10:42 +0100)]
CMake: Make ld.gold linker optional

Some platforms are having hard time using this linker so added an option
to not use it. The options is an advanced one and enabled by default so
should not cause any changes for current users.

3 years agoCMake: Fix use of some option which was never defined
Sergey Sharybin [Wed, 2 Nov 2016 09:32:46 +0000 (10:32 +0100)]
CMake: Fix use of some option which was never defined

This way it seems more logical to me.

3 years ago[msvc/make.bat] Detect spaces in the build path and error out.
lazydodo [Tue, 1 Nov 2016 21:30:12 +0000 (15:30 -0600)]
[msvc/make.bat] Detect spaces in the build path and error out.

3 years agoChange frame for animations should not bein the UNDO stack
Dalai Felinto [Tue, 1 Nov 2016 21:09:42 +0000 (22:09 +0100)]
Change frame for animations should not bein the UNDO stack

Request from Hjalti Hjalmarsson for the animation work.

Basically a common part of the workflow of animation is to change the pose, scrub back and forth a few times and roll back the changes when unsatisfied.
However if you go back and forth too many times the UNDO stack would be full, and it would not be possible to bring back the previous pose.

I'm leaving clip_editor change frames as it is for now. But we can
probably change the behaviour there as well.

3 years agoAdd 'copy array' for rna buttons
Bastien Montagne [Tue, 1 Nov 2016 13:59:12 +0000 (14:59 +0100)]
Add 'copy array' for rna buttons

ctrl-alt-c/v allows to copy/paste whole RNA array, e.g. location, rotation, etc., from UI buttons.

Request from Andy at the studio.

3 years agoFix T49856: Blender 2.78 crashes after loading data from a blendfile
Bastien Montagne [Tue, 1 Nov 2016 12:39:31 +0000 (13:39 +0100)]
Fix T49856: Blender 2.78 crashes after loading data from a blendfile

Issue here was that py API code was keeping references (pointers) to the
liniked data-blocks, which can actually be duplicated and then deleted
during the 'make local' process...

Would have like to find a better way than passing optional GHash to get
the oldid->newid mapping, but could not think of a better idea.

3 years agoCeres: Update to the latest actual version
Sergey Sharybin [Tue, 1 Nov 2016 10:29:33 +0000 (11:29 +0100)]
Ceres: Update to the latest actual version

Brings all the fixes and improvements done in upstream within the last 13 months.

3 years agoAdded 'delete unlocked vertex groups' option.
Sybren A. Stüvel [Mon, 31 Oct 2016 14:31:47 +0000 (15:31 +0100)]
Added 'delete unlocked vertex groups' option.

3 years agoBMesh: radial loop (internal API symmetry)
Campbell Barton [Mon, 31 Oct 2016 11:52:06 +0000 (22:52 +1100)]
BMesh: radial loop (internal API symmetry)

Radial append/remove had swapped args and *slightly* different behavior.
- bmesh_radial_append(edge, loop)
- bmesh_radial_loop_remove(loop, edge)

Match logic for append/remove,
Logic for the one case where the edge needs to be left untouched
has been moved to: `bmesh_radial_loop_unlink`.

3 years agoBMesh: simplify vert & edge removal
Campbell Barton [Mon, 31 Oct 2016 11:07:23 +0000 (22:07 +1100)]
BMesh: simplify vert & edge removal

3 years agoBMesh: remove redundant walker member & assignment
Campbell Barton [Sat, 29 Oct 2016 11:31:01 +0000 (22:31 +1100)]
BMesh: remove redundant walker member & assignment

3 years agoCycles: Deduplicate AO calculation
Lukas Stockner [Sun, 30 Oct 2016 23:40:05 +0000 (00:40 +0100)]
Cycles: Deduplicate AO calculation

No functional changes.

3 years agoUI: Don't show empty panel right-click menu
Julian Eisel [Sun, 30 Oct 2016 23:08:13 +0000 (00:08 +0100)]
UI: Don't show empty panel right-click menu

3 years agoCycles: Fix OpenCL compilation with the new brick texture
Lukas Stockner [Sun, 30 Oct 2016 15:25:35 +0000 (16:25 +0100)]
Cycles: Fix OpenCL compilation with the new brick texture

3 years agoCycles: Style Fix: Light sampling threshold description
Lukas Stockner [Sun, 30 Oct 2016 12:51:03 +0000 (13:51 +0100)]
Cycles: Style Fix: Light sampling threshold description

3 years agoViewport smoke: add support to render the volume using a color ramp.
Kévin Dietrich [Sun, 30 Oct 2016 11:29:05 +0000 (12:29 +0100)]
Viewport smoke: add support to render the volume using a color ramp.

This is yet another debug option that allows to render an arbitrary
simulation field by using a color ramp to inspect its voxel values.
Note that when using this, fire rendering is turned off.

Reviewers: plasmasolutions, gottfried

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

3 years agoCycles: Initialize the RNG state from the kernel instead of the host
Lukas Stockner [Sat, 29 Oct 2016 22:56:39 +0000 (00:56 +0200)]
Cycles: Initialize the RNG state from the kernel instead of the host

This allows to save a memory copy, which will be particularly useful for network rendering.

Reviewers: sergey, brecht, dingto, juicyfruit, maiself

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

3 years agoCycles: Add optional probabilistic termination of light samples based on their expect...
Lukas Stockner [Sat, 29 Oct 2016 21:47:30 +0000 (23:47 +0200)]
Cycles: Add optional probabilistic termination of light samples based on their expected contribution

In scenes with many lights, some of them might have a very small contribution to some pixels, but the shadow rays are traced anyways.
To avoid that, this patch adds probabilistic termination to light samples - if the contribution before checking for shadowing is below a user-defined threshold, the sample will be discarded with probability (1 - (contribution / threshold)) and otherwise kept, but weighted more to remain unbiased.
This is the same approach that's also used in path termination based on length.

Note that the rendering remains unbiased with this option, it just adds a bit of noise - but if the setting is used moderately, the speedup gained easily outweighs the additional noise.

Reviewers: #cycles

Subscribers: sergey, brecht

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