blender.git
18 months agoFix T54211: OpenGL debug error message in texture draw mode.
Brecht Van Lommel [Sat, 3 Mar 2018 13:55:35 +0000 (14:55 +0100)]
Fix T54211: OpenGL debug error message in texture draw mode.

Quite harmless and won't be a problem in 2.8.

18 months agoFix T54202: Cycles crash rendering empty mesh volume after recent optimization.
Brecht Van Lommel [Fri, 2 Mar 2018 21:38:59 +0000 (22:38 +0100)]
Fix T54202: Cycles crash rendering empty mesh volume after recent optimization.

18 months agoFix Cycle standalone build.
Brecht Van Lommel [Fri, 2 Mar 2018 18:54:14 +0000 (19:54 +0100)]
Fix Cycle standalone build.

18 months agoDepsgraph: Fix dependency cycle when ID prop drives ID property
Sergey Sharybin [Fri, 2 Mar 2018 15:27:31 +0000 (16:27 +0100)]
Depsgraph: Fix dependency cycle when ID prop drives ID property

Introduced explicit ID property node for driers in depsgraph,
so it is clear what is the input for driver, and what is the
output.

This also solved relations builder throwing lots of errors
due to ID property not being found.

18 months agoDepsgraph: Silence obviously noisy relations build errors
Sergey Sharybin [Fri, 2 Mar 2018 14:50:28 +0000 (15:50 +0100)]
Depsgraph: Silence obviously noisy relations build errors

Those were happening for drivers which points to invalid drivers, and those
drivers will have their own dedicated error prints.

18 months agoDepsgraph: Cleanup, use dedicated function to ensure node exists
Sergey Sharybin [Fri, 2 Mar 2018 13:35:19 +0000 (14:35 +0100)]
Depsgraph: Cleanup, use dedicated function to ensure node exists

18 months agoDepsgraph: Cleanup, function return value
Sergey Sharybin [Fri, 2 Mar 2018 13:12:33 +0000 (14:12 +0100)]
Depsgraph: Cleanup, function return value

Driver build result was never used, so no reason to return operation.

18 months agoDepsgraph: Fix cycle detector to handle closed loops
Sergey Sharybin [Fri, 2 Mar 2018 11:27:05 +0000 (12:27 +0100)]
Depsgraph: Fix cycle detector to handle closed loops

It was possible to have relations like A -> B -> C -> A (import thing is
that no other operations points into this cluster) which were not detected
or reported by dependency cycle solver.

Now this is solved by ensuring we don't leave unvisited nodes behind.

18 months agoCleanup: Avoid double semi-colon
Sergey Sharybin [Fri, 2 Mar 2018 10:26:07 +0000 (11:26 +0100)]
Cleanup: Avoid double semi-colon

18 months agoTests: Avoid access globals from abstract base class
Sergey Sharybin [Fri, 2 Mar 2018 10:16:59 +0000 (11:16 +0100)]
Tests: Avoid access globals from abstract base class

Delegate functionality to subclasses, assert when subclasses didn't do
job the are supposed to do.

Thanks Sybren for pointing to a proper solution.

18 months agoCycles: Fix building of OpenCL kernels after volume optimization commit
Mai Lavelle [Fri, 2 Mar 2018 09:52:32 +0000 (04:52 -0500)]
Cycles: Fix building of OpenCL kernels after volume optimization commit

OpenCL is C based, so no support for operators.

Related commit: 7377d411b47d50cd943cd

18 months agoMaintain scaling ratio of non-free axes in Maintain Volume T48079 fix.
Alexander Gavrilov [Fri, 2 Mar 2018 08:01:49 +0000 (11:01 +0300)]
Maintain scaling ratio of non-free axes in Maintain Volume T48079 fix.

This is probably a better way to handle it: instead of totally
discarding scaling of non-free axes, keep the ratio between them.
Basically the logic of the constraint is now that it rescales the
object uniformly in the non-free axis plane in order to force the
total volume change to the desired value.

