2 years agoCycles: Cleanup, style
Sergey Sharybin [Tue, 18 Apr 2017 09:39:21 +0000 (11:39 +0200)]
Cycles: Cleanup, style

2 years agoDepsgraph: Use proper scene to get frame from for pose constraints evaluaiton
Sergey Sharybin [Tue, 18 Apr 2017 09:31:45 +0000 (11:31 +0200)]
Depsgraph: Use proper scene to get frame from for pose constraints evaluaiton

Spotted by Luca, thanks!

2 years agoCycles: Remove meaningless volume shaders
Sergey Sharybin [Tue, 21 Mar 2017 16:18:25 +0000 (17:18 +0100)]
Cycles: Remove meaningless volume shaders

This is possible to use surface-only nodes and connect them to volume output.
If there was something connected to surface output those extra connections
will not change anything visually but will force volume features to be included
into feature-adaptive kernels.

In fact, this exact reason seems to be causing slowdown of Barcelone file
comparing AMD OpenCL to NVidia CUDA.

Currently only supported by the final F12 renders because of the current design
of what gets optimized out when and how feature-adaptive kernel accesses
list of required features.

Reviewers: dingto, nirved, maiself, lukasstockner97, brecht

Reviewed By: brecht

Subscribers: bliblubli

Differential Revision:

2 years agoFix strict compiler compilation
Sergey Sharybin [Tue, 18 Apr 2017 07:41:15 +0000 (09:41 +0200)]
Fix strict compiler compilation

2 years agoFix UI: double separator in Movie Clip Editor's view menu
Aaron Carlisle [Tue, 18 Apr 2017 03:54:19 +0000 (23:54 -0400)]
Fix UI: double separator in Movie Clip Editor's view menu

2 years agoFix brush menu broken before adding uv and texture data
Aaron Carlisle [Tue, 18 Apr 2017 03:42:17 +0000 (23:42 -0400)]
Fix brush menu broken before adding uv and texture data

To reproduce: 1) go to texture paint mode 2) go into the brush menu

Pointed out by @lijenstina on IRC also fix is authored by him.

2 years agoFix T51150: user_remap on itself changes users to 0.
Bastien Montagne [Mon, 17 Apr 2017 20:33:07 +0000 (22:33 +0200)]
Fix T51150: user_remap on itself changes users to 0.

Remapping to itself is nonsense here (was triggering an assert in
BKE_library code actually), just make it a bail out early in RNA
callback in that case.

2 years agoFix T51176: Cache file location can be blank and prevent fluid simulation from readin...
Bastien Montagne [Mon, 17 Apr 2017 15:26:18 +0000 (17:26 +0200)]
Fix T51176: Cache file location can be blank and prevent fluid simulation from reading baked data

Sanitize a bit how cache path is handled by fluidsim (there is much more
to be done here though :( ), and forbid empty path (we reset to default
path relative to current .blend file in case it's empty).

If people really, really want to use current OS-wise directory, they can at
least use '.' as path. ;)

2 years agoBLI: make BLI_make_existing_file() return true on success, and false on failure...
Bastien Montagne [Mon, 17 Apr 2017 10:04:38 +0000 (12:04 +0200)]
BLI: make BLI_make_existing_file() return true on success, and false on failure...

2 years agoFluidsim cleanup: get rid of magic numbers!
Bastien Montagne [Mon, 17 Apr 2017 09:55:02 +0000 (11:55 +0200)]
Fluidsim cleanup: get rid of magic numbers!

2 years agoFix build error on Windows introduced in D2425
Alexander Romanov [Mon, 17 Apr 2017 10:41:05 +0000 (13:41 +0300)]
Fix build error on Windows introduced in D2425

2 years agoObject.raycast: more minor improvements ...
Germano Cavalcante [Sun, 16 Apr 2017 21:50:06 +0000 (18:50 -0300)]
Object.raycast: more minor improvements ...
- if it is to check a bool, let it be local;
- removes gotos;

2 years agoFix T49617: Grease Pencil Stroke Placement regression
Antonio Vazquez [Sun, 16 Apr 2017 15:52:39 +0000 (17:52 +0200)]
Fix T49617: Grease Pencil Stroke Placement regression

When moved the options to toolsetting, this part was missing. The problem was not the pointer as suggested in D2629.

Thanks Arvīds Kokins for his help fixing this bug

2 years agoFix T51149: Joining curves allows 2D curves in 3D
Campbell Barton [Sat, 15 Apr 2017 06:50:12 +0000 (16:50 +1000)]
Fix T51149: Joining curves allows 2D curves in 3D

2 years agoObject.raycast: error in previous commit
Germano Cavalcante [Sat, 15 Apr 2017 05:31:33 +0000 (02:31 -0300)]
Object.raycast: error in previous commit

This is taking longer than I expected.

2 years agoFix: Object.raycast: error to free treedata
Germano Cavalcante [Sat, 15 Apr 2017 05:24:04 +0000 (02:24 -0300)]
Fix: Object.raycast: error to free treedata

2 years agoObject.raycast: Also test distance from BoundBox
Germano Cavalcante [Sat, 15 Apr 2017 04:31:24 +0000 (01:31 -0300)]
Object.raycast: Also test distance from BoundBox

If `isect_ray_aabb_v3_simple` provides this information, why not take advantage of it?

2 years agoObject.raycast: Test the hit on the BoundBox first
Germano Cavalcante [Sat, 15 Apr 2017 03:44:05 +0000 (00:44 -0300)]
Object.raycast: Test the hit on the BoundBox first

This avoids the unnecessary creation of bvhtree, which can be highly inefficient in some cases
(for example: in the `` template)

2 years agoFix Player stubs (tm)
Jens Verwiebe [Fri, 14 Apr 2017 23:09:44 +0000 (01:09 +0200)]
Fix Player stubs (tm)

2 years agoFix T51216: SSAO attenuation not being scale invariant.
Brecht Van Lommel [Fri, 14 Apr 2017 22:02:55 +0000 (00:02 +0200)]
Fix T51216: SSAO attenuation not being scale invariant.

Unfortunately this does break compatibility in that the viewport will look a
bit different depending on the settings, but the old behavior was simply not
usable for higher distances.

2 years agoAlembic import: fixed dupligroup export when the dupli-empty has a parent
Sybren A. Stüvel [Fri, 14 Apr 2017 16:20:24 +0000 (18:20 +0200)]
Alembic import: fixed dupligroup export when the dupli-empty has a parent

2 years agoAlembic export: fixed flattened dupligroup import
Sybren A. Stüvel [Fri, 14 Apr 2017 14:38:26 +0000 (16:38 +0200)]
Alembic export: fixed flattened dupligroup import

2 years agoObject Info node support for GLSL mode and the internal render
Alexander Romanov [Fri, 14 Apr 2017 15:13:44 +0000 (18:13 +0300)]
Object Info node support for GLSL mode and the internal render

Object Info node can be useful to give some variation to a single material assigned to multiple instances. This patch adds support for Viewport and BI.


Example: {F499528}

Reviewers: merwin, brecht, dfelinto

Reviewed By: brecht

Subscribers: duarteframos, fclem, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision:

2 years agoFix T49429: incorrect Blender internal viewport border render with DrawPixels method.
Brecht Van Lommel [Fri, 14 Apr 2017 14:26:10 +0000 (16:26 +0200)]
Fix T49429: incorrect Blender internal viewport border render with DrawPixels method.

2 years agoAlembic import: greatly improved curve/hair import performance
Sybren A. Stüvel [Fri, 14 Apr 2017 13:26:45 +0000 (15:26 +0200)]
Alembic import: greatly improved curve/hair import performance

The U-resolution of the imported curves was kept at the default value
of 12, which is way too high for imported hair. We export hair at a
fairly high resolution already, so it's not needed to subdivide even
further when importing.

Of course this may have an impact on other curves that do require this
U-resolution to be higher. In that case the resolution can be
increased after importing.

I removed the default nu->orderu = num_verts, as that allowed every
point to influence the entire spline, which was more expensive for the
CPU, and unlikely to be needed. The orderu computations had off-by-one
errors in the curve importer, which are now also fixed. The correct
values are:

    - Linear: orderu = 2
    - Quadratic: orderu = 3
    - Cubic: orderu = 4

These values are also what is stored in the Alembic file for curves of
type kVariableOrder, according to the reference Maya exporter
maya/AbcExport/MayaNurbsCurveWriter.cpp, function
MayaNurbsCurveWriter::write(), in the Alembic source code.

The result is a frame rate increase of roughly 100x (tested with one
100-hair test on one machine, so take with grain of salt).

2 years agoAdded simple unittests for Alembic exporter
Sybren A. Stüvel [Fri, 14 Apr 2017 10:54:20 +0000 (12:54 +0200)]
Added simple unittests for Alembic exporter

This test checks that a set of cubes are exported with the correct
transform, both with flatten=True and flatten=False.

This commit also adds an easy to use superclass for upcoming Alembic
unit tests.

2 years agoCleanup: triple quotes for docstrings
Campbell Barton [Fri, 14 Apr 2017 10:01:43 +0000 (20:01 +1000)]
Cleanup: triple quotes for docstrings

2 years agoBLF: avoid glyph cache use-after free
Campbell Barton [Fri, 14 Apr 2017 09:52:29 +0000 (19:52 +1000)]
BLF: avoid glyph cache use-after free

Causes crash if the font size isn't set after clearing (see T51200)

2 years agoBuildbot: Fix typos
Sergey Sharybin [Fri, 14 Apr 2017 08:03:30 +0000 (10:03 +0200)]
Buildbot: Fix typos

2 years agoBuildbot: Attempt to fix CUDA compilation on OSX
Sergey Sharybin [Fri, 14 Apr 2017 08:01:28 +0000 (10:01 +0200)]
Buildbot: Attempt to fix CUDA compilation on OSX

Stupid toolkit is really fragile about CLang version.

2 years agoUI: Add/Improve a few tooltips
Aaron Carlisle [Thu, 13 Apr 2017 22:07:10 +0000 (18:07 -0400)]
UI: Add/Improve a few tooltips

See T51061

2 years agoAlembic export: unified code of exploreTransform and exploreObject.
Sybren A. Stüvel [Tue, 11 Apr 2017 12:59:48 +0000 (14:59 +0200)]
Alembic export: unified code of exploreTransform and exploreObject.

2 years agoAlembic export: added support for writing dupli-groups
Sybren A. Stüvel [Wed, 12 Apr 2017 10:35:09 +0000 (12:35 +0200)]
Alembic export: added support for writing dupli-groups

This supports our common character animation workflow, where a character,
its rig, and the custom bone shapes are all part of a group. This group
is then linked into the scene, the rig is proxified and animated. Such
a group can now be exported. Use "Renderable objects only" to prevent
writing the custom bone shapes to the Alembic file.

2 years agoFix Surface Deform crash with missing or freed DM
Luca Rood [Thu, 13 Apr 2017 13:39:16 +0000 (15:39 +0200)]
Fix Surface Deform crash with missing or freed DM

2 years agoCycles: Make vectorized types constructor from register explicit
Sergey Sharybin [Thu, 13 Apr 2017 13:07:07 +0000 (15:07 +0200)]
Cycles: Make vectorized types constructor from register explicit

This is not a cheap operation which we dont' want to happen silently.

2 years agoCycles: Remove unused function
Sergey Sharybin [Thu, 13 Apr 2017 13:01:55 +0000 (15:01 +0200)]
Cycles: Remove unused function

It was quite wrong actually by doing some __m128 to flaot4 round trips.

2 years agoAlembic import: fixed off-by-one error in start/end frame
Sybren A. Stüvel [Thu, 13 Apr 2017 12:50:02 +0000 (14:50 +0200)]
Alembic import: fixed off-by-one error in start/end frame

static_cast<int> truncates, so a computed end frame of 99.999999999998
would result in 99, instead of the correct 100.

2 years agoTask scheduler: Fix typo in TLS for pools created from non-main thread
Sergey Sharybin [Thu, 13 Apr 2017 11:32:39 +0000 (13:32 +0200)]
Task scheduler: Fix typo in TLS for pools created from non-main thread

Did a mistake which started to use same TLS for all threads for such pools.

Also added some extra asserts to help catching the bugs.

2 years agoFix Blenderplayer (c)
Bastien Montagne [Thu, 13 Apr 2017 10:36:19 +0000 (12:36 +0200)]
Fix Blenderplayer (c)

2 years agoAdd red alert in UI controls for datablock pointer properties
Alexander Romanov [Thu, 13 Apr 2017 09:59:04 +0000 (12:59 +0300)]
Add red alert in UI controls for datablock pointer properties

2 years agoDatablock ID Properties
Alexander Romanov [Thu, 13 Apr 2017 09:30:03 +0000 (12:30 +0300)]
Datablock ID Properties

The absence of datablock properties "will certainly be resolved soon as the need for them is becoming obvious" said the [[|Python Nodes release notes]]. So this patch allows Python scripts to create ID Properties which reference datablocks.
This functionality is implemented for `PointerProperty` and now such properties can be created with Python.

In addition to the standard update callback, `PointerProperty` can have a `poll` callback (standard RNA) which is useful for search menus. For details see the test included in this patch.

Original author: @artfunkel

Alexander (Blend4Web Team)

Reviewers: brecht, artfunkel, mont29, campbellbarton

Reviewed By: mont29, campbellbarton

Subscribers: jta, sergey, campbellbarton, wisaac, poseidon4o, mont29, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov, fjuhec, sharlybg, cardboard, duarteframos, blueprintrandom, a.romanov, BYOB, disnel, aditiapratama, bliblubli, dfelinto, lukastoenne

Maniphest Tasks: T37754

Differential Revision:

2 years agoCycles: Header cleanup in BVH: move self header to be the first one
Sergey Sharybin [Thu, 13 Apr 2017 09:20:33 +0000 (11:20 +0200)]
Cycles: Header cleanup in BVH: move self header to be the first one

This makes us more sure that header files are more self-sufficient.

2 years agoCycles: Split BVH implementations into separate files
Sergey Sharybin [Thu, 13 Apr 2017 08:55:46 +0000 (10:55 +0200)]
Cycles: Split BVH implementations into separate files

2 years agoCycles: Use more explicit and commonly used names for BVH structures
Sergey Sharybin [Thu, 13 Apr 2017 08:29:14 +0000 (10:29 +0200)]
Cycles: Use more explicit and commonly used names for BVH structures

This renames BinaryBVH to BVH2 and QBVH to BVH8. There is no user measurable
difference, but allows us to add more types of BVH trees such as BVH8.

2 years agoTask scheduler: Prevent race condition for the pools created from non-main thread
Sergey Sharybin [Wed, 12 Apr 2017 16:18:33 +0000 (18:18 +0200)]
Task scheduler: Prevent race condition for the pools created from non-main thread

We can not re-use anything for such pools, because we will know nothing about whether
the main thread is sleeping or not. So we identify such threads as 0, but we don't
use main thread's TLS.

This fixes dead-locks and crashes reported by Luca when doing playblasts.

2 years agoFix T50227: Alembic uv export/load issue
Sybren A. Stüvel [Wed, 12 Apr 2017 14:33:40 +0000 (16:33 +0200)]
Fix T50227: Alembic uv export/load issue

Previously only a CD_MLOOPUV custom data layer was created. Now we also
create the accompanying CD_MTEXPOLY layer too.

2 years agoFix T51184: Crash of Blender when I try to join an object with one that has booleans...
Sergey Sharybin [Wed, 12 Apr 2017 14:12:28 +0000 (16:12 +0200)]
Fix T51184: Crash of Blender when I try to join an object with one that has booleans modifiers

2 years agoAlembic export: fixed exporting as "flat"
Sybren A. Stüvel [Wed, 12 Apr 2017 10:15:32 +0000 (12:15 +0200)]
Alembic export: fixed exporting as "flat"

This exports all objects in world coordinates without parenting.

2 years agoAlembic export: removed superfluous export_object() check.
Sybren A. Stüvel [Tue, 11 Apr 2017 12:07:26 +0000 (14:07 +0200)]
Alembic export: removed superfluous export_object() check.

The exploreTransform() function already does this check, and the check
isn't necessary when the object type isn't exported anyway.

2 years agoCleanup: use lowercase gpu prefix for static funcs
Campbell Barton [Wed, 12 Apr 2017 10:18:44 +0000 (20:18 +1000)]
Cleanup: use lowercase gpu prefix for static funcs

This was mostly followed already.

2 years agoColor management: Avoid memory copy into same buffer
Sergey Sharybin [Wed, 12 Apr 2017 08:23:38 +0000 (10:23 +0200)]
Color management: Avoid memory copy into same buffer

2 years agoDocs: minor improvement to code example
Campbell Barton [Wed, 12 Apr 2017 04:21:59 +0000 (14:21 +1000)]
Docs: minor improvement to code example

2 years agoFix: width of UILayout.prop_enum() buttons
raa [Tue, 11 Apr 2017 10:25:46 +0000 (13:25 +0300)]
Fix: width of UILayout.prop_enum() buttons

2 years agoCycles: Only calculate global size of split kernel once to avoid changes
Mai Lavelle [Tue, 11 Apr 2017 07:02:43 +0000 (03:02 -0400)]
Cycles: Only calculate global size of split kernel once to avoid changes

Global size depends on memory usage which might change during rendering.
Havent seen it happen but seems possible that this could cause the global
size to be different than what was used for allocating buffers.

2 years agoCycles: Implement automatic global size for CUDA split kernel
Mai Lavelle [Tue, 11 Apr 2017 06:36:08 +0000 (02:36 -0400)]
Cycles: Implement automatic global size for CUDA split kernel

Not sure this is the best way to do things for CUDA but its much better than
being unimplemented.

2 years agoCleanup: quiet harmless but annoying overflow
Campbell Barton [Tue, 11 Apr 2017 01:48:00 +0000 (11:48 +1000)]
Cleanup: quiet harmless but annoying overflow

Caused asan to print warnings generating RNA

2 years agoRemove redundant glColor call
Campbell Barton [Tue, 11 Apr 2017 00:47:00 +0000 (10:47 +1000)]
Remove redundant glColor call

2 years agoCycles: Fix the AO replacement option in the split kernel
Lukas Stockner [Mon, 10 Apr 2017 22:53:31 +0000 (00:53 +0200)]
Cycles: Fix the AO replacement option in the split kernel

Currently the code for it was inside the hair-specific part, so it wouldn't be enabled in hairless renders.

2 years agoUI: Add missing UV tools in the UV/Image Editor Window > Tools tab
Aaron Carlisle [Mon, 10 Apr 2017 22:37:03 +0000 (18:37 -0400)]
UI: Add missing UV tools in the UV/Image Editor Window > Tools tab

Original Author: @xrg
Changes By @blendify

Image of patch: {F284237}

2 years agoUI: Do not put walk navigation settings inside an if statement
Aaron Carlisle [Mon, 10 Apr 2017 21:44:03 +0000 (17:44 -0400)]
UI: Do not put walk navigation settings inside an if statement

The issue here is that the preferences are still used because both can be accessed from the 3D View, view menu. In the future, it is likely that the old mode will be removed (maybe 2.8?) but for now we want to keep both operational.

Differential revision:

2 years agoFix stereoscopic camera volume drawing.
Bastien Montagne [Mon, 10 Apr 2017 15:31:39 +0000 (17:31 +0200)]
Fix stereoscopic camera volume drawing.

Not sure how we got to that point, but code was drawing twice one side
of the camera volume, and not at all another side!

2 years agoCycles: Fix race condition in shader attribute for real now
Sergey Sharybin [Mon, 10 Apr 2017 14:53:01 +0000 (16:53 +0200)]
Cycles: Fix race condition in shader attribute for real now

Ended up moving lock in the more centralized space since multiple shaders
can access this map.

2 years agoGPencil 2D drawing code: minor optimization.
Bastien Montagne [Mon, 10 Apr 2017 14:28:40 +0000 (16:28 +0200)]
GPencil 2D drawing code: minor optimization.

Do not recompute both points's 2D coordinates for each segments, we can
copy over from previous one... Does not gives any measurable speedup off
hands, though.

2 years agoFix T51158: Motion Tracking Movie clip editor graph
Sergey Sharybin [Mon, 10 Apr 2017 14:16:12 +0000 (16:16 +0200)]
Fix T51158: Motion Tracking Movie clip editor graph

2 years agoTracking: Fix use-after-free bug
Sergey Sharybin [Mon, 10 Apr 2017 14:01:58 +0000 (16:01 +0200)]
Tracking: Fix use-after-free bug

2 years agoInstall deps: Fix compilation error of Alembic
Luca Rood [Mon, 10 Apr 2017 13:53:37 +0000 (15:53 +0200)]
Install deps: Fix compilation error of Alembic

Couple of things here:

- Boost is not necesserily compiled into your /opt/lib and system-wide
  version might have been used. The recent change in Alembic did not
  take this into account.

- Alembic needs some extra component of Boost.
  This part might be missing now for other distros than DEB.

2 years agoCycles: Apparently board name could be an empty string
Sergey Sharybin [Mon, 10 Apr 2017 13:31:21 +0000 (15:31 +0200)]
Cycles: Apparently board name could be an empty string

2 years agoCycles: Workaround cubic volume filtering crashing on Linux
Sergey Sharybin [Mon, 10 Apr 2017 12:42:17 +0000 (14:42 +0200)]
Cycles: Workaround cubic volume filtering crashing on Linux

The issue was caused by recent change in inline policy.

There is some sort of memory corruption happening here, ASAN suggests
it's stack overflow issue. Not quite sure why it is happening tho and
was not able to solve anything here yet in the past hours.

Committing fix which works with a big TODO note.

The issue is visible on AVX2 machine when rendering cycles_reports_test.

2 years agoCycles: Fix compilation error of AVX2 kernels with SSE optimization disabled
Sergey Sharybin [Mon, 10 Apr 2017 11:37:19 +0000 (13:37 +0200)]
Cycles: Fix compilation error of AVX2 kernels with SSE optimization disabled

2 years agoCycles: Cleanup, indentation and trailing whitespace
Sergey Sharybin [Mon, 10 Apr 2017 08:59:31 +0000 (10:59 +0200)]
Cycles: Cleanup, indentation and trailing whitespace

2 years agoPyAPI: Fast buffer access to id property arrays
Jacques Lucke [Mon, 10 Apr 2017 11:06:00 +0000 (21:06 +1000)]
PyAPI: Fast buffer access to id property arrays

Support Python's buffer protocol for ID-properties.

2 years agoCleanup: use doxy code block
Campbell Barton [Sun, 9 Apr 2017 06:26:04 +0000 (16:26 +1000)]
Cleanup: use doxy code block

2 years agoListBase: Add insert-replace function
Campbell Barton [Sun, 9 Apr 2017 06:07:09 +0000 (16:07 +1000)]
ListBase: Add insert-replace function

Handy to replace an existing link
(without having to store before/after links)

Use for id-props

2 years agoCycles: Fix building of CUDA kernels with compilers where C++11 is disabled
Mai Lavelle [Sat, 8 Apr 2017 11:12:04 +0000 (07:12 -0400)]
Cycles: Fix building of CUDA kernels with compilers where C++11 is disabled

2 years agoAdd helpers in bpy_extras.keyconfig_utils for addons to (un)register their keymaps.
Bastien Montagne [Sat, 8 Apr 2017 09:06:44 +0000 (11:06 +0200)]
Add helpers in bpy_extras.keyconfig_utils for addons to (un)register their keymaps.

Doing this in a fully 'clean' way is far from obvious, especially
unregister, you often end up leaving nasty 'orphanned' keymap items
referring to unregistered operators...

2 years agoCycles: Fix warning with MSVC
Sergey Sharybin [Fri, 7 Apr 2017 16:28:16 +0000 (18:28 +0200)]
Cycles: Fix warning with MSVC

2 years agoCycles: Fix compilation error with certain CUDA and host compiler configuration
Sergey Sharybin [Fri, 7 Apr 2017 16:27:07 +0000 (18:27 +0200)]
Cycles: Fix compilation error with certain CUDA and host compiler configuration

This seems to happen on Windows only, happened to Thomas and Nathan already.

Similar patch Thomas was showing, but i do not see it committted. So comitting
now in order to get more developers and users happy.

2 years agoTests: Compare vectors with epsilon
Sergey Sharybin [Fri, 7 Apr 2017 16:26:39 +0000 (18:26 +0200)]
Tests: Compare vectors with epsilon

SOlves the test false-positively failing in 32 bit environment.

2 years ago[Cycles/msvc] Get cycles_kernel compile time under control.
lazydodo [Fri, 7 Apr 2017 16:25:54 +0000 (10:25 -0600)]
[Cycles/msvc] Get cycles_kernel compile time under control.

Ever since we merged the extra texture types (half etc) and spit kernel the compile time for cycles_kernel has been going out of control.

It's currently sitting at a cool 1295.762 seconds with our standard compiler (2013/x64/release)

I'm not entirely sure why msvc gets upset with it, but the inlining of matrix near the bottom of the tri-cubic 3d interpolator is the source of the issue, this patch excludes it from being inlined.

This patch bring it back down to a manageable 186 seconds. (7x faster!!)

with the attached bzzt.blend that @sergey  kindly provided i got the following results with builds with identical hashes

58:51.73 buildbot
58:04.23 Patched

it's really close, the slight speedup could be explained by the switch instead of having multiple if's (switches do generate more optimal code than a chain of if/else/if/else statements) but in all honesty it might just have been pure luck (dev box,very polluted, bad for benchmarks) regardless, this patch doesn't seem to slow down anything with my limited testing.



Reviewers: brecht, lukasstockner97, juicyfruit, dingto, sergey

Reviewed By: brecht, dingto, sergey

Subscribers: InsigMathK, sergey

Tags: #cycles

Differential Revision:

2 years agoLibmv: Correction to previous commit
Sergey Sharybin [Fri, 7 Apr 2017 15:57:48 +0000 (17:57 +0200)]
Libmv: Correction to previous commit

We do need to make a copy of the values.

2 years agoLibmv: Fix crash of keyframe selection on 32bit linux
Sergey Sharybin [Fri, 7 Apr 2017 15:10:44 +0000 (17:10 +0200)]
Libmv: Fix crash of keyframe selection on 32bit linux

2 years agoBuildbot: List freetype for OIIO libraries
Sergey Sharybin [Fri, 7 Apr 2017 15:01:07 +0000 (17:01 +0200)]
Buildbot: List freetype for OIIO libraries

OIIO in release environment is compiled with Freetype support.

This fixes compilation error of static unit tests.

2 years agoBuildbot: Link statically against freetype
Sergey Sharybin [Fri, 7 Apr 2017 15:00:43 +0000 (17:00 +0200)]
Buildbot: Link statically against freetype

2 years agoCMake: Fix detection of idiff program
Sergey Sharybin [Fri, 7 Apr 2017 15:00:06 +0000 (17:00 +0200)]
CMake: Fix detection of idiff program

2 years agoTests: Fix compilation error with static OpenMP
Sergey Sharybin [Fri, 7 Apr 2017 14:06:05 +0000 (16:06 +0200)]
Tests: Fix compilation error with static OpenMP

2 years agoAlembic import: prevent crash when cancelling import.
Sybren A. Stüvel [Fri, 7 Apr 2017 14:03:16 +0000 (16:03 +0200)]
Alembic import: prevent crash when cancelling import.

It's possible that cancellation occured between the creation of the reader
and the creation of the Blender object, in which case reader->object()
returns a NULL pointer.

2 years agoAlembic import: prevent double user decrement when cancelling import.
Sybren A. Stüvel [Fri, 7 Apr 2017 14:02:51 +0000 (16:02 +0200)]
Alembic import: prevent double user decrement when cancelling import.

BKE_libblock_free_us() was called on the object data, which decrements
its user count, after which the same function was called on the object,
which decrements the user count of the object data again. This double
decrement was too much.

2 years agoCycles: Fix access of NULL pointer as array
Sergey Sharybin [Fri, 7 Apr 2017 13:07:25 +0000 (15:07 +0200)]
Cycles: Fix access of NULL pointer as array

Was confusing guarded allocator for some reason.

2 years agoAlembic: synced gather_objects_paths with visit_objects
Sybren A. Stüvel [Fri, 7 Apr 2017 11:40:38 +0000 (13:40 +0200)]
Alembic: synced gather_objects_paths with visit_objects

This was necessary, but was only mentioned at gather_object_paths (which
I didn't see earlier). That's now also fixed.

2 years agoCleanup: Unused function
Sergey Sharybin [Fri, 7 Apr 2017 10:55:04 +0000 (12:55 +0200)]
Cleanup: Unused function

2 years agoCycles: Fix corrupted mesh render when topology differs at the next frame
Sergey Sharybin [Fri, 7 Apr 2017 10:48:43 +0000 (12:48 +0200)]
Cycles: Fix corrupted mesh render when topology differs at the next frame

2 years agoCycles: Change work pool and global size of split CPU for easier debugging
Mai Lavelle [Thu, 6 Apr 2017 09:08:35 +0000 (05:08 -0400)]
Cycles: Change work pool and global size of split CPU for easier debugging

2 years agoCycles: Fix indentation
Mai Lavelle [Fri, 31 Mar 2017 06:38:07 +0000 (02:38 -0400)]
Cycles: Fix indentation

2 years agoCycles: Add missing flush
Mai Lavelle [Fri, 31 Mar 2017 06:00:27 +0000 (02:00 -0400)]
Cycles: Add missing flush

2 years agoCycles: Check ray state properly to avoid endless loop
Mai Lavelle [Tue, 28 Mar 2017 06:28:36 +0000 (02:28 -0400)]
Cycles: Check ray state properly to avoid endless loop

The state mask wasnt applied before comparison giving false results. It
shouldnt really happen that a ray state contains any flags that need to
be masked away, but if it does happen its better to not get stuck.

2 years agoAlembic: documented use of CacheReader struct
Sybren A. Stüvel [Thu, 23 Feb 2017 10:58:20 +0000 (11:58 +0100)]
Alembic: documented use of CacheReader struct

2 years agoAlembic: just pass NULL when we know mcmd->reader is NULL.
Sybren A. Stüvel [Thu, 23 Feb 2017 10:58:45 +0000 (11:58 +0100)]
Alembic: just pass NULL when we know mcmd->reader is NULL.

More explicit, easier to read & understand.

2 years agoFix building alembic gtest with buildinfo...
Bastien Montagne [Fri, 7 Apr 2017 08:44:13 +0000 (10:44 +0200)]
Fix building alembic gtest with buildinfo...

2 years agoFix T51137: Edge Rip Hangs
Campbell Barton [Fri, 7 Apr 2017 01:43:50 +0000 (11:43 +1000)]
Fix T51137: Edge Rip Hangs

2 years agoFix T51135: Cylinder primitive generated bad UVs
Germano Cavalcante [Thu, 6 Apr 2017 15:20:22 +0000 (12:20 -0300)]
Fix T51135: Cylinder primitive generated bad UVs