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

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

4 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

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

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

4 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

4 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

4 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

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

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

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

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

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

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

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

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

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

4 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

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

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

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

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

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

4 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

4 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".

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

4 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

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

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

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

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

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

4 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

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

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

4 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

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

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

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

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

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

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

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

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

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

4 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

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

4 years agoCleanup: Unused parameters in Outliner
Julian Eisel [Sun, 16 Oct 2016 13:19:18 +0000 (15:19 +0200)]
Cleanup: Unused parameters in Outliner

These were only passed to own recursion calls.

4 years agoFix missing outliner redraw when adding VSE strip
Julian Eisel [Sun, 16 Oct 2016 12:39:06 +0000 (14:39 +0200)]
Fix missing outliner redraw when adding VSE strip

Needed for outliner "Sequence" display mode.

4 years agoCycles: use near clipping distance in panorama camera.
Scott Wu [Fri, 14 Oct 2016 22:11:42 +0000 (00:11 +0200)]
Cycles: use near clipping distance in panorama camera.

Reviewed By: sergey, brecht, dfelinto

Differential Revision:

4 years agoPrevent crash after OpenGL rendering animation to images.
Sybren A. Stüvel [Fri, 14 Oct 2016 16:45:49 +0000 (18:45 +0200)]
Prevent crash after OpenGL rendering animation to images.

4 years agoFix T49571: 2d stabilize keys not visible in the Graph Editor and Dope Sheet
Sergey Sharybin [Fri, 14 Oct 2016 15:22:57 +0000 (17:22 +0200)]
Fix T49571: 2d stabilize keys not visible in the Graph Editor and Dope Sheet

4 years agoCycles: Disable optimization of operator / for float3
Sergey Sharybin [Fri, 14 Oct 2016 11:51:59 +0000 (13:51 +0200)]
Cycles: Disable optimization of operator / for float3

This was giving some speedup but made intersection tests to fail
from watertight point of view.

Needs deeper investigation, but need to quickly get it fixed for
the studio.

4 years agoFix T49657: Audio backend "Jack" should be named "JACK".
Bastien Montagne [Fri, 14 Oct 2016 11:22:22 +0000 (13:22 +0200)]
Fix T49657: Audio backend "Jack" should be named "JACK".

4 years agoFix T49601: Material menu length problem.
Bastien Montagne [Fri, 14 Oct 2016 08:29:51 +0000 (10:29 +0200)]
Fix T49601: Material menu length problem.

Regression from rB69b66d549bcc8, was supposed to be non-functionnal
change, so not sure why search menu was reduced here? For now, restore
to 2.77 width.

4 years agoBPY Docs: Correct spelling (Addon --> Add-on)
Aaron Carlisle [Thu, 13 Oct 2016 23:23:29 +0000 (01:23 +0200)]
BPY Docs: Correct spelling (Addon --> Add-on)

Differential Revision:

4 years agoFix T49646: Switching from large to small image can get stuck zoom at max zoom distance.
Anthony Edlin [Thu, 13 Oct 2016 22:54:05 +0000 (00:54 +0200)]
Fix T49646: Switching from large to small image can get stuck zoom at max zoom distance.

Allow for zooming in at max zoom distance.

Reviewed By: Severin

Differential Revision:

4 years agoFix T49534: 2.78 Wrong texture scaling in material viewport
Sergey Sharybin [Thu, 13 Oct 2016 16:31:53 +0000 (18:31 +0200)]
Fix T49534: 2.78 Wrong texture scaling in material viewport

Seems to be a bug in original implementation of a830280: code was always
using tangent space instead of UV map because it had the same name. Now
prefer UVMap over tangent because this is how Cycles works. At least it's
closer to.

Not sure it the save+reload issue is still relevant after this fix, that
needs to be double-checked.

Thanks @dfelinto for looking into the report and simplifying the case.

Should be included into 2.78a.

4 years agoFix OLD pre-git links in the API, add missing factory-startup option to blender execu...
Aaron Carlisle [Thu, 13 Oct 2016 15:53:30 +0000 (17:53 +0200)]
Fix OLD pre-git links in the API, add missing factory-startup option to blender executions.

Reviewers: mont29

Reviewed By: mont29

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