18 months agoObject Mode: move logic to 'object_modes.c'
Campbell Barton [Fri, 2 Mar 2018 02:53:17 +0000 (13:53 +1100)]
Object Mode: move logic to 'object_modes.c'

Was mixed with edit-mode, centralize mode switching in a single file.

No functional changes.

18 months agoFCurve: only calculate single axis length
Campbell Barton [Fri, 2 Mar 2018 01:43:41 +0000 (12:43 +1100)]
FCurve: only calculate single axis length

Was calculating all 3

18 months agoFix building w/o Python
Campbell Barton [Fri, 2 Mar 2018 00:09:24 +0000 (11:09 +1100)]
Fix building w/o Python

Also minor cleanup.

18 months agoDiscard non-free axis scaling in Maintain Volume to improve 2.79 compat.
Alexander Gavrilov [Thu, 1 Mar 2018 17:45:18 +0000 (20:45 +0300)]
Discard non-free axis scaling in Maintain Volume to improve 2.79 compat.

It seems the reason the old version of the constraint overcompensates
as reported in T48079 is to allow the constraint to work with uniform
scaling on all axes. However the way it did that actually _requires_
uniform scaling for the constraint to work correctly, and breaks if
only the free scaling axis is used to avoid redundant channels.

This version attempts to allow both by discarding scaling in the non-
free directions instead of applying the correction on top of it.

18 months agoPython tests: Split re-usable test related functionality to a module
Sergey Sharybin [Thu, 1 Mar 2018 16:39:57 +0000 (17:39 +0100)]
Python tests: Split re-usable test related functionality to a module

The idea is to avoid re-implementing this for an upcoming FFmpeg tests.

18 months agoRefactor: Merge non-functional-change part of 'edit normals' 2017 GSoC.
Bastien Montagne [Thu, 1 Mar 2018 15:54:21 +0000 (16:54 +0100)]
Refactor: Merge non-functional-change part of 'edit normals' 2017 GSoC.

This merges changes in internals, runtime-only of existing custom
normals code, which make sense as of themselves, and will make diff of
soc branch easier/lighter to review.

In the details, it mostly changes two things:

* Now, smooth fans (aka MLoopNorSpaceArray) can store either loop
indices, or pointers to BMLoop themselves. This makes sense since in
BMesh, it's relatively easy to get index from a BMElement, but nearly
impracticable to go the other way around.

* First change enforces another, now we cannot rely anymore on `loops`
being NULL in MLoopNorSpace to detect single-loop fans, so we instead
store that info in a new flag.

Again, these are expected to be totally non-functional changes.

18 months agoCycles volume: fast empty space optimization by generating a tight mesh
Kévin Dietrich [Thu, 1 Mar 2018 10:54:01 +0000 (11:54 +0100)]
Cycles volume: fast empty space optimization by generating a tight mesh
around the volume.

We generate a tight mesh around the active voxels of the volume in order
to effectively skip empty space, and start volume ray marching as close
to interesting volume data as possible. See code comments for details on
how the mesh generation algorithm works.

This gives up to 2x speedups in some scenes.

Reviewed by: brecht, dingto

Reviewers: #cycles

Subscribers: lvxejay, jtheninja, brecht

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

18 months agoGPU_select: remove unused finalize function
Campbell Barton [Thu, 1 Mar 2018 05:41:50 +0000 (16:41 +1100)]
GPU_select: remove unused finalize function

Changed 2.8x code so this is no longer needed.

18 months agoCycles: don't count volume boundaries as transparent bounces.
Brecht Van Lommel [Wed, 28 Feb 2018 22:00:46 +0000 (23:00 +0100)]
Cycles: don't count volume boundaries as transparent bounces.

This is more important now that we will have tigther volume bounds that
we hit multiple times. It also avoids some noise due to RR previously
affecting these surfaces, which shouldn't have been the case and should
eventually be fixed for transparent BSDFs as well.

For non-volume scenes I found no performance impact on NVIDIA or AMD.
For volume scenes the noise decrease and fixed artifacts are worth the
little extra render time, when there is any.

