blender-staging.git
2 years agoCleanup: Spelling, Spaces --> Tabs, Whitespace
Aaron Carlisle [Thu, 16 Feb 2017 22:06:03 +0000 (17:06 -0500)]
Cleanup: Spelling, Spaces --> Tabs, Whitespace

2 years agoUI: Move 'relations extras' right below 'relations'
Aaron Carlisle [Thu, 16 Feb 2017 17:01:07 +0000 (12:01 -0500)]
UI: Move 'relations extras' right below 'relations'

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

2 years agoFix T50687: Cycles baking time estimate and progress bar doesn't work / progress...
Sergey Sharybin [Thu, 16 Feb 2017 16:15:08 +0000 (17:15 +0100)]
Fix T50687: Cycles baking time estimate and progress bar doesn't work / progress when baking with high samples

2 years agoRegister test for mesh.split_faces()
Sergey Sharybin [Thu, 16 Feb 2017 14:36:00 +0000 (15:36 +0100)]
Register test for mesh.split_faces()

2 years agoFaces split: Don't leave CD_NORMAL after split
Sergey Sharybin [Thu, 16 Feb 2017 10:00:17 +0000 (11:00 +0100)]
Faces split: Don't leave CD_NORMAL after split

This is supposed to be a temporary layer.

If someone needs loop normals after split it should explicitly
ask for that.

2 years agoCyctes tests: Commit blender.git side changes
Sergey Sharybin [Thu, 16 Feb 2017 09:36:22 +0000 (10:36 +0100)]
Cyctes tests: Commit blender.git side changes

2 years agoCDDM Copy: Only tag data layers dirty if we ignored tessellation data
Sergey Sharybin [Thu, 16 Feb 2017 08:55:44 +0000 (09:55 +0100)]
CDDM Copy: Only tag data layers dirty if we ignored tessellation data

This solves assert failure in CustomData_from_bmeshpoly() happening with
broom.blend file from barber shop SVN.

2 years agoCleanup: Indentation
Sergey Sharybin [Thu, 16 Feb 2017 08:16:20 +0000 (09:16 +0100)]
Cleanup: Indentation

2 years agoFreestyle: Feature edge selection by nested object groups.
Tamito Kajiyama [Thu, 16 Feb 2017 01:51:40 +0000 (10:51 +0900)]
Freestyle: Feature edge selection by nested object groups.

A group of object groups can be formed by means of the dupli_group option in
the Object properties window.  The present revision extends the Selection by
Group option in the Freestyle Line Set so as to support not only flat object
groups but also nested groups.

2 years agoFix more corner cases failing in mesh faces split
Sergey Sharybin [Wed, 15 Feb 2017 22:09:31 +0000 (23:09 +0100)]
Fix more corner cases failing in mesh faces split

Now we handle properly case with edge-fan meshes, which should
fix bad topology calculated for cash register which was causing
crashes in the studio.

2 years agoFix wrong edges created by split faces
Sergey Sharybin [Wed, 15 Feb 2017 19:59:55 +0000 (20:59 +0100)]
Fix wrong edges created by split faces

We need to first split all vertices before we can reliably
check whether edge can be reused or not.

There is still known issue happening with a edge-fan mesh
with some faces being on the same plane.

2 years ago[Alembic] Fix msvc warning - C4138 '*/' found outside of comment
lazydodo [Wed, 15 Feb 2017 19:40:41 +0000 (12:40 -0700)]
[Alembic] Fix msvc warning - C4138  '*/' found outside of comment

2 years agoCycles: Cleanup, style
Sergey Sharybin [Wed, 15 Feb 2017 19:33:49 +0000 (20:33 +0100)]
Cycles: Cleanup, style

2 years agoFix T50542: Wrong metadata frame when using OpenGL render
Sergey Sharybin [Wed, 15 Feb 2017 16:09:49 +0000 (17:09 +0100)]
Fix T50542: Wrong metadata frame when using OpenGL render

2 years agoMotion blur investigation feature
Sergey Sharybin [Wed, 15 Feb 2017 15:19:05 +0000 (16:19 +0100)]
Motion blur investigation feature

This commit adds a way to debug Cycles motion blur issues which
are usually happening due to something crazy happening in between
of frames. Biggest trouble was that artists had no clue about
what's happening in subframes before they render. This is at
least inefficient workflow when dealing with motion blur shots
with complex animation.

