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:

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:

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:

3 years agoFix compile errors for when WITH_ALEMBIC is OFF.
Kévin Dietrich [Sun, 30 Oct 2016 02:42:46 +0000 (03:42 +0100)]
Fix compile errors for when WITH_ALEMBIC is OFF.

3 years agoCycles: Add smoothing option to the Brick Texture
Lukas Stockner [Sat, 29 Oct 2016 23:33:10 +0000 (01:33 +0200)]
Cycles: Add smoothing option to the Brick Texture

This option allows to create a smoother transition between Bricks and Mortar - 0 applies no smoothing, and 1 smooths across the whole mortar width.
Mainly useful for displacement textures.

The new default value for the smoothing option is 0.1 to give some smoothing that helps with antialiasing, but existing nodes are loaded with smoothing 0 to preserve compatibility.

Reviewers: sergey, dingto, juicyfruit, brecht

Reviewed By: brecht

Subscribers: Blendify, nutel

Differential Revision:

3 years agoFix T49846: OpenCL rendering compilation failure
Lukas Stockner [Sat, 29 Oct 2016 18:06:52 +0000 (20:06 +0200)]
Fix T49846: OpenCL rendering compilation failure

3 years agoCycles: Implement texture coordinates for Point, Spot and Area Lamps
Lukas Stockner [Sat, 29 Oct 2016 16:54:42 +0000 (18:54 +0200)]
Cycles: Implement texture coordinates for Point, Spot and Area Lamps

When using the Normal output of the Texture Coordinate node on Point and Spot lamps, the coordinates now depend on the rotation of the lamp.
On Area lamps, the Parametric output of the Geometry node now returns UV coordinates on the area lamp.

Credit for the Area lamp part goes to Stefan Werner (from D1995).

3 years agoFix T49878: Alembic crash with long object name
Kévin Dietrich [Sat, 29 Oct 2016 14:22:33 +0000 (16:22 +0200)]
Fix T49878: Alembic crash with long object name

Crash comes from writing to char array (ID::name) out its bound and thus
overriding memory in the ID struct.

3 years agoAlembic: store a pointer to the object reader in the cache modifiers and
Kévin Dietrich [Sat, 29 Oct 2016 10:23:09 +0000 (12:23 +0200)]
Alembic: store a pointer to the object reader in the cache modifiers and

This avoids traversing the archive everytime object data is needed and
gives an overall consistent ~2x speedup here with files containing
between 136 and 500 Alembic objects. Also this somewhat nicely de-
duplicates code between data creation (upon import) and data streaming
(modifiers and constraints).

The only worying part is what happens when a CacheFile is deleted and/or
has its path changed. For now, we traverse the whole scene and for each
object using the CacheFile we free the pointer and NULL-ify it (see
BKE_cachefile_clean), but at some point this should be re-considered and
make use of the dependency graph.

3 years agoAlembic export: fix frame range values being reset at every update, draw
Kévin Dietrich [Sat, 29 Oct 2016 09:04:51 +0000 (11:04 +0200)]
Alembic export: fix frame range values being reset at every update, draw

3 years agoCleanup: avoid using G.main.
Kévin Dietrich [Fri, 28 Oct 2016 16:26:34 +0000 (18:26 +0200)]
Cleanup: avoid using G.main.

3 years agoAlembic Export: set start and end frame to that of the scene for
Kévin Dietrich [Fri, 28 Oct 2016 16:21:43 +0000 (18:21 +0200)]
Alembic Export: set start and end frame to that of the scene for

Users will most likely export an entire animation rather than a single
frame, so it can save a few clicks.

3 years agoCacheFile: fix missing depsgraph update.
Kévin Dietrich [Fri, 28 Oct 2016 16:01:42 +0000 (18:01 +0200)]
CacheFile: fix missing depsgraph update.

3 years agoCacheFile: only enable scale property slider if we are editing the cache
Kévin Dietrich [Fri, 28 Oct 2016 15:56:09 +0000 (17:56 +0200)]
CacheFile: only enable scale property slider if we are editing the cache
through a constraint.

