2 years agoBMesh: Minor improvement to face-join
Campbell Barton [Fri, 11 Nov 2016 23:06:53 +0000 (10:06 +1100)]
BMesh: Minor improvement to face-join

Pass in loops instead of edge & faces.
Nearly all callers have the loop-pairs to pass in.

2 years agoFix renaming error in last commit
Campbell Barton [Fri, 11 Nov 2016 23:29:38 +0000 (10:29 +1100)]
Fix renaming error in last commit

2 years agoBKE_library_make_local(): some minor improvements.
Bastien Montagne [Fri, 11 Nov 2016 22:15:55 +0000 (23:15 +0100)]
BKE_library_make_local(): some minor improvements.

Do not set 'real user' to groups every time we run the first clearing loop.

And do fully clear properly LIB_TAG_DOIT (this is not yet enforced in
existing code, but would love to get to that stage in future, so let's
do it at least with new code!).

2 years agoMinor naming cleanup.
Bastien Montagne [Fri, 11 Nov 2016 21:56:47 +0000 (22:56 +0100)]
Minor naming cleanup.

2 years agoEnhance BKE_library_make_local() to make it much quicker in complex cases.
Bastien Montagne [Fri, 11 Nov 2016 21:29:54 +0000 (22:29 +0100)]
Enhance BKE_library_make_local() to make it much quicker in complex cases.

Basic idea is to split first loop in two, and run checks before making
anything actually local, to detect data-blocks that we can directly make
local (because we are sure they are only used by already/future local

This allows to avoid a lot of overhead in later 'cleanup' steps of this
function, here with barbershop shot it's four times quicker (from 190s to 48s).

We are still far from the instantaneous results of MakeLocal in 2.77,
but in that version main characters lose their connection to their
armature and remain static after makelocal, so guess new code is still
better. ;)

There are probably more optimizations possible here, but would rather
polish this area of code once we get rid of proxies, those really
make it a nightmare to work on.

2 years agoMinor optimization to BKE_library_tag_unused_linked_data().
Bastien Montagne [Fri, 11 Nov 2016 18:32:59 +0000 (19:32 +0100)]
Minor optimization to BKE_library_tag_unused_linked_data().

2 years agoSwitch to unsafe but quick freeing of archipelagos of linked data.
Bastien Montagne [Fri, 11 Nov 2016 17:58:00 +0000 (18:58 +0100)]
Switch to unsafe but quick freeing of archipelagos of linked data.

This *should* work, but do not hesitate to revert in case it creates new
crashes in append or makelocal processes.

2 years agoFix T49996: VSE opengl render crash with grease pencil if current frame is empty
Antonioya [Fri, 11 Nov 2016 21:27:10 +0000 (22:27 +0100)]
Fix T49996: VSE  opengl render crash with grease pencil if current frame is empty

If the opengl render with grease pencil is run from VSE with the current
frame outside visible frames, the render pass is wrong and the render
must be canceled because nothing to render. Related to #T49975

2 years agoGPencil: Create brush set when create new datablock or layer
Antonioya [Fri, 11 Nov 2016 19:04:30 +0000 (20:04 +0100)]
GPencil: Create brush set when create new datablock or layer

Before this commit, the brush set was created with the first stroke
drawing, but if the user creates the datablock or the layer manually
(not drawing) the brush list was empty.

This commit complement the python fix by Sergey:

2 years agoFix crash happening in some cases with MakeLocal operator.
Bastien Montagne [Fri, 11 Nov 2016 17:05:01 +0000 (18:05 +0100)]
Fix crash happening in some cases with MakeLocal operator.

Culprit here was once more proxies. Think what was happening here was:
1) Both proxy and proxified armatures' PoseChannels were cleared
   (needed after remapping due to Bone pointers being stored in pchans).
2) Proxy PoseChannels got rebuilt in `BKE_pose_rebuild_ex()`, which ends,
   in proxy cases, by actually replacing rebuilt pchans by those from
   the proxified object... which has not yet been rebuilt.

Fixed the issue by merely adding bone pointer to data copied from
original pchan into new 'from proxy' one... Sounds much, much safer and
sanier anyway, that way we can be sure bone pointer is actually pointing
to a bone of the object's armature (this is supposed to be the same
Armature datablock between proxy and proxified objects, but that may not
be always true especially during makelocal process).

2 years agoFix T49994: Setting dupligroup which uses indirect relation will crash
Sergey Sharybin [Fri, 11 Nov 2016 15:15:34 +0000 (16:15 +0100)]
Fix T49994: Setting dupligroup which uses indirect relation will crash

Did similar trick to old dependency graph: tag invisible relations for update.

Might need some re-consideration, see the comment.

This should solve our issues with powerlib addon here in the studio.

2 years agoDepsgraph: Add missing NULL pointer check
Sergey Sharybin [Fri, 11 Nov 2016 14:28:34 +0000 (15:28 +0100)]
Depsgraph: Add missing NULL pointer check

2 years agoDepsgraph: Fix missing DONE flag in relations builder
Sergey Sharybin [Fri, 11 Nov 2016 14:20:17 +0000 (15:20 +0100)]
Depsgraph: Fix missing DONE flag in relations builder

Was causing relations be build twice in certain cases.

2 years agoFix T49993: Indirectly used taper/bevel crashes new dependency graph
Sergey Sharybin [Fri, 11 Nov 2016 13:46:19 +0000 (14:46 +0100)]
Fix T49993: Indirectly used taper/bevel crashes new dependency graph

New dependency graph expects strict separation between nodes and relations builder,
meaning, if we try to create relation with an object which is not in the graph yet
we'll have an error in depsgraph.

Now, so far object nodes were created from bases of the current scene, which caused
missing objects in graph in certain cases.

Didn't find better approach than to simply ensure object nodes exists when we know
they'll be used by relation builder.

2 years agoDepsgraph: Fix typo in text on curve relation builder
Sergey Sharybin [Fri, 11 Nov 2016 13:41:02 +0000 (14:41 +0100)]
Depsgraph: Fix typo in text on curve relation builder

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

2 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

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

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

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

2 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

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

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

2 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 :/).

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

2 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?

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

2 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

2 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

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

2 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

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

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

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

2 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).

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

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

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

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

2 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

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

2 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

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

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

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

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

2 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).

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

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

2 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

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

2 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

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

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

2 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

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

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

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

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

2 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

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

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

2 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

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

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

2 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

2 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

2 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

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

2 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

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

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

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

2 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

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

2 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

2 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

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

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

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

2 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

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

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

2 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

2 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

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

2 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

2 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

2 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

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

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

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

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

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

2 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)

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

2 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

2 years agoCMake: Make linker optional
Sergey Sharybin [Wed, 2 Nov 2016 09:42:15 +0000 (10:42 +0100)]
CMake: Make 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.

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

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