Now there is an option in Time Line Editor which could be found
in View -> Show Subframe. This option will expose current frame
with it's subframe to the time line editor header and it'll allow
scrubbing with a subframe precision in time line editor.

Please note that none of the tools in Blender are aware of
subframe, so they'll likely be using current integer frame still.

This is something we don't consider a bug for now, the whole
purpose for now is to give a tool for investigation. Eventually
we'll likely tweak all tools to be aware of subframe.

Hopefully now we can finish the movie here in the studio..

2 years agoFix T50662: Auto-split affects on smooth mesh when it sohuldn't
Sergey Sharybin [Wed, 15 Feb 2017 14:21:15 +0000 (15:21 +0100)]
Fix T50662: Auto-split affects on smooth mesh when it sohuldn't

Seems to be a precision error comparing proper floating point
normal with the one coming from short.

2 years agoCycles: Fix CUDA compilation error after recent changes
Sergey Sharybin [Wed, 15 Feb 2017 14:01:08 +0000 (15:01 +0100)]
Cycles: Fix CUDA compilation error after recent changes

2 years agoFix wrong loop normals left after face splitting
Sergey Sharybin [Wed, 15 Feb 2017 13:58:49 +0000 (14:58 +0100)]
Fix wrong loop normals left after face splitting

Let's keep all data in a consistent state, so we don't have any
issues later on.

This solves rendering artifacts mentioned in the previous commit.

2 years agoMesh: Re-implement face split solving issue mentioned earlier
Sergey Sharybin [Wed, 15 Feb 2017 12:56:50 +0000 (13:56 +0100)]
Mesh: Re-implement face split solving issue mentioned earlier

Now new edges will be properly created between original and
new split vertices.

Now topology is correct, but shading is still not quite in
some special cases.

2 years agoCycles: Don't calculate primitive time if BVH motion steps are not used
Sergey Sharybin [Wed, 15 Feb 2017 11:59:31 +0000 (12:59 +0100)]
Cycles: Don't calculate primitive time if BVH motion steps are not used

Solves memory regression by the default configuration.

2 years agoCycles: Pass special flag whether BVH motion steps are used
Sergey Sharybin [Wed, 15 Feb 2017 09:48:02 +0000 (10:48 +0100)]
Cycles: Pass special flag whether BVH motion steps are used

Doesn't currently change anything, but would need for some future
work here.

It uses existing padding in kernel BVH structure, so there is
nothing changed memory-wise.

2 years agoCycles: Fix wrong hair render results when using BVH motion steps
Sergey Sharybin [Wed, 15 Feb 2017 09:56:54 +0000 (10:56 +0100)]
Cycles: Fix wrong hair render results when using BVH motion steps

The issue here was mainly coming from minimal pixel width feature
which is quite commonly enabled in production shots.

This feature will use some probabilistic heuristic in the curve
intersection function to check whether we need to return intersection
or not. This probability is calculated for every intersection check.
Now, when we use multiple BVH nodes for curve primitives we increase
probability of that primitive to be considered a good intersection
for us. This is similar to increasing minimal width of curve.

What is worst here is that change in the intersection probability
fully depends on exact layout of BVH, meaning probability might
change differently depending on a view angle, the way how builder
binned the primitives and such. This makes it impossible to do
simple check like dividing probability by number of BVH steps.

Other solution might have been to split BVH into fully independent
trees, but that will increase memory usage of all the static
objects in the scenes, which is also not something desirable.

For now used most simple but robust approach: store BVH primitives
time and test it in curve intersection functions. This solves the
regression, but has two downsides:

- Uses more memory.

  which isn't surprising, and ANY solution to this problem will
  use more memory.

  What we still have to do is to avoid this memory increase for
  cases when we don't use BVH motion steps.

- Reduces number of maximum available textures on pre-kepler cards.

  There is not much we can do here, hardware gets old but we need
  to move forward on more modern hardware..

2 years agoCycles: Fix missing initialization of triangle BVH steps
Sergey Sharybin [Wed, 15 Feb 2017 09:44:34 +0000 (10:44 +0100)]
Cycles: Fix missing initialization of triangle BVH steps

Likely was harmless for Blender, but better be safe here.

2 years agoCycles: Fix wrong pointiness caused by precision issues
Sergey Sharybin [Wed, 15 Feb 2017 11:39:06 +0000 (12:39 +0100)]
Cycles: Fix wrong pointiness caused by precision issues

2 years agoRevert "Mesh: Solve incorrect result of mesh.split_faces()"
Sergey Sharybin [Wed, 15 Feb 2017 11:33:04 +0000 (12:33 +0100)]
Revert "Mesh: Solve incorrect result of mesh.split_faces()"

The change was delivering broken topology for certain cases.
The assumption that new edge only connects new vertices was
wrong.

Reverting to a commit which was giving correct render results
but was using more memory.

This reverts commit af1e48e8ab7a25269ba5a44158bd16c564ed3535.

2 years agoUI: Wireframe modifier- make crease grayed out when disabled
Aaron Carlisle [Wed, 15 Feb 2017 04:44:21 +0000 (23:44 -0500)]
UI: Wireframe modifier- make crease grayed out when disabled

2 years agoComments: notes on polyfill2d, minor corrections
Campbell Barton [Wed, 15 Feb 2017 03:10:42 +0000 (14:10 +1100)]
Comments: notes on polyfill2d, minor corrections

2 years agoMesh: Solve incorrect result of mesh.split_faces()
Sergey Sharybin [Tue, 14 Feb 2017 16:02:22 +0000 (17:02 +0100)]
Mesh: Solve incorrect result of mesh.split_faces()

This function was keeping original edges and was creating some
extra vertices which is not something we are really looking
forward to,

2 years agoMesh: Cleanup, use shorter version of loop
Sergey Sharybin [Tue, 14 Feb 2017 14:30:49 +0000 (15:30 +0100)]
Mesh: Cleanup, use shorter version of loop

2 years agoMesh: Use faster calculation of previous loop
Sergey Sharybin [Tue, 14 Feb 2017 14:29:31 +0000 (15:29 +0100)]
Mesh: Use faster calculation of previous loop

2 years ago`BKE_boundbox_ensure_minimum_dimensions` is no longer necessary
Germano Cavalcante [Tue, 14 Feb 2017 13:25:00 +0000 (10:25 -0300)]
`BKE_boundbox_ensure_minimum_dimensions` is no longer necessary

The bug T46099 no longer applies since the addition of `dist_squared_to_projected_aabb_simple`
Has also been added comments that relates to an occlusion bug with the ruler. I'll investigate this.

2 years agotransform_snap_object: Remove `do_bb` parameter. It is always true
Germano Cavalcante [Tue, 14 Feb 2017 12:38:20 +0000 (09:38 -0300)]
transform_snap_object: Remove `do_bb` parameter. It is always true

2 years agoAlembic: fix naming of imported transforms.
Kévin Dietrich [Tue, 14 Feb 2017 06:59:27 +0000 (07:59 +0100)]
Alembic: fix naming of imported transforms.

When importing an Alembic file with grouped transforms, it would badly name the transforms, taking the name of the parent instead of its own.

Patch by @maxime.robinot

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

2 years agoCycles: Optimize sorting of transparent intersections on CUDA
Sergey Sharybin [Mon, 13 Feb 2017 17:24:45 +0000 (18:24 +0100)]
Cycles: Optimize sorting of transparent intersections on CUDA

2 years agoCycles: Fix wrong transparent shadows with CUDA
Sergey Sharybin [Mon, 13 Feb 2017 17:22:10 +0000 (18:22 +0100)]
Cycles: Fix wrong transparent shadows with CUDA

Was a bug in recent optimization commit.

2 years agoCycles: Fix wrong shading on GPU when background has NaN pixels and MIS enabled
Sergey Sharybin [Mon, 13 Feb 2017 15:30:16 +0000 (16:30 +0100)]
Cycles: Fix wrong shading on GPU when background has NaN pixels and MIS enabled

Quite simple fix for now which only deals with this case. Maybe we want to do
some "clipping" on image load time so regular textures wouldn't give NaN as
well.

2 years agoCycles: Use fast math without finite optimization
Sergey Sharybin [Mon, 13 Feb 2017 15:25:35 +0000 (16:25 +0100)]
Cycles: Use fast math without finite optimization