18 months agoCycles: change principled BSDF default distribution and SSS.
Brecht Van Lommel [Wed, 28 Feb 2018 05:33:07 +0000 (06:33 +0100)]
Cycles: change principled BSDF default distribution and SSS.

* Use a subsurface color equal to the base color, and give the subsurface
  radius skin like values by default. This is how the parameter should
  typically be used.
* Use GGX by default, multiscatter GGX is still quite noisy and has some
  fireflies so let's keep it optional for now.

18 months agoCycles: principled absorption color now has more effect at lower values.
Brecht Van Lommel [Wed, 28 Feb 2018 03:36:55 +0000 (04:36 +0100)]
Cycles: principled absorption color now has more effect at lower values.

18 months agoFix T52685, part II: Add option to strip numbers from flipped bone names again.
Bastien Montagne [Wed, 28 Feb 2018 16:13:31 +0000 (17:13 +0100)]
Fix T52685, part II: Add option to strip numbers from flipped bone names again.

While doing so with Bone_R.001, Bone_R.003, Bone_R.003 etc. is doomed to
issues, doing that on duplicates of actually correctly named bones can
be handy, and safe.

So adding back as an option (was removed in rB702bc5ba26d5).

18 months agoFix T52685: Flip names for bones its not working.
Bastien Montagne [Wed, 28 Feb 2018 15:53:14 +0000 (16:53 +0100)]
Fix T52685: Flip names for bones its not working.

Flip names operator changed in rB702bc5ba26d5, to some sensible
behavior. But this breaks common workflow of 'duplicate part of the
bones, scale-mirror new ones, and flip their names'.

So now, instead of doing this in two steps, trying to guesstimate which
bones should get which name, just add option to flip names to duplicate
operator itself. Simpler, safer, and much, much more consitent behavior
and predictable results.

18 months agoRadial control: Skip operator properties from being saved
Sergey Sharybin [Wed, 28 Feb 2018 15:14:35 +0000 (16:14 +0100)]
Radial control: Skip operator properties from being saved

This solves issue with tweaking brush size when interleaving particle edit
and texture paint modes. The issue was caused by texture paing setting more
operator properties then it's done for particle edit mode, which made window
manager to use saved proeprties for the "missing" ones.

Don't see any reason why we would want to save any of those properties.

This is a regression since rB83b60dac57a1.

18 months agoCollada: Make EvaluationContext const as its only used for reading here
Gaia Clary [Wed, 28 Feb 2018 15:05:18 +0000 (16:05 +0100)]
Collada: Make EvaluationContext const as its only used for reading here

18 months agocollada: call from operator to Collada exporter/importer now uses structures instead...
Gaia Clary [Wed, 28 Feb 2018 14:59:49 +0000 (15:59 +0100)]
collada: call from operator to Collada exporter/importer now uses structures instead of passing many parameters

18 months agoCollada: Moved structure definitions for export settings to the exportSettings.h...
Gaia Clary [Wed, 28 Feb 2018 14:53:00 +0000 (15:53 +0100)]
Collada: Moved structure definitions for export settings to the exportSettings.h Also make typedefs for import/export structures.

18 months agoDe-duplicate tool settings copy and make tool settings freeing reusable
Sergey Sharybin [Wed, 28 Feb 2018 13:52:17 +0000 (14:52 +0100)]
De-duplicate tool settings copy and make tool settings freeing reusable

18 months agoNull pointer check exiting sculpt mode
Campbell Barton [Wed, 28 Feb 2018 12:23:48 +0000 (23:23 +1100)]
Null pointer check exiting sculpt mode

Needed for 2.8x, harmless here.

18 months agoUpdate CUEW to latest version
Brecht Van Lommel [Wed, 28 Feb 2018 02:00:29 +0000 (03:00 +0100)]
Update CUEW to latest version

Some Linux distribution have only libcuda.so.1, not libcuda.so.