It doesn't make sense and is a bit confusing to have this property
enabled in the modifier context.

3 years agoCompile fix for Windows.
Nathan Letwory [Fri, 28 Oct 2016 08:54:01 +0000 (11:54 +0300)]
Compile fix for Windows.

__inline instead of inline is needed.

3 years agoFix T49743: Adding torus in edit mode local mode shows error
Bastien Montagne [Thu, 27 Oct 2016 11:23:29 +0000 (13:23 +0200)]
Fix T49743: Adding torus in edit mode local mode shows error

The 'local' layers were not correctly set when redoing 'add object'
addons using helper (we always want to restore layers
from view in local view, even if we set 'real' layers from operator

3 years agoFix T49829: Removal of custom icon previews during add-on unregister crashes Blender.
Bastien Montagne [Thu, 27 Oct 2016 07:51:10 +0000 (09:51 +0200)]
Fix T49829: Removal of custom icon previews during add-on unregister crashes Blender.

Issue was happening when removal of custom icons was done while they
were still being rendered by preview job.

Now add a 'deffered deletion' system, to prevent main thread to delete
preview image until loading thread is done with them.

Note that ideally, calling `ED_preview_kill_jobs()` on custom icon
removal would have been simpler, but we don't have easy access to
context here...

3 years agoCycles: More workarounds for weird crashes on AVX2
Sergey Sharybin [Thu, 27 Oct 2016 10:51:03 +0000 (12:51 +0200)]
Cycles: More workarounds for weird crashes on AVX2

Oh man, is it a compiler bug? Is it something we do stupid?

For now more crap to prevent crashes. During the conference will talk to
Maxyn about how can we troubleshoot such weird issues.

3 years agoCycles: Another attempt to fix crashes on AVX2 processors
Sergey Sharybin [Wed, 26 Oct 2016 20:14:41 +0000 (22:14 +0200)]
Cycles: Another attempt to fix crashes on AVX2 processors

Basically don't use rcp() in areas which seems to be critical after
second look. Also disabled some multiplication operators, not sure
yet why they might be a problem.

Tomorrow will be setting up a full test with all cases which were
buggy in our farm to see if this fix is complete.

3 years agoCycles: Fix compilation error of AVX2 kernel without SSE math
Sergey Sharybin [Wed, 26 Oct 2016 18:49:33 +0000 (20:49 +0200)]
Cycles: Fix compilation error of AVX2 kernel without SSE math

3 years agoCycles: Completely disable transform SSE for now
Sergey Sharybin [Wed, 26 Oct 2016 13:23:58 +0000 (15:23 +0200)]
Cycles: Completely disable transform SSE for now

Was causing issues on another frame.

On a tight schedule, disabling for now so artists are happy.

Still looking into root of the issue!

3 years agoCycles: Fix crashes after recent optimization commits
Sergey Sharybin [Wed, 26 Oct 2016 12:27:31 +0000 (14:27 +0200)]
Cycles: Fix crashes after recent optimization commits

There is some precision issues for big magnitude coordinates which started
to give weird behavior of release builds. Some weird memory usage in BVH
which is tricky to nail down because only happens in release builds and GDB
reports all variables as optimized out when trying to use RelWithDebInfo.

There are two things in this commit:

- Attempt to make vectorized code closer to original one, hoping that it'll
  eliminate precision issue.
  This seems to work for transform_point().
- Similar trick did not work for transform_direction() even tho absolute
  error here is much smaller. For now disabled that function, need a more
  careful look here.

3 years agoRangeTree API rewrite
Campbell Barton [Thu, 13 Oct 2016 04:51:20 +0000 (15:51 +1100)]
RangeTree API rewrite

Rewrite the current range-tree API used by dyn-topo undo
to avoid inefficiencies from stdc++'s set use.

- every call to `take_any` (called for all verts & faces)
  removed and added to the set.
- further range adjustment also took 2x btree edits.

This patch inlines a btree which is modified in-place,
so common resizing operations don't need to perform a remove & insert.
Ranges are stored in a list so `take_any` can access the first item
without a btree lookup.

Since range-tree isn't a bottleneck in sculpting, this only gives minor speedups.
Measured approx ~15% overall faster calculation for sculpting,
although this number time doesn't include GPU updates and depends on how
much edits fragment the range-tree.

3 years agoBLI_bitmap_draw_2d: optimize polygon filling
Campbell Barton [Wed, 26 Oct 2016 09:26:32 +0000 (20:26 +1100)]
BLI_bitmap_draw_2d: optimize polygon filling

Existing method was fine for basic polygons but didn't scale well
because its was checking all coordinates for every y-pixel.

Heres an optimized version.
Basic logic remains the same this just maintains an ordered list of intersections,
tracking in-out points, to avoid re-computing every row,
this means sorting is only done once when out of order segments are found,
the segments only need to be re-ordered if they cross each other.

Speedup isn't linear, test with full-screen complex lasso gave 11x speedup.

3 years agoCleanup: rename functions in BLI_bitmap_draw_2d
Campbell Barton [Wed, 26 Oct 2016 09:14:48 +0000 (20:14 +1100)]
Cleanup: rename functions in BLI_bitmap_draw_2d

3 years agoCleanup: move bitmap drawing into its own module
Campbell Barton [Wed, 26 Oct 2016 09:11:09 +0000 (20:11 +1100)]
Cleanup: move bitmap drawing into its own module

Bitmap drawing is out-of-scope for a general math API,
move to BLI_bitmap_draw_2d.

3 years agoBMesh: edge-net split, edge selection error
Campbell Barton [Wed, 26 Oct 2016 03:15:00 +0000 (14:15 +1100)]
BMesh: edge-net split, edge selection error

In practice I couldn't make this cause a bug,
however it's a logical regression in fix for T48716.

Thanks to Francesc Juhe for finding.

3 years ago[msvc] make.bat - create a build.log in the build directory
lazydodo [Tue, 25 Oct 2016 17:49:08 +0000 (11:49 -0600)]
[msvc] make.bat - create a build.log in the build directory

3 years agoCycles: Fix for fix (tm)
Sergey Sharybin [Tue, 25 Oct 2016 16:28:02 +0000 (18:28 +0200)]
Cycles: Fix for fix (tm)

Sorry guys, for some reason read the expression back-to-front
and did wrong fix :S

3 years agoCycles: Fix typo in previous commit for BVH improvements
Sergey Sharybin [Tue, 25 Oct 2016 16:05:44 +0000 (18:05 +0200)]
Cycles: Fix typo in previous commit for BVH improvements

3 years agoFix T49815: Blender always reverts to RGBA when using Save As Image.
Bastien Montagne [Tue, 25 Oct 2016 15:59:45 +0000 (17:59 +0200)]
Fix T49815: Blender always reverts to RGBA when using Save As Image.

`BKE_imformat_defaults()` was doing some weird black magic based on
imbuf's channels, instead of merely copying imbuf's planes here...

3 years agoAPI: Fix Links
Aaron Carlisle [Tue, 25 Oct 2016 15:32:58 +0000 (17:32 +0200)]
API: Fix Links

Self-explanatory. to find broken links run `sphinx-build -b linkcheck sphinx-in sphinx-out`

Reviewers: mont29

Tags: #bf_blender, #python, #infrastructure:_websites

Differential Revision:

3 years agoPartial fix for T49836: Camera DOF properties not updating via graph editor
Sergey Sharybin [Tue, 25 Oct 2016 14:53:13 +0000 (16:53 +0200)]
Partial fix for T49836: Camera DOF properties not updating via graph editor

Do this for the new dependency graph: was missing handle of OB_UPDATE_TIME in tag update.

Hopefully it's all correct still.

Old dependency graph needs work, but i'm tempting to call it unsupported and move on
to 2.8 branch.

3 years agoCycles: Enable SSE math optimization for AVX kernels
Sergey Sharybin [Tue, 25 Oct 2016 14:10:47 +0000 (16:10 +0200)]
Cycles: Enable SSE math optimization for AVX kernels

This gives about 5% speedup for AVX processors.

Benefit of such optimization on other microarchitectures is still
under investigation.

3 years agoCycles: Use new SSE version of offset calculation for all QBVH flavors
Sergey Sharybin [Tue, 25 Oct 2016 13:27:50 +0000 (15:27 +0200)]
Cycles: Use new SSE version of offset calculation for all QBVH flavors

Gives up to ~1% speedup again.

While it seems to be small, still nice since the code now is actually more
clean that it used to be before.

3 years agoCycles: Move QBVH near/far offset calculation to an utility function
Sergey Sharybin [Tue, 25 Oct 2016 13:08:33 +0000 (15:08 +0200)]
Cycles: Move QBVH near/far offset calculation to an utility function

Just preparing for new optimization to be used in all traversal implementation.

Should be no measurable difference.

3 years agoCycles: BVH-related SSE optimization
Sergey Sharybin [Tue, 25 Oct 2016 12:47:34 +0000 (14:47 +0200)]
Cycles: BVH-related SSE optimization

Several ideas here:

- Optimize calculation of near_{x,y,z} in a way that does not require
  3 if() statements per update, which avoids negative effect of wrong
  branch prediction.

- Optimization of direction clamping for BVH.

- Optimization of point/direction transform.

Brings ~1.5% speedup again depending on a scene (unfortunately, this
speedup can't be sum across all previous commits because speedup of
each of the changes varies from scene to scene, but it still seems to
be nice solid speedup of few percent on Linux and bigger speedup was
reported on Windows).

Once again ,thanks Maxym for inspiration!

Still TODO: We have multiple places where we need to calculate near
x,y,z indices in BVH, for now it's only done for main BVH traversal.
Will try to move this calculation to an utility function and see if
that can be easily re-used across all the BVH flavors.

3 years agoCycles: Avoid branching in SSE version of intersection pre-calculation
Sergey Sharybin [Tue, 25 Oct 2016 12:18:32 +0000 (14:18 +0200)]
Cycles: Avoid branching in SSE version of intersection pre-calculation

Similar to the previous commit, avoid negative effect of bad branch prediction.

Gives measurable performance up to ~2% in tests here.

Once again, thanks to Maxym Dmytrychenko!

3 years agoCycles: Implement SSE-optimized path of util_max_axis()
Sergey Sharybin [Tue, 25 Oct 2016 11:54:17 +0000 (13:54 +0200)]
Cycles: Implement SSE-optimized path of util_max_axis()

The idea here is to avoid if statements which could cause wrong
branch prediction.

Gives a bit of measurable speedup up to ~1%. Still nice :)