This allows us to use faster math and still have reliable
isnan/isfinite tests.

Only do it for host side, kernels stays unchanged.

Thanks Lukas Stockner for the tip!

2 years agoFix T50655: Pointiness is too slow to calculate
Sergey Sharybin [Mon, 13 Feb 2017 11:00:10 +0000 (12:00 +0100)]
Fix T50655: Pointiness is too slow to calculate

Optimize vertex de-duplication the same way as we do doe Remove Doubles.

2 years agoCycles: Use Cycles-side mesh instead of C++ RNA
Sergey Sharybin [Mon, 13 Feb 2017 09:40:05 +0000 (10:40 +0100)]
Cycles: Use Cycles-side mesh instead of C++ RNA

Those are now matching and it's faster to skip C++ RNA to
calculate pointiness.

2 years agoF-Curve normalization: Do proper curve min/max instead of handle min/max
Sergey Sharybin [Mon, 13 Feb 2017 09:00:46 +0000 (10:00 +0100)]
F-Curve normalization: Do proper curve min/max instead of handle min/max

Would be cool to find some way to cache the results.

2 years agoCycles: Don't use built-in API for image sequences in preview mode
Sergey Sharybin [Sat, 11 Feb 2017 21:24:59 +0000 (22:24 +0100)]
Cycles: Don't use built-in API for image sequences in preview mode

Our Python API is not ready for such things at all. Better be slower
but more correct for until we improve our API.

2 years agoImage: Fix non-deterministic behavior of image sequence loading
Sergey Sharybin [Sat, 11 Feb 2017 21:15:30 +0000 (22:15 +0100)]
Image: Fix non-deterministic behavior of image sequence loading

The issue was caused by usage of non-initialized image user, which
could have different settings, causing some random image being loaded
or not loaded at all.

This caused non-deterministic behavior of Cycles image loading because
it was querying image information from several places.

This fixes crash reported in T50616, but it's not a complete fix
because preview rendering in material is wrong (same wrong as in
2.78a release).

2 years agoUI: Redesign the VSE multicam strip
Aaron Carlisle [Sat, 11 Feb 2017 16:35:02 +0000 (11:35 -0500)]
UI: Redesign the VSE multicam strip

Idea from https://rightclickselect.com/p/sequencer/zfbbbc/sequencer-panels-update by @pauloup

|{F434631}|{F434624}|
|Before |After|

Test file:
{F434643}

2 years agoUse dummy versionning numbers for missing libraries.
Bastien Montagne [Fri, 10 Feb 2017 21:49:22 +0000 (22:49 +0100)]
Use dummy versionning numbers for missing libraries.

We now assert that we now file version of libraries (needed for
do_version after linking step), so for missing libraries, set dummy
numbers (using version of main .blend file actually).

2 years agoDe-duplicate min/max calculation in F-Curve normalization
Sergey Sharybin [Fri, 10 Feb 2017 17:10:26 +0000 (18:10 +0100)]
De-duplicate min/max calculation in F-Curve normalization

2 years agoCTests: Initial work to cover Cycles nodes with OpenGL tests
Sergey Sharybin [Fri, 10 Feb 2017 13:52:54 +0000 (14:52 +0100)]
CTests: Initial work to cover Cycles nodes with OpenGL tests

Works similar to regular Cycles tests, just does OpenGL render to
get output image.

Seems to work fine with the only funny effect: Blender window will
pop up for each of the tests. This is current limitation of our
OpenGL context. Might be changed in the future.

2 years agoCleanup: Trailing whitespace
Sergey Sharybin [Fri, 10 Feb 2017 13:08:12 +0000 (14:08 +0100)]
Cleanup: Trailing whitespace

2 years agoCycles: Cleanup, move EdgeMap to blender_util
Sergey Sharybin [Fri, 10 Feb 2017 12:33:02 +0000 (13:33 +0100)]
Cycles: Cleanup, move EdgeMap to blender_util

it's better place for such an utility structure. Still not fully ideal tho.

2 years agoCycles: Make an utility class for edge map
Sergey Sharybin [Fri, 10 Feb 2017 12:31:59 +0000 (13:31 +0100)]
Cycles: Make an utility class for edge map

Simplifies some logic.

2 years agoCycles: Fix pointiness attribute giving wrong results with autosplit
Sergey Sharybin [Fri, 10 Feb 2017 12:23:40 +0000 (13:23 +0100)]
Cycles: Fix pointiness attribute giving wrong results with autosplit

Basically made the algorithm to handle vertices with the same coordinate
as a single vertex.

2 years agoCycles: Cleanup: Use less indentation by inverting condition
Sergey Sharybin [Fri, 10 Feb 2017 09:10:06 +0000 (10:10 +0100)]
Cycles: Cleanup: Use less indentation by inverting condition

2 years agoCycles: Calculate all vertex attribute after faces generation
Sergey Sharybin [Fri, 10 Feb 2017 09:06:58 +0000 (10:06 +0100)]
Cycles: Calculate all vertex attribute after faces generation

This way the calculation is not spread over multiple places.

2 years agoCycles: Cleanup: use vector instead of bare malloc
Sergey Sharybin [Fri, 10 Feb 2017 09:05:41 +0000 (10:05 +0100)]
Cycles: Cleanup: use vector instead of bare malloc

This way memory is more "manageable" and easier to follow.

2 years agoAlembic: fixed mistake in bounding box computation
Sybren A. Stüvel [Fri, 10 Feb 2017 10:52:14 +0000 (11:52 +0100)]
Alembic: fixed mistake in bounding box computation

By performing the Z-up to Y-up conversion, the change in sign of the
Z-coordinate swaps "minimum" and "maximum".

2 years agoDo not overide text
Aaron Carlisle [Thu, 9 Feb 2017 21:25:04 +0000 (16:25 -0500)]
Do not overide text

2 years agoFix T50629 -- Add remove doubles to the cleanup menu
Aaron Carlisle [Thu, 9 Feb 2017 21:18:33 +0000 (16:18 -0500)]
Fix T50629 -- Add remove doubles to the cleanup menu

Also move it up in the verticies menu

2 years agoCleanup: Remove commented code
Aaron Carlisle [Thu, 9 Feb 2017 14:26:12 +0000 (09:26 -0500)]
Cleanup: Remove commented code

Code has been commented from before 2010 and relates to old Background image code.

2 years agoUse a smaller cross icon for clearing search box contents
Joshua Leung [Thu, 9 Feb 2017 06:08:58 +0000 (19:08 +1300)]
Use a smaller cross icon for clearing search box contents

2 years agoMore tweaks to Normalisation options in Graph Editor
Joshua Leung [Thu, 9 Feb 2017 05:59:51 +0000 (18:59 +1300)]
More tweaks to Normalisation options in Graph Editor

* Added a new dedicated icon for normalize
* Only use an icon for "Auto"

2 years agoGraph Editor: Replace Normalise/Auto checkboxes with toggle buttons
Joshua Leung [Thu, 9 Feb 2017 04:04:21 +0000 (17:04 +1300)]
Graph Editor: Replace Normalise/Auto checkboxes with toggle buttons

These take less space, fit in better with rest of the UI, and make their relationship clearer

2 years agoFix: GPencil delete operators did not respect color locking
Joshua Leung [Sat, 28 Jan 2017 11:05:41 +0000 (00:05 +1300)]
Fix: GPencil delete operators did not respect color locking

2 years agoCycles: Fix regression with transparent shadows in volume
Sergey Sharybin [Mon, 30 Jan 2017 13:40:37 +0000 (14:40 +0100)]
Cycles: Fix regression with transparent shadows in volume

2 years agoCycles: Solve speed regression by casting opaque ray first
Sergey Sharybin [Mon, 30 Jan 2017 13:11:58 +0000 (14:11 +0100)]
Cycles: Solve speed regression by casting opaque ray first

2 years agoCycles: Fix compilation error on OpenCL
Sergey Sharybin [Mon, 30 Jan 2017 11:33:58 +0000 (12:33 +0100)]
Cycles: Fix compilation error on OpenCL

2 years agoCycles: Split shadow functions to avoid some duplicated calculations
Sergey Sharybin [Mon, 30 Jan 2017 11:08:20 +0000 (12:08 +0100)]
Cycles: Split shadow functions to avoid some duplicated calculations

2 years agoCycles: Store shadow intersections in the kernel globals
Sergey Sharybin [Wed, 21 Sep 2016 15:46:25 +0000 (17:46 +0200)]
Cycles: Store shadow intersections in the kernel globals

Seems CUDA failed to de-duplicate the array across multiple inlined
versions of the shadow_blocked(). Helped it a bit with that now.

Gives about 100MB memory improvement on a scenes after previous
commit and brings up memory "regression" to only 100MB comparing to
the master branch now.

2 years agoCycles: Speedup transparent shadows on CUDA
Sergey Sharybin [Wed, 8 Feb 2017 12:05:05 +0000 (13:05 +0100)]
Cycles: Speedup transparent shadows on CUDA

This commit enables record-all behavior of transparent shadows
rays.

Render times difference goes as following:

               GTX 1080 render time
BMW                  -0.5%
Fishy Cat            -0.0%
Pabellon Barcelona   -11.6%
Classroom            +1.2%
Koro                 -58.6%

Kernel will now use some extra VRAM memory to store the intersection
array (200MB on my configuration). This we can optimize out with some
further commits.

2 years agoCycles: Implement record-all transparent shadow function for GPU
Sergey Sharybin [Wed, 21 Sep 2016 15:34:15 +0000 (17:34 +0200)]
Cycles: Implement record-all transparent shadow function for GPU

The idea is to record all possible transparent intersections when
shooting transparent ray on GPU (similar to what we were doing  on
CPU already).

This avoids need of doing whole ray-to-scene intersections queries
for each intersection and speeds up a lot cases like transparent
hair in the cost of extra memory.

This commit is a base ground for now and this feature is kept
disabled for until some further tweaks.

2 years agoCycles: Use an utility function to sort intersections array
Sergey Sharybin [Wed, 21 Sep 2016 10:53:38 +0000 (12:53 +0200)]
Cycles: Use an utility function to sort intersections array

2 years agoCycles: Make GPU version of shadow_blocked() closer to CPU
Sergey Sharybin [Wed, 21 Sep 2016 10:39:14 +0000 (12:39 +0200)]
Cycles: Make GPU version of shadow_blocked() closer to CPU

Now we break the traversal cycle and then perform volume attenuation
and check with zero throughput. Not sure it makes any measurable sense
at this moment, but in the future it might help de-duplicating some
extra logic here.

2 years agoCycles: De-duplicate transparent shadows attenuation
Sergey Sharybin [Wed, 21 Sep 2016 10:30:52 +0000 (12:30 +0200)]
Cycles: De-duplicate transparent shadows attenuation

Fair amount of code was duplicated for CPU and GPU, now we are
using inlined function to avoid such duplication.

2 years agoFix T49249: Alembic export with multiple hair systems crash blender
Sybren A. Stüvel [Wed, 8 Feb 2017 10:47:16 +0000 (11:47 +0100)]
Fix T49249: Alembic export with multiple hair systems crash blender

Removed unnecessary call to DM_update_tessface_data(). This call is
already performed by DM_ensure_tessface(dm). The call being performed
twice caused a failing BLI_assert().

Reviewed by: Kévin Dietrich

2 years agoAlembic export: avoid infinite loops trying to find parent objects.
Sybren A. Stüvel [Wed, 8 Feb 2017 10:50:21 +0000 (11:50 +0100)]
Alembic export: avoid infinite loops trying to find parent objects.

Also added some assertions for debugging purposes

Reviewed by: Kévin Dietrich

2 years agoAlembic export: only create transform writer if the object should be exported
Sybren A. Stüvel [Wed, 8 Feb 2017 10:48:59 +0000 (11:48 +0100)]
Alembic export: only create transform writer if the object should be exported

Reviewed by: Kévin Dietrich

2 years agoAlembic: #undef'ed the correct macro
Sybren A. Stüvel [Tue, 7 Feb 2017 13:53:09 +0000 (14:53 +0100)]
Alembic: #undef'ed the correct macro

TEST_RET is not defined anywhere in Blender's sources, and LAYER_CMP
is no longer used after this function ends.

2 years agoAlembic: Use getXForm() in check, because it's used in rest of the function too
Sybren A. Stüvel [Tue, 7 Feb 2017 11:20:42 +0000 (12:20 +0100)]
Alembic: Use getXForm() in check, because it's used in rest of the function too

This makes the code within the function consistent.

2 years agoAlembic: Renamed copy_zup_yup to copy_yup_from_zup (and same for zup_from_yup)
Sybren A. Stüvel [Fri, 3 Feb 2017 14:54:59 +0000 (15:54 +0100)]
Alembic: Renamed copy_zup_yup to copy_yup_from_zup (and same for zup_from_yup)

With the new names the arguments (yup, zup) are in the same order as
they appear in the function name. The old names used copy_src_dst(dst,
src), which I found very confusing. Furthermore, now it is clear from
where to where the copy is made.

This makes the function names a little bit longer, though. If that is
a real issue, we can just name them zup_from_yup(zup, yup).

Reviewed by: Kévin Dietrich

2 years agoCleanup: Use const qualifier in some of color management code
Sergey Sharybin [Tue, 7 Feb 2017 16:49:35 +0000 (17:49 +0100)]
Cleanup: Use const qualifier in some of color management code

2 years agoSequencer: Some extra speedup in color space conversion
Sergey Sharybin [Tue, 7 Feb 2017 16:45:28 +0000 (17:45 +0100)]
Sequencer: Some extra speedup in color space conversion

Use the new utility from coloranagement which multi-threads byte to
float conversion.

Gives extra 10% speedup from quick tests.

2 years agoColor management: Add utility function to convert byte to float with processor applied
Sergey Sharybin [Tue, 7 Feb 2017 16:45:02 +0000 (17:45 +0100)]
Color management: Add utility function to convert byte to float with processor applied

2 years agoSequencer: Speedup conversion to sequencer space
Sergey Sharybin [Tue, 7 Feb 2017 16:30:51 +0000 (17:30 +0100)]
Sequencer: Speedup conversion to sequencer space

Speedup is mainly gained by multi-threading. Gives about 3x
fps gain on an edit shot file.

There is still some room for improvements, will happen in one
of the upcoming commits.

2 years agoColor management: Implement threaded byte buffer conversion
Sergey Sharybin [Tue, 7 Feb 2017 15:59:17 +0000 (16:59 +0100)]
Color management: Implement threaded byte buffer conversion

The title says it all actually: now we can convert byte buffer
directly, without need of temporary float buffer.

2 years agoParam `is_cached` not being used in` bvhtree_from_mesh_edges_setup_data`
Germano Cavalcante [Tue, 7 Feb 2017 14:03:10 +0000 (11:03 -0300)]
Param `is_cached` not being used in` bvhtree_from_mesh_edges_setup_data`

This could cause bugs in the memory release

2 years agoFix missing hair after rendering with different viewport/render settings
Sergey Sharybin [Tue, 7 Feb 2017 13:21:29 +0000 (14:21 +0100)]
Fix missing hair after rendering with different viewport/render settings

Derived mesh for particles did not include tessellated faces when it
was expected to. Now added explicit function to copy CDDM with tess
faces without need to re-tessellate the result.

2 years agoFix T49253: Cycles blackbody is wrong on AVX2 CPU on Windows
Sergey Sharybin [Tue, 7 Feb 2017 12:05:19 +0000 (13:05 +0100)]
Fix T49253: Cycles blackbody is wrong on AVX2 CPU on Windows

Seems to be bug in optimizer, but managed to reshuffle in a way
which should also give some speedup.

2 years agoPIL_time_utildefines: also show total time in TIMEIT_AVERAGED.
Bastien Montagne [Tue, 7 Feb 2017 09:14:46 +0000 (10:14 +0100)]
PIL_time_utildefines: also show total time in TIMEIT_AVERAGED.

2 years agoFix (unreported) Object previews being written even for skipped objects.
Bastien Montagne [Mon, 6 Feb 2017 19:58:18 +0000 (20:58 +0100)]
Fix (unreported) Object previews being written even for skipped objects.

2 years agoCleanup writefile code a bit.
Bastien Montagne [Mon, 6 Feb 2017 19:42:00 +0000 (20:42 +0100)]
Cleanup writefile code a bit.

Modernize some of it a bit, saves quite some lines of blabla (using
shile instead of for loops... tsssts...).

2 years agoCMake: Remove MOTO library dependency when it is not needed
Jorge Bernal [Mon, 6 Feb 2017 18:29:42 +0000 (19:29 +0100)]
CMake: Remove MOTO library dependency when it is not needed

It is not necessary to add MOTO library dependency when we use
WITH_IK_SOLVER (now it uses Eigen) or we use WITH_MOD_BOOLEAN (it was
used by bsp intern library some time ago but it is not present in the
code anymore).

Reviewers: mont29, sergey

Subscribers: mont29, sergey

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

2 years agoSpecify the correct size of the BVHTree of edges
Germano Cavalcante [Mon, 6 Feb 2017 17:59:31 +0000 (14:59 -0300)]
Specify the correct size of the BVHTree of edges

~edge_num~ edges_num_active
Not always all the edges enter in the build

2 years agoStandardization and style for BKE_bvhutils
Germano Cavalcante [Mon, 6 Feb 2017 17:11:06 +0000 (14:11 -0300)]
Standardization and style for BKE_bvhutils

Add `bvhtree_from_mesh_edges_ex` and callbacks to nearest_to_ray (Similar to the other functions of this code)

2 years agoFix 'public' global 'g_atexit' var in Blender.
Bastien Montagne [Mon, 6 Feb 2017 16:42:30 +0000 (17:42 +0100)]
Fix 'public' global 'g_atexit' var in Blender.

No reason to not make this private to this file, and it gave conflict
when using bpy as module and loading it in a GLib application (which
also has a g_atexit var).

2 years agoFix compilation error after recent change
Sergey Sharybin [Mon, 6 Feb 2017 14:29:13 +0000 (15:29 +0100)]
Fix compilation error after recent change

2 years agoAdd shortcuts for unsigned int, short, long and char
Sergey Sharybin [Mon, 6 Feb 2017 14:04:13 +0000 (15:04 +0100)]
Add shortcuts for unsigned int, short, long and char

Feel free to use those in the new code.

And stay away from simple "unsigned".

2 years agoUse hash instead of linear lookup in armature deform
Sergey Sharybin [Mon, 6 Feb 2017 10:12:35 +0000 (11:12 +0100)]
Use hash instead of linear lookup in armature deform

This avoids calling linear lookup 100s of time when dealing with
real-life character.

Still some tweaks possible.

2 years agoMulti-thread displace modifier
Sergey Sharybin [Mon, 6 Feb 2017 13:21:29 +0000 (14:21 +0100)]
Multi-thread displace modifier

The title says it all actually. Use BLI task to loop over vertices
and distort their locations. Gives 2x FPS increase in a file with
just time-dependent displace modifier on my desktop.

2 years agoDisplace modifier: Use special version of texture sampling
Sergey Sharybin [Mon, 6 Feb 2017 11:33:37 +0000 (12:33 +0100)]
Displace modifier: Use special version of texture sampling

This version will give less spin locks and now well-tested by render engines.

This should reduce amount of threading overhead when having multiple objects
with displace modifier enabled.

In the future this will also help us threading the modifier.

There are more modifiers which could benefit from this, but let's first
investigate the new behavior with one of them.

2 years agoAdd special texture sampling function which takes image pool argument
Sergey Sharybin [Mon, 6 Feb 2017 11:23:03 +0000 (12:23 +0100)]
Add special texture sampling function which takes image pool argument

Using image pool will reduce number of thread locks when acquiring image.
Useful when it's needed to sample texture fewzillion times a second.

2 years agoFix memory leak when building without audaspace
Sergey Sharybin [Mon, 6 Feb 2017 10:18:20 +0000 (11:18 +0100)]
Fix memory leak when building without audaspace

2 years agoC++ conformance fixes (MSVC /permissive-)
Phil Christensen [Mon, 6 Feb 2017 09:44:25 +0000 (10:44 +0100)]
C++ conformance fixes (MSVC /permissive-)

We (the Microsoft C++ team) use the Blender project as part of our "Real world code" tests.
I noticed a place in WIN32 specific code (dvpapi.cpp:85) where a string literal is losing
its const-ness when being passed to BLI_dynlib_open().  This is not permitted when using the
/permissive- conformance compiler switch (see our blog
https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/)

My suggested fix is to add const and propagate it where needed.  Another possible fix would be
to explicitly cast away the const.

Reviewers: mont29, sergey, LazyDodo

Subscribers: Blendify, sergey, mont29, LazyDodo

Tags: #platform:_windows

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