Differential Revision:

4 years agoPrevent problems when appending scene with referenced proxy
Sybren A. Stüvel [Thu, 13 Oct 2016 15:06:24 +0000 (17:06 +0200)]
Prevent problems when appending scene with referenced proxy

Such a "referenced proxy" could be a proxy that is used in a constraint on
another object. Brings back part of 1cdc54dc7db85766 but without the
memory leak.

4 years agoUsual UI/i18n tweaks & fixes.
Bastien Montagne [Thu, 13 Oct 2016 14:20:29 +0000 (16:20 +0200)]
Usual UI/i18n tweaks & fixes.

4 years agoFix: Grease Pencil palettes were missing a RNA path callback
Joshua Leung [Thu, 13 Oct 2016 12:18:53 +0000 (01:18 +1300)]
Fix: Grease Pencil palettes were missing a RNA path callback

4 years agoProxy appending: re-establish link to proxies when they are made local
Sybren A. Stüvel [Thu, 13 Oct 2016 11:32:08 +0000 (13:32 +0200)]
Proxy appending: re-establish link to proxies when they are made local

This allows appending of an entire scene from another blend file into this one,
even when that blend file contains proxified armatures.

This replaces the approach from commit 1cdc54dc7db85766.

Thanks @sergey for the help.

4 years agoFix T49635: column_flow Layout - last column is too small.
Bastien Montagne [Thu, 13 Oct 2016 08:21:38 +0000 (10:21 +0200)]
Fix T49635: column_flow Layout - last column is too small.

Column flow layout was abuse ui_item_fit in a weird way, which was
broken for last column items.

Now rather use own code, which basically spread available width as
equally as possible between all columns.

4 years agoCleanup: UI layout: remove unsed and confusing parameter.
Bastien Montagne [Wed, 12 Oct 2016 19:28:11 +0000 (21:28 +0200)]
Cleanup: UI layout: remove unsed and confusing parameter.

Things are complicated enough like that, no need to add useless noise on
top of it!

4 years agowrong alpha set for timeline theme (fixup for rBf329ebe3)
Dalai Felinto [Thu, 13 Oct 2016 00:28:07 +0000 (00:28 +0000)]
wrong alpha set for timeline theme (fixup for rBf329ebe3)

4 years agoFix T49631: radial control operators not using DPI properly.
Brecht Van Lommel [Wed, 12 Oct 2016 18:15:38 +0000 (20:15 +0200)]
Fix T49631: radial control operators not using DPI properly.

4 years agoFix T49640: Cycles constant folding incorrect for texture coordinates.
Brecht Van Lommel [Wed, 12 Oct 2016 16:36:41 +0000 (18:36 +0200)]
Fix T49640: Cycles constant folding incorrect for texture coordinates.

4 years agoFix build error with WITH_CYCLES_NATIVE_ONLY and recent AVX2 changes.
Brecht Van Lommel [Wed, 12 Oct 2016 15:35:03 +0000 (17:35 +0200)]
Fix build error with WITH_CYCLES_NATIVE_ONLY and recent AVX2 changes.

4 years agoFix T49636: material draw mode crash with displacement and missing group input node.
Brecht Van Lommel [Wed, 12 Oct 2016 11:10:09 +0000 (13:10 +0200)]
Fix T49636: material draw mode crash with displacement and missing group input node.

4 years agoFFmpeg: Fix off by one error in number of detected frames in matroska container
Sergey Sharybin [Wed, 12 Oct 2016 14:17:43 +0000 (16:17 +0200)]
FFmpeg: Fix off by one error in number of detected frames in matroska container

Seems to be rounding error. Hopefully new code handles the error fixed back in
SVN revision 28901 and still have proper frame number for Hjalti.

What could possibly go wrong here..

4 years agoCycles: Use const reference for register variables in non-OpenCL code
Sergey Sharybin [Wed, 12 Oct 2016 12:48:59 +0000 (14:48 +0200)]
Cycles: Use const reference for register variables in non-OpenCL code

This is something tested by @LazyDodo and suggested by Maxym to make
MSVC happier.

4 years agoCycles: Use more SSE intrinsics for float3 type
Sergey Sharybin [Wed, 12 Oct 2016 12:23:29 +0000 (14:23 +0200)]
Cycles: Use more SSE intrinsics for float3 type

This gives about 5% speedup on AVX2 kernels (other kernels still
have SSE disabled for math operations) and this solves the slowdown
of koro scene mention in the previous commit.

The title says it all actually. This commit also contains
changes to pass float3 as const reference in affected functions.

This should make MSVC happier without breaking OpenCL because it's
only done in areas which are ifdef-ed for non-OpenCL.

Another patch based on inspiration from Maxym Dmytrychenko, thanks!

4 years agoCycles: Implement AVX2 version of triangle_intersect
Sergey Sharybin [Wed, 12 Oct 2016 11:46:25 +0000 (13:46 +0200)]
Cycles: Implement AVX2 version of triangle_intersect

This commit basically vectorizes existing code using AVX2 instructions
(without modifying algorithm itself). This gives quite nice speedups:

  BMW:        -8%
  Classroom:  -5%
  Cat:        -5%
  Koro:       +1%
  Barcelona:  -8%

That's on Linux machine, reported performance improvement on Windows
goes up to 20%.

Not currently sure why Koro is somewhat slower because it mainly uses
curve intersection tests, could be a time noise? Or osmething with the
cache utilization perhaps? In any case speedup in other scenes makes
me thinking that current state is acceptable for initial implementation.

This is again inspired by Maxym Dmytrychenko.

4 years agoCycles: Add new avxf vectorized data type
Sergey Sharybin [Wed, 12 Oct 2016 11:03:15 +0000 (13:03 +0200)]
Cycles: Add new avxf vectorized data type

Based on existing ssef data type and to my knowledge it's also what happens in
Embree nowadays.

Inspired by Maxym Dmytrychenko and required for the upcoming triangle
intersection commit.

Hopefully the copyright message is correct.

4 years agoCycles: Enable SSE options of math module for AVX2 kernels
Sergey Sharybin [Wed, 12 Oct 2016 10:54:31 +0000 (12:54 +0200)]
Cycles: Enable SSE options of math module for AVX2 kernels

Currently this does not give measurable difference, but is required
ground work for some upcoming further optimization of AVX2 kernels.

4 years agoCycles: Get rid of ifdef-ed noinline policy
Sergey Sharybin [Wed, 12 Oct 2016 10:15:24 +0000 (12:15 +0200)]
Cycles: Get rid of ifdef-ed noinline policy

4 years agoCycles: Fix use of uninitialized variable in SSS
Sergey Sharybin [Wed, 12 Oct 2016 10:12:28 +0000 (12:12 +0200)]
Cycles: Fix use of uninitialized variable in SSS

When ray hits curve segment with SSS shader it was possible to have
uninitialized hit_P variable used for sampling.

Seems that was a reason of our headache of difference between AVX2
and SSE4 render results here, so now we can revert all the nasty
ifdef-ed inline policies.

4 years agoCycles: Cleanup, style
Sergey Sharybin [Wed, 12 Oct 2016 09:54:33 +0000 (11:54 +0200)]
Cycles: Cleanup, style

4 years agoFix T49622: Grease pencil not rendering out of VSE
Sergey Sharybin [Wed, 12 Oct 2016 08:01:30 +0000 (10:01 +0200)]
Fix T49622: Grease pencil not rendering out of VSE

4 years agoFix T49502: file browser on OS X not highlighting external drives.
Brecht Van Lommel [Tue, 11 Oct 2016 22:07:11 +0000 (00:07 +0200)]
Fix T49502: file browser on OS X not highlighting external drives.

4 years agoFix T49629: Graph editor normalize function doesn't work on f-curves with a constant...
Sergey Sharybin [Tue, 11 Oct 2016 15:08:00 +0000 (17:08 +0200)]
Fix T49629: Graph editor normalize function doesn't work on f-curves with a constant key value

Technically it is a regression in behavior and should be 2.78a.

4 years agoFix objects added via py being on the wrong layer when viewport is decoupled from...
Sergey Sharybin [Tue, 11 Oct 2016 13:35:14 +0000 (15:35 +0200)]
Fix objects added via py being on the wrong layer when viewport is decoupled from scene