Inspired by Maxym Dmytrychenko, thanks!

3 years agoCMake: Followup to previous commit, try to ensure -ldl is always last
Sergey Sharybin [Tue, 25 Oct 2016 08:22:03 +0000 (10:22 +0200)]
CMake: Followup to previous commit, try to ensure -ldl is always last

Seems CMake will rearrange and copy libraries which are passed to the linker
when some of the libraries is listed twice (for example, -lz from png libraries
and -l for blender itself). This was causing libopenimageio to be added somewhere
at the end of linking flags without -ldl followed after which was causing linking

3 years agoFix possible compilation error with OIIO enabled
Sergey Sharybin [Tue, 25 Oct 2016 07:28:25 +0000 (09:28 +0200)]
Fix possible compilation error with OIIO enabled

OIIO library has plugin API which uses dlopen()/dlclose() so need to
link OIO libraries against dl library.

3 years agoCycles: Add AVX2 path to subsurface triangle intersection
Sergey Sharybin [Mon, 24 Oct 2016 14:56:41 +0000 (16:56 +0200)]
Cycles: Add AVX2 path to subsurface triangle intersection

Similar to regular triangle intersection case. Gives about 3% speedup rendering
SSS object on my desktop,

Question: how to avoid such a code duplication in a nice way without speed loss?