18 months agoCode cleanup: fix a few compiler warnings.
Brecht Van Lommel [Wed, 28 Feb 2018 01:51:45 +0000 (02:51 +0100)]
Code cleanup: fix a few compiler warnings.

18 months agoCleanup: comment for depth picking code, const args
Campbell Barton [Wed, 28 Feb 2018 00:46:02 +0000 (11:46 +1100)]
Cleanup: comment for depth picking code, const args

Note that setting `glDepthFunc` isn't important,
since 2.8 branch changes this value it might seem like an error
however it's harmless in this case - so better make note of this.

18 months agoCleanup: use 'uint' for GPU_select
Campbell Barton [Wed, 28 Feb 2018 00:37:39 +0000 (11:37 +1100)]
Cleanup: use 'uint' for GPU_select

18 months agoCode cleanup: refactor Cycles image metadata retrieval to use a struct.
Brecht Van Lommel [Tue, 27 Feb 2018 21:16:45 +0000 (22:16 +0100)]
Code cleanup: refactor Cycles image metadata retrieval to use a struct.

18 months agoCollada: Added tests for Animation export
Gaia Clary [Tue, 27 Feb 2018 19:41:34 +0000 (20:41 +0100)]
Collada: Added tests for Animation export

18 months agoCollada: Remove obsolete code
Gaia Clary [Tue, 27 Feb 2018 16:08:40 +0000 (17:08 +0100)]
Collada: Remove obsolete code

18 months agofix: Collada Matrixdata Importer tried to fix rotations where nothing was to fix...
Gaia Clary [Tue, 27 Feb 2018 16:02:37 +0000 (17:02 +0100)]
fix: Collada Matrixdata Importer tried to fix rotations where nothing was to fix. The matrixdata import is now only doing a matrix decompose and then pplies the decomposed values to 3 trans-, 3 scale- and 4 rot-curves)

18 months agoCollada: removed unnecessary dup[licate matrix conversion in matrix data exporter
Gaia Clary [Tue, 27 Feb 2018 15:55:18 +0000 (16:55 +0100)]
Collada: removed unnecessary dup[licate matrix conversion in matrix data exporter

18 months agoCollada exporter: Replaced numbers 0/1 by boolean values fasle/true for better reading
Gaia Clary [Tue, 27 Feb 2018 15:52:51 +0000 (16:52 +0100)]
Collada exporter: Replaced numbers 0/1 by boolean values fasle/true for better reading

18 months agoCollada Shape key export can create huge datafiles and may need some optimization...
Gaia Clary [Tue, 27 Feb 2018 15:51:52 +0000 (16:51 +0100)]
Collada Shape key export can create huge datafiles and may need some optimization. Disable export by default, user can still enable on demand

18 months agoCollada enable Export of animation data by default
Gaia Clary [Tue, 27 Feb 2018 15:48:41 +0000 (16:48 +0100)]
Collada enable Export of animation data by default

18 months agoCleanup: remove unused duplicate code
Campbell Barton [Tue, 27 Feb 2018 11:02:18 +0000 (22:02 +1100)]
Cleanup: remove unused duplicate code

18 months agoCollada: Remove unused vector of flaot[4][4] values
Sergey Sharybin [Tue, 27 Feb 2018 10:14:55 +0000 (11:14 +0100)]
Collada: Remove unused vector of flaot[4][4] values

Was in fact causing issues on macOS, something to do with
a destructor.

18 months agoCollada: Use floating point version of abs()
Sergey Sharybin [Tue, 27 Feb 2018 10:14:17 +0000 (11:14 +0100)]
Collada: Use floating point version of abs()

Avoids implicit cast of float to int.

18 months agoGPU_select: correction to select-pick-finalize
Campbell Barton [Tue, 27 Feb 2018 09:44:12 +0000 (20:44 +1100)]
GPU_select: correction to select-pick-finalize

Would run twice, harmless at the moment but could cause issues later.

18 months agoGPU_select: utility function to finalize selection
Campbell Barton [Tue, 27 Feb 2018 09:16:53 +0000 (20:16 +1100)]
GPU_select: utility function to finalize selection

Needed for depth picking in 2.8

18 months agoFix T54106: Save blend ignores 'check_existing'
Campbell Barton [Tue, 27 Feb 2018 02:33:59 +0000 (13:33 +1100)]
Fix T54106: Save blend ignores 'check_existing'

18 months agoCollada: removed unused variables. fixed incompatible format in console output (Anima...
Gaia Clary [Mon, 26 Feb 2018 22:37:27 +0000 (23:37 +0100)]
Collada: removed unused variables. fixed incompatible format in console output (AnimationExporter.cpp)

18 months agosimplified collada integration in Blender. made functions mostly similar with blender2.8
Gaia Clary [Mon, 26 Feb 2018 15:49:06 +0000 (16:49 +0100)]
simplified collada integration in Blender. made functions mostly similar with blender2.8

18 months agoAdding support for Matrix Transformation export
Gaia Clary [Mon, 26 Feb 2018 15:34:45 +0000 (16:34 +0100)]
Adding support for Matrix Transformation export

The exporter does export matrix data (4*4 Transformation matrix) only for Skeletal animation. For object animation only exporting to trans/rot/loc is implemented.

This task implements Matrix export also for simple Object animation.

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

18 months agocollada: fix typo in if statement
Gaia Clary [Mon, 26 Feb 2018 11:55:54 +0000 (12:55 +0100)]
collada: fix typo in if statement

18 months agoas discussed on IRC this definition seems to be not necessary
Gaia Clary [Mon, 26 Feb 2018 11:09:29 +0000 (12:09 +0100)]
as discussed on IRC this definition seems to be not necessary

18 months agooptimized the output of the collada test script for better reading
Gaia Clary [Sun, 25 Feb 2018 23:09:00 +0000 (00:09 +0100)]
optimized the output of the collada test script for better reading

18 months agoCleanup: typos
Campbell Barton [Mon, 26 Feb 2018 08:58:31 +0000 (19:58 +1100)]
Cleanup: typos

D3081 by @rjg, with others.

18 months agoRevert "changing collada parameters"
Campbell Barton [Mon, 26 Feb 2018 08:33:53 +0000 (19:33 +1100)]
Revert "changing collada parameters"

This reverts commit d91f2ac37aa02d96a00d116fa55cdc9f55afd32c.

This change makes scene.collada_export() meaningless
(ignoring the scene the method is being run on).

18 months agoPresets: remove double underscore in preset names
Campbell Barton [Mon, 26 Feb 2018 08:21:02 +0000 (19:21 +1100)]
Presets: remove double underscore in preset names

18 months agoFix T54029: Wrong preset name display in win32
Campbell Barton [Mon, 26 Feb 2018 08:05:01 +0000 (19:05 +1100)]
Fix T54029: Wrong preset name display in win32

18 months agoCleanup: use function for clearing bmesh tags
Campbell Barton [Mon, 26 Feb 2018 03:05:41 +0000 (14:05 +1100)]
Cleanup: use function for clearing bmesh tags

18 months agoFix T50132: UV sticky mode is not respected with border/circle/lasso select.
Hugo Sales [Sun, 25 Feb 2018 21:24:55 +0000 (22:24 +0100)]
Fix T50132: UV sticky mode is not respected with border/circle/lasso select.

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

18 months agoFix incorrect text clipping on node link button in material properties.
Brecht Van Lommel [Sat, 24 Feb 2018 16:15:16 +0000 (17:15 +0100)]
Fix incorrect text clipping on node link button in material properties.

18 months agoFix Player tm, a lifes job
Jens Verwiebe [Sun, 25 Feb 2018 09:35:08 +0000 (10:35 +0100)]
Fix Player tm, a lifes job

18 months agochanging collada parameters
Gaia Clary [Sat, 24 Feb 2018 21:15:52 +0000 (22:15 +0100)]
changing collada parameters

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

18 months agoFix a whitespace slipped in
Jens Verwiebe [Sat, 24 Feb 2018 17:07:05 +0000 (18:07 +0100)]
Fix a whitespace slipped in

18 months agoFix Plyer tm
Jens Verwiebe [Sat, 24 Feb 2018 16:30:37 +0000 (17:30 +0100)]
Fix Plyer tm

18 months agoT45687: Rework the Export/Import of Animations
Gaia Clary [Sat, 24 Feb 2018 12:11:30 +0000 (13:11 +0100)]
T45687: Rework the Export/Import of Animations

This started with a fix for an animated Object Hierarchy. Then i decided to cleanup and optimize a bit. But at the end this has become a more or less full rewrite of the Animation Exporter. All of this happened in a separate local branch and i have retained all my local commits to better see what i have done.

Brief description:

* I fixed a few issues with exporting keyframed animations of object hierarchies where the objects have parent inverse matrices which differ from the Identity matrix.
* I added the option to export sampled animations with a user defined sampling rate (new user interface option)
* I briefly tested Object Animations and Rig Animations.

What is still needed:

* Cleanup the code
* Optimize the user interface
* Do the Documentation

Reviewers: mont29

Reviewed By: mont29

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

18 months agoSmoke: expose empty space clipping property to the UI.
Kévin Dietrich [Thu, 22 Feb 2018 15:26:50 +0000 (16:26 +0100)]
Smoke: expose empty space clipping property to the UI.

This is used to determine which voxels are to be considered empty space.

Previously it was hardcoded for converting dense grids to OpenVDB grids
to reduce disk space usage.

This value is also useful for rendering engines to know, i.e. to
optimize ray marching.

18 months agoOpenVDB : use underscores instead of spaces in grid names.
Kévin Dietrich [Mon, 29 Jan 2018 17:37:35 +0000 (18:37 +0100)]
OpenVDB : use underscores instead of spaces in grid names.

Some other software cannot handle grid names with spaces in them. We still check for names with spaces so as to not break old
files.

This fixes T53802.

18 months agoCycles: add Principled Volume shader.
Brecht Van Lommel [Tue, 30 Jan 2018 14:05:19 +0000 (15:05 +0100)]
Cycles: add Principled Volume shader.

Similar to the Principled BSDF, this should make it easier to set up volume
materials. Smoke and fire can be rendererd with just a single principled
volume node, the appropriate attributes will be used when available. The node
also works for simpler homogeneous volumes like water or mist.

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

18 months agoCycles: change smoke color grid to not include density multiplied in.
Brecht Van Lommel [Sun, 18 Feb 2018 02:16:29 +0000 (03:16 +0100)]
Cycles: change smoke color grid to not include density multiplied in.

This breaks backwards compatibility some, making smoke colors brighters
than before. But it is also more correct this way.

18 months agoCode refactor: improve attribute handling for optional volume attributes.
Brecht Van Lommel [Sun, 18 Feb 2018 02:20:39 +0000 (03:20 +0100)]
Code refactor: improve attribute handling for optional volume attributes.

A volume shader should be able to request attributes, and still be rendered
as homogeneous if no volume attributes are available for the object.

18 months agoSmoke: change default flame temperatures to match OpenGL preview.
Brecht Van Lommel [Sun, 18 Feb 2018 02:24:40 +0000 (03:24 +0100)]
Smoke: change default flame temperatures to match OpenGL preview.

18 months agoSmoke: add temperature grid, with values 0..1 corresponding to 0..1000K.
Brecht Van Lommel [Sun, 18 Feb 2018 02:13:07 +0000 (03:13 +0100)]
Smoke: add temperature grid, with values 0..1 corresponding to 0..1000K.

18 months agoNodes: left align text for color and string sockets, same as other types.
Brecht Van Lommel [Sun, 18 Feb 2018 02:15:13 +0000 (03:15 +0100)]
Nodes: left align text for color and string sockets, same as other types.

18 months agoFix T54137: OpenEXR files with long red/green/blue channel names not loading correctly.
Brecht Van Lommel [Fri, 23 Feb 2018 13:32:17 +0000 (14:32 +0100)]
Fix T54137: OpenEXR files with long red/green/blue channel names not loading correctly.

18 months agoBuildbot: Enable Volta deviced CUDA binaries
Sergey Sharybin [Fri, 23 Feb 2018 13:24:59 +0000 (14:24 +0100)]
Buildbot: Enable Volta deviced CUDA binaries

18 months agoBuildbot: Remove master configuration files
Sergey Sharybin [Fri, 23 Feb 2018 11:37:05 +0000 (12:37 +0100)]
Buildbot: Remove master configuration files

Those are stored in blender-buildbot repository now, so having them in
Blender only causes extra work to keep files in sync.

18 months agoBuildbot: Disable cuda hack for macOS
Sergey Sharybin [Fri, 23 Feb 2018 09:55:14 +0000 (10:55 +0100)]
Buildbot: Disable cuda hack for macOS

18 months agoWM: Add WM_menutype_poll function
Campbell Barton [Fri, 23 Feb 2018 06:01:22 +0000 (17:01 +1100)]
WM: Add WM_menutype_poll function

Wraps menutype poll, no functional changes.

18 months agoWM: add WM_keymap_poll function
Campbell Barton [Fri, 23 Feb 2018 01:50:56 +0000 (12:50 +1100)]
WM: add WM_keymap_poll function

Wrapps keymap poll, no functional changes.

18 months agoCleanup: header guards & style
Campbell Barton [Fri, 23 Feb 2018 01:59:02 +0000 (12:59 +1100)]
Cleanup: header guards & style

18 months agoDepsgraph: Fix mistake in previous refactor commit
Sergey Sharybin [Thu, 22 Feb 2018 15:30:47 +0000 (16:30 +0100)]
Depsgraph: Fix mistake in previous refactor commit

18 months agoCleanup: Fix const pointers mess in previous commit.
Bastien Montagne [Thu, 22 Feb 2018 14:41:41 +0000 (15:41 +0100)]
Cleanup: Fix const pointers mess in previous commit.

18 months agoFix (unreported) meshes changing shading when creating empty clnors data.
Bastien Montagne [Thu, 22 Feb 2018 14:00:42 +0000 (15:00 +0100)]
Fix (unreported) meshes changing shading when creating empty clnors data.

When you were using autosmooth to generate some custom normals, and
created empty custom loop normal data, you would go back to an 'all
smooth' shading, cancelling some sharp edges generated by the mesh's
smooth threshold.

Now we will first tag such edges as sharp, such that shading remains the
same. This is not crucial in current master, but it is for clnors
editing gsoc branch!

18 months agoCleanup: clnor code: more 'do not use same varname for two different things'.
Bastien Montagne [Thu, 22 Feb 2018 09:35:08 +0000 (10:35 +0100)]
Cleanup: clnor code: more 'do not use same varname for two different things'.

18 months agoFix T54129: Moving keyframes on top of other keyframes, removes both keyframes
Joshua Leung [Thu, 22 Feb 2018 14:13:56 +0000 (03:13 +1300)]
Fix T54129: Moving keyframes on top of other keyframes, removes both keyframes

Regression caused by earlier commits to improve the automerge behaviour.
In this case, the problems only occurred when moving a selected keyframe
forwards in time to overlap an unselected keyframe.

18 months agoFix: Don't ignore duplicate channels when doing border/circle/lasso select
Joshua Leung [Thu, 22 Feb 2018 13:34:19 +0000 (02:34 +1300)]
Fix: Don't ignore duplicate channels when doing border/circle/lasso select

While it is necessary to ignore duplicates when doing Deselect/Column Select
(where double-updates may result in nothing being selected), for borderselect,
not including the duplicates meant that sometimes, nothing would happen
if you were trying to borderselect keyframes originating from hidden channels.

This was first noticed in the greasepencil-object branch, but affects all
animation channel types.

18 months agoDepsgraph: Remove unused argument
Sergey Sharybin [Thu, 22 Feb 2018 13:27:29 +0000 (14:27 +0100)]
Depsgraph: Remove unused argument

18 months agoDepsgraph: Remove unused bmain from modifiers relations update context
Sergey Sharybin [Thu, 22 Feb 2018 13:07:08 +0000 (14:07 +0100)]
Depsgraph: Remove unused bmain from modifiers relations update context

18 months agoFix compilation error with legacy depsgraph disabled
Sergey Sharybin [Thu, 22 Feb 2018 12:05:38 +0000 (13:05 +0100)]
Fix compilation error with legacy depsgraph disabled

18 months agoDepsgraph: Wrap all arguments foe modifiers relations update into a struct
Sergey Sharybin [Thu, 22 Feb 2018 11:54:06 +0000 (12:54 +0100)]
Depsgraph: Wrap all arguments foe modifiers relations update into a struct

Makes it easier to add or remove fields needed to update relations.

18 months agoDepsgraph: Replace LIB_TAG_DOIT with hash lookup
Sergey Sharybin [Thu, 22 Feb 2018 10:03:39 +0000 (11:03 +0100)]
Depsgraph: Replace LIB_TAG_DOIT with hash lookup

This allows us to:

- Not mock around with tags stored in a global space,
    and not to iterate over all datablocks in the database
    to clear the tags.

- Properly deal with datablocks which might not be in main database.

    While it sounds crazy, it might be handy when dealing with preview,
    or some partial scene updates, such as motion paths.

- Avoids majority of places where depsgraph construction needed bmain.

    This is something what could help in blender2.8 branch.

From tests with production file here did not see any measurable slowdown.

Hopefully, there is no functional changes :)

18 months agoDepsgraph: Add utility class to keep track of handled ID datablocks
Sergey Sharybin [Thu, 22 Feb 2018 09:52:43 +0000 (10:52 +0100)]
Depsgraph: Add utility class to keep track of handled ID datablocks

Currently unused, actual logic change will come in the next commit.

18 months agoDepsgraph: Use proper debug print flags check
Sergey Sharybin [Thu, 22 Feb 2018 09:40:18 +0000 (10:40 +0100)]
Depsgraph: Use proper debug print flags check

Was printing some tagging/evaluation prints when only building
messages were requested.

18 months agoDepsgraph: Report graph construction time when run with --debug-depsgraph-build
Sergey Sharybin [Thu, 22 Feb 2018 09:35:04 +0000 (10:35 +0100)]
Depsgraph: Report graph construction time when run with --debug-depsgraph-build

18 months agoDepsgraph: Cleanup, reduce indentation level
Sergey Sharybin [Thu, 22 Feb 2018 09:31:47 +0000 (10:31 +0100)]
Depsgraph: Cleanup, reduce indentation level

18 months agoCycles: add Russian roulette termination for volume multiple scattering.
Brecht Van Lommel [Tue, 20 Feb 2018 14:36:07 +0000 (15:36 +0100)]
Cycles: add Russian roulette termination for volume multiple scattering.

This mainly helps with dense volumes, rendering can be 30% faster with
little noise increase in such scenes.

18 months agoCycles: better path termination for transparency.
Brecht Van Lommel [Tue, 20 Feb 2018 13:22:40 +0000 (14:22 +0100)]
Cycles: better path termination for transparency.

We now continue transparent paths after diffuse/glossy/transmission/volume
bounces are exceeded. This avoids unexpected boundaries in volumes with
transparent boundaries. It is also required for MIS to work correctly with
transparent surfaces, as we also continue through these in shadow rays.

The main visible changes is that volumes will now be lit by the background
even at volume bounces 0, same as surfaces.

Fixes T53914 and T54103.

18 months agoCycles: make principled BSDF node wider in the node editor by default.
Brecht Van Lommel [Mon, 19 Feb 2018 22:47:42 +0000 (23:47 +0100)]
Cycles: make principled BSDF node wider in the node editor by default.