3 years agoCycles: Don't use guarded vector for statically initialized data
Sergey Sharybin [Mon, 24 Oct 2016 12:18:22 +0000 (14:18 +0200)]
Cycles: Don't use guarded vector for statically initialized data

This will confuse hell of a guarded allocators because it is possible
to have allocation happened prior to Blender's guarded allocator is
fully initialized.

This was causing crashes and assert failures when running blender
with fully guarded memory allocator.

3 years agoCycles: Fix shadowing variable which also causes use of uninitialized variable
Sergey Sharybin [Mon, 24 Oct 2016 12:04:31 +0000 (14:04 +0200)]
Cycles: Fix shadowing variable which also causes use of uninitialized variable

Was causing wrong aperture for panorama cameras.

Seems to be a regression in 371d357.

3 years agoCycles: Fix static initialization order fiasco
Sergey Sharybin [Mon, 24 Oct 2016 11:43:55 +0000 (13:43 +0200)]
Cycles: Fix static initialization order fiasco

Initialization order of global stats and node types was not strictly
defined and it was possible to have node types initialized first and
stats after that. This will zero out memory which was allocated from
the statistics causing assert failure when de-initializing node types.

3 years agoCycles: Fix uninitialized variable from the previous commit
Sergey Sharybin [Mon, 24 Oct 2016 10:54:24 +0000 (12:54 +0200)]
Cycles: Fix uninitialized variable from the previous commit

3 years agoCycles: Remove explicit std:: from types where possible
Sergey Sharybin [Mon, 24 Oct 2016 10:31:11 +0000 (12:31 +0200)]
Cycles: Remove explicit std:: from types where possible

We have our own abstraction level on top of the STL's implementation.
This commit will guarantee our tweaks are used for all cases.

3 years agoCycles: Cleanup, style
Sergey Sharybin [Mon, 24 Oct 2016 10:26:12 +0000 (12:26 +0200)]
Cycles: Cleanup, style

3 years agoFix T49818: Crash when rendering with motion blur
Sergey Sharybin [Mon, 24 Oct 2016 09:46:26 +0000 (11:46 +0200)]
Fix T49818: Crash when rendering with motion blur

It was possible to have non-initialized unaligned BVH split
to be used when regular BVH split SAH was inf. Now we ensure
that unaligned splitter is only used when it's really initialized.

It's a regression and should be in 2.78a.

3 years agoCycles: Cleanup, spaces
Sergey Sharybin [Mon, 24 Oct 2016 09:10:35 +0000 (11:10 +0200)]
Cycles: Cleanup, spaces

3 years agoFix unlikely uninitialized pointer usage.
Bastien Montagne [Mon, 24 Oct 2016 08:25:04 +0000 (10:25 +0200)]
Fix unlikely uninitialized pointer usage.

Reported by Coverity.

3 years agoFix T49827L Crash linking material while in Material viewport shading mode
Sergey Sharybin [Mon, 24 Oct 2016 08:09:13 +0000 (10:09 +0200)]
Fix T49827L Crash linking material while in Material viewport shading mode

Material linking might and does change the way how drawObject is calculated
but does not tag drawObject for recalculation in any way.

Now use dependency graph to tag draw object for reclaculation. Currently do
this using OB_RECALC_DATA taq since tagging is not very granular yet. In the
future we can introduce ore granular tagging in the new dependency graph

Simple and safe for 2.78a.

3 years agoFix mistake in BKE_mesh_new_from_object handling of materials in MetaBall case.
Bastien Montagne [Mon, 24 Oct 2016 08:06:00 +0000 (10:06 +0200)]
Fix mistake in BKE_mesh_new_from_object handling of materials in MetaBall case.

Typo, spoted by Coverity scan.

To be backported to 2.78a.

3 years agoAPI doc: enable 'split index' option.
Aaron Carlisle [Sun, 23 Oct 2016 15:47:56 +0000 (17:47 +0200)]
API doc: enable 'split index' option.

3 years agoDisplace modifier: add global/local space option for X/Y/Z/XYZ directions.
Quentin Wenger [Sun, 23 Oct 2016 12:04:27 +0000 (14:04 +0200)]
Displace modifier: add global/local space option for X/Y/Z/XYZ directions.

Reviewed By: brecht

Differential Revision:

3 years agoSystem info: make it more resiliant to errors.
Bastien Montagne [Sun, 23 Oct 2016 11:12:58 +0000 (13:12 +0200)]
System info: make it more resiliant to errors.

Using context manager for output file itself, and whole try/except block
to at least catch and print error in file.

Also some minor tweaks to previous 'list add-ons' commit.

3 years agoSystem info: also report enabled add-ons.
Bastien Montagne [Sun, 23 Oct 2016 11:05:47 +0000 (13:05 +0200)]
System info: also report enabled add-ons.

Based on idea & patch by @lijenstina over IRC (iirc :/ ).

3 years agoAdd a built-in sphinx extension to allow cross-linking to the blender manual.
Aaron Carlisle [Sun, 23 Oct 2016 09:14:48 +0000 (11:14 +0200)]
Add a built-in sphinx extension to allow cross-linking to the blender manual.

This works by downloading the objects.inv file (
and using it to resolve links with blender-manual: before them.

3 years agoCycles: OpenCL 3d textures support.
Hristo Gueorguiev [Sat, 22 Oct 2016 21:38:42 +0000 (23:38 +0200)]
Cycles: OpenCL 3d textures support.

Note that volume rendering is not supported yet, this is a step towards that.

Reviewed By: brecht

Differential Revision:

3 years agoFix Cycles address space OpenCL error after recent fix.
Brecht Van Lommel [Sat, 22 Oct 2016 21:25:39 +0000 (23:25 +0200)]
Fix Cycles address space OpenCL error after recent fix.

3 years agoGPencil: New option to lock strokes to axis
Antonioya [Sat, 22 Oct 2016 14:44:11 +0000 (16:44 +0200)]
GPencil: New option to lock strokes to axis

Now, the strokes can be locked to a plane set in the cursor location.
This option allow the artist to rotate the view and draw keeping the
strokes flat over the surface. This option is similar to surface option
but doesn't need a object.

The option is only valid for 3D view and strokes in CURSOR mode.

3 years agoFix T49750: Cycles wrong ray differentials for perspective and stereo cameras.
Brecht Van Lommel [Sat, 22 Oct 2016 13:59:23 +0000 (15:59 +0200)]
Fix T49750: Cycles wrong ray differentials for perspective and stereo cameras.

3 years agoFix T49656: Crash when starting playback while using JACK audio with A/V sync
Jörg Müller [Sat, 22 Oct 2016 13:00:32 +0000 (15:00 +0200)]
Fix T49656: Crash when starting playback while using JACK audio with A/V sync

When ED_screen_animation_play is called from wm_event_do_handlers,ScrArea *sa = CTX_wm_area(C); is NULL in ED_screen_animation_timer.
Informing the audio system in CTX_data_main_set, that a new Main has been set.

3 years agoFix T49657: Audio backend "Jack" should be named "JACK".
Jörg Müller [Sat, 22 Oct 2016 12:20:47 +0000 (14:20 +0200)]
Fix T49657: Audio backend "Jack" should be named "JACK".

3 years agoFix T49764: Audio strips crackle when animating the volume
Jörg Müller [Sat, 22 Oct 2016 11:38:41 +0000 (13:38 +0200)]
Fix T49764: Audio strips crackle when animating the volume

- Implemented linear interpolation for volume changes in the software
- Using this in the software device.

3 years agoFix T49789: Compositor mix node interpolation bug
Sergey Sharybin [Fri, 21 Oct 2016 15:56:09 +0000 (17:56 +0200)]
Fix T49789: Compositor mix node interpolation bug

3 years agoFix T49804: Display grid Scale/Subdivision are sometimes disabled in View3D when...
Bastien Montagne [Fri, 21 Oct 2016 14:06:53 +0000 (16:06 +0200)]
Fix T49804: Display grid Scale/Subdivision are sometimes disabled in View3D when they should not.

Not really possible to precisely detect all cases in which they should or
should not be active, but at least now it won't show as disabled when it
actually has some effects.

3 years agoCycles: Fix another OpenCL logging issue
Lukas Stockner [Fri, 21 Oct 2016 00:49:00 +0000 (02:49 +0200)]
Cycles: Fix another OpenCL logging issue

Previously an error message would be printed whenever the OpenCL build produced output.
However, some frameworks seem to print extra information even if the build succeeded, so now the actual returned error is checked as well.
When --debug-cycles is activated, the build output will always be printed, otherwise it only gets printed if there was an error.

3 years agoAlembic: only export custom data (UVs, VCols) once, on the first frame.
Kévin Dietrich [Thu, 20 Oct 2016 17:43:22 +0000 (19:43 +0200)]
Alembic: only export custom data (UVs, VCols) once, on the first frame.

This would cause Alembic to throw an exception and fail exporting
animations because it was trying to recreate and overwrite the
attributes for each frame.

3 years agoFix T49797: Exception from scene update handler might leak external engine descriptors
Sergey Sharybin [Thu, 20 Oct 2016 11:32:52 +0000 (13:32 +0200)]
Fix T49797: Exception from scene update handler might leak external engine descriptors

This was causing memory leaks in Cycles.

Some more detailed information in the comment in the code.

Seems to be safe and nice enough for 2.78a.

3 years agoPython API: add full_path parameter for bpy.ops.ui.copy_data_path_button.
christian brinkmann [Wed, 19 Oct 2016 22:27:14 +0000 (00:27 +0200)]
Python API: add full_path parameter for bpy.ops.ui.copy_data_path_button.

Also use the operator as part of the UI keymap now, to deduplicate code and let
users configure a custom shortcut.

Reviewed By: brecht

Differential Revision:

3 years agoFix T49793 : Fix enabling SSE2 globally for msvc.
lazydodo [Wed, 19 Oct 2016 16:06:45 +0000 (10:06 -0600)]
Fix T49793 : Fix enabling SSE2 globally for msvc.

When feeding msvc both /arch:sse2 and /arch:sse it's not smart enough to pick the best option, just goes with the last option

3 years agoFix T49775: Appending data with internal dependency cycles prevents correct clearing...
Bastien Montagne [Wed, 19 Oct 2016 12:29:43 +0000 (14:29 +0200)]
Fix T49775: Appending data with internal dependency cycles prevents correct clearing of linked data-blocks.

This is not a simple fix, but imho still needs to be backported to 2.78a...

3 years ago[msvc] Minor cleanup in blenkernel.
lazydodo [Tue, 18 Oct 2016 15:25:14 +0000 (09:25 -0600)]
[msvc] Minor cleanup in blenkernel.

this patch resolves the following warnings;

Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 764
Warning C4098 'attach_stabilization_baseline_data': 'void' function returning a value blenkernel\intern\tracking_stabilize.c 139
Warning C4028 formal parameter 3 different from declaration blenkernel\intern\cachefile.c 148
Warning C4028 formal parameter 3 different from declaration blenkernel\intern\paint.c 413
Warning C4028 formal parameter 1 different from declaration blenkernel\intern\editderivedmesh.c 591
Warning C4028 formal parameter 3 different from declaration blenkernel\intern\library_remap.c 709
Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 754
Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 758
Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 759
Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 763
Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 764
Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 765
Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 769
Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 770
Warning C4028 formal parameter 1 different from declaration blenkernel\intern\DerivedMesh.c 3458

It's mostly things where the signature in the .h and the actual implementation in the .c do not match.  And a bunch functions who do not match the TaskRunFunction declaration cause they leave out the __restrict keyword.

Reviewers: brecht, juicyfruit, sergey

Reviewed By: sergey

Subscribers: Blendify

Differential Revision:

3 years ago[windows] Create A Blender Desktop Shortcut in the msi installer , fixes T49522
lazydodo [Tue, 18 Oct 2016 15:21:58 +0000 (09:21 -0600)]
[windows] Create A Blender Desktop Shortcut in the msi installer , fixes T49522

3 years agoFix: Append 'Object proxy' hack checking for local/linked usages before those flags...
Bastien Montagne [Tue, 18 Oct 2016 12:15:59 +0000 (14:15 +0200)]
Fix: Append 'Object proxy' hack checking for local/linked usages before those flags were set!

Dummy mistake, to be backported to 2.78a.

3 years agoClarified warning in EnumProperty
Sybren A. Stüvel [Tue, 18 Oct 2016 09:24:33 +0000 (11:24 +0200)]
Clarified warning in EnumProperty

Blender doesn't necessarily crash when Python doesn't keep references to
the returned strings. As a result, someone that implements this incorrectly
could be lulled into a false sense of correctness by Blender not crashing.

3 years agoFixup for doversion (rB8d573aa0 and rBa7e74791)
Dalai Felinto [Mon, 17 Oct 2016 19:43:35 +0000 (19:43 +0000)]
Fixup for doversion (rB8d573aa0 and rBa7e74791)

3 years agoFix T49722: Appending Bug (Groups).
Bastien Montagne [Mon, 17 Oct 2016 12:49:35 +0000 (14:49 +0200)]
Fix T49722: Appending Bug (Groups).

One day we'll have to reconsider why some many 'real' ID usages are not
refcounting... :(

To be backported to 2.78a.

3 years agoUV Editor: Add filter option to control what is visible when Draw Other Objects is...
Sergey Sharybin [Mon, 17 Oct 2016 12:28:16 +0000 (14:28 +0200)]
UV Editor: Add filter option to control what is visible when Draw Other Objects is enabled

Previously the editor will always try to only show UV faces with the same exact active
image or image texture, which is quite difficult to control on a production shaders, where
each material can have multiple objects assigned.

The idea of this commit is to bring option which allows to easily control what to display
when "Draw Other Objects" is enabled, so currently we can have old behavior ("Same Image")
or tell editor to show everything ("All"). In the future we can extend it with such filters
as "Same Material" and things like that.

Hopefully this will help @eyecandy's workflow of texturing.

3 years agoFix T49738: Hair Add Brush doesn't work
Sergey Sharybin [Mon, 17 Oct 2016 10:37:50 +0000 (12:37 +0200)]
Fix T49738: Hair Add Brush doesn't work

the issue was caused by wrong default value for brush particle count
which was clamped on display from 0 to 1. This is technically a regression
but how to port this to 2.78a?

3 years agoFix T49630: Cycles: Swapped shader and bake kernels
Lukas Stockner [Mon, 17 Oct 2016 10:28:01 +0000 (12:28 +0200)]
Fix T49630: Cycles: Swapped shader and bake kernels

The problem here was, as the title says, that the two kernels were swapped.
Since shader evaluation is only used for building the samling map when World MIS is enabled, rendering without it would still work fine, although baking also was broken.

3 years agoCycles: Improve OpenCL kernel compilation logging
Lukas Stockner [Mon, 17 Oct 2016 09:48:24 +0000 (11:48 +0200)]
Cycles: Improve OpenCL kernel compilation logging

The previous refactor changed the code to use a separate logging mechanism to support multithreaded compilation.
However, since that's not supported by any frameworks yes, it just resulted in bad logging behaviour.
So, this commit changes the logging to go diectly to stdout/stderr once again by default.

3 years agoFix T49746: crash loading user preferences with missing operators.
Brecht Van Lommel [Sun, 16 Oct 2016 19:19:52 +0000 (21:19 +0200)]
Fix T49746: crash loading user preferences with missing operators.

3 years agoMore fixes for keyframe theme options
Julian Eisel [Sun, 16 Oct 2016 18:30:51 +0000 (20:30 +0200)]
More fixes for keyframe theme options

Couple of issues here:
* Missing initialization for 3D view keyframe options for "Reset to Default Theme"
* Alpha values not reset correctly on "Reset to Default Theme"
* Alpha values of timeline keyframe options not reset correctly for old files
Also corrected old version patches even though they're overridden later, to avoid more issues in case people copy this code.

Corrections to d7af7a1e04c243 and 8d573aa0ecb61

3 years agoFix assert in the wrong place, should be moved earlier to do anything.
Chase Willden [Sun, 16 Oct 2016 13:50:53 +0000 (15:50 +0200)]
Fix assert in the wrong place, should be moved earlier to do anything.

Reviewed By: brecht

Differential Revision: