blender.git
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.

18 months agoCode cleanup: fix incorrect socket names in hair and particle info nodes.
Brecht Van Lommel [Wed, 21 Feb 2018 12:18:40 +0000 (13:18 +0100)]
Code cleanup: fix incorrect socket names in hair and particle info nodes.

18 months agoFix incorrect OSL raytype bits and add some comments.
Brecht Van Lommel [Tue, 20 Feb 2018 13:36:50 +0000 (14:36 +0100)]
Fix incorrect OSL raytype bits and add some comments.

18 months agoFix T54105: random walk SSS missing in branched indirect paths.
Brecht Van Lommel [Mon, 19 Feb 2018 23:15:14 +0000 (00:15 +0100)]
Fix T54105: random walk SSS missing in branched indirect paths.

Unify the path and branched path indirect SSS code. No performance impact
found on CUDA, for AMD split kernel the extra code was already there.

18 months agoFix T54107: bevel shader + normal map gives wrong result.
Brecht Van Lommel [Tue, 20 Feb 2018 19:24:40 +0000 (20:24 +0100)]
Fix T54107: bevel shader + normal map gives wrong result.

18 months agoCleanup: Don't perform borderselect on channels that aren't visible
Joshua Leung [Wed, 21 Feb 2018 11:59:15 +0000 (00:59 +1300)]
Cleanup: Don't perform borderselect on channels that aren't visible

18 months agoFix: Return back to conventional way of averaging points for keyframe de-dup
Joshua Leung [Wed, 21 Feb 2018 11:44:03 +0000 (00:44 +1300)]
Fix: Return back to conventional way of averaging points for keyframe de-dup

The other approach was causing too much error in some cases (e.g. favouring
the lower-valued keyframes). This fix should make the resulting curves less
bumpy/jagged.

18 months agoFix: Forgot to recalculate handles after deleting keyframes
Joshua Leung [Wed, 21 Feb 2018 10:21:56 +0000 (23:21 +1300)]
Fix: Forgot to recalculate handles after deleting keyframes

18 months agoFix: Don't average keyframe values if FCurve can only have int/discrete values
Joshua Leung [Wed, 21 Feb 2018 09:37:48 +0000 (22:37 +1300)]
Fix: Don't average keyframe values if FCurve can only have int/discrete values

This is to prevent problems with integer/enum properties getting invalid
values set.

18 months agoCleanup: Delete debugging code and the old version of the automerge code
Joshua Leung [Wed, 21 Feb 2018 06:15:41 +0000 (19:15 +1300)]
Cleanup: Delete debugging code and the old version of the automerge code

18 months agoTweak/Fix for T54106 - Moving multiple selected keyframes on top of an unselected...
Joshua Leung [Wed, 21 Feb 2018 06:14:33 +0000 (19:14 +1300)]
Tweak/Fix for T54106 - Moving multiple selected keyframes on top of an unselected one would not merge the keys

This commit removes an earlier attempt at optimising the lookups
for duplicates of a particular tRetainedKeyframe once we'd already
deleted all the selected copies. The problem was that now, instead
of getting rid of the unselected keys (i.e. the basic function here),
we were only getting rid of the selected duplicates.

With this fix, unselected keyframes will now get removed (as expected)
again. However, we currently don't take their values into account
when merging keyframes, since it is assumed that we don't care so much
about their values when overriding.

18 months agoMinor Optimisation: Terminate early if we've passed the insertion point for tRetained...
Joshua Leung [Wed, 21 Feb 2018 05:59:15 +0000 (18:59 +1300)]
Minor Optimisation: Terminate early if we've passed the insertion point for tRetainedKeyframes

18 months agoFeature Request T54106: When scaling keyframes, merge (by-averaging) selected keys
Joshua Leung [Wed, 21 Feb 2018 04:53:54 +0000 (17:53 +1300)]
Feature Request T54106: When scaling keyframes, merge (by-averaging) selected keys
that end up on the same frame

Currently, when scaling keyframes in the Dopesheet, if multiple
selected keyframes end up on the same frame post-scaling, they
would not get removed by the "Automerge" setting that normally
removes duplicates on the same frame.

This commit changes the behaviour so that when multiple selected
keyframes end up on the same frame, instead of keeping all these
around on the same frame (e.g. resulting in a column of keyframes
on different values), we will instead merge them into a single
keyframe (by averaging the values). This should result in a
smoother F-Curve with fewer "stair-steps" that need to be carefully
cleaned out afterwards.

Requested by @hjalti

18 months agobezt_add_to_cfra_elem() - Use same keyframe equality test as in other places
Joshua Leung [Thu, 15 Feb 2018 04:40:19 +0000 (17:40 +1300)]
bezt_add_to_cfra_elem() - Use same keyframe equality test as in other places

This shouldn't affect anything currently, as this function doesn't appear
to get used anywhere.

18 months agoFix T54065: NLA-Strip Control Curves would get disabled when name-based-filtering...
Joshua Leung [Thu, 15 Feb 2018 03:39:46 +0000 (16:39 +1300)]
Fix T54065: NLA-Strip Control Curves would get disabled when name-based-filtering is enabled

This bug took a while to track down. In the test file with this report,
the Nla-Strip Control Curve for strip time would get disabled if you
changed the NLA Editor to a second Graph Editor instance.

It turns out that because this second Graph Editor would have the
"filter fcurves by name" option enabled, this would trigger a lookup
of the referenced property's name (in order to test whether it matched
the filtering criteria). However, since that filtering code was written
before the introduction of these curves, it still assumed that the names
for these Control Curves should be handled the same as for standard FCurves.
Unfortunately, that doesn't work, as the property lookups fail if the standard
method is used - when the lookups fail, the F-Curves get tagged as being
invalid/disabled (and need to be reset using the "Revive Disabled FCurves"
operator).

Note: The changes in this patch look complicated, as I've had to shuffle
a bit of code around so that the name-filtering check can have access to
the additional info it needs. In the process, I've also removed the earlier
(hacky) approach where the control curves were getting added to a temp
buffer to get changed from normal FCurves to special ANIMTYPE_NLACURVES.

18 months agoFix more missing ID remapping in animation editor callbacks
Joshua Leung [Thu, 15 Feb 2018 02:45:08 +0000 (15:45 +1300)]
Fix more missing ID remapping in animation editor callbacks

Applying the same fixes as introduced in 98d797b67c07e85889768bf8ecde292e9e6f70e9
this time, for the Graph and NLA editors

18 months agoDepsgraph: Fix fake dependency cycle with chained IK solvers with tip excluded
Sergey Sharybin [Wed, 21 Feb 2018 11:04:28 +0000 (12:04 +0100)]
Depsgraph: Fix fake dependency cycle with chained IK solvers with tip excluded

Not sure why we need a relation from solver to a tip local transform, this
will be handled via parent relation.

Fixes remaining dependency cycles reported in T54083.

18 months agoDepsgraph: Fix dependency when constraint influence drives some other constraint
Sergey Sharybin [Wed, 21 Feb 2018 10:13:25 +0000 (11:13 +0100)]
Depsgraph: Fix dependency when constraint influence drives some other constraint

It is not possible to address transform at particular position of constraint
stack, and when constraint is being addressed is usually from driver variable.

This fixes some of dependency cycles reported in T54083.

18 months agoDepsgraph: Split debug flags
Sergey Sharybin [Wed, 21 Feb 2018 09:44:36 +0000 (10:44 +0100)]
Depsgraph: Split debug flags

Now it's possible to have debug messages for following things:

- Graph construction
- Graph evaluation
- Graph tagging

18 months agoDepsgraph: Fix crash using --debug-depsgraph and --debug-depsgraph-no-threads
Sergey Sharybin [Wed, 21 Feb 2018 09:42:22 +0000 (10:42 +0100)]
Depsgraph: Fix crash using --debug-depsgraph and --debug-depsgraph-no-threads

Was accessing past the array boundaries.

Should be safe for 2.79a.

18 months agoDepsgraph: Report overall number of cycles detected
Sergey Sharybin [Tue, 20 Feb 2018 16:16:41 +0000 (17:16 +0100)]
Depsgraph: Report overall number of cycles detected

Handy to quickly see if a fix fixed any of the cycles in a real rig,
or whether it's introduced new ones.

18 months agoVSE: skip non image/movie w/ proxy dir storage
Campbell Barton [Wed, 21 Feb 2018 07:13:40 +0000 (18:13 +1100)]
VSE: skip non image/movie w/ proxy dir storage

This would use uninitialized filename variable,
looked into supporting this however generating proxies currently only
works for movies.

18 months agoCleanup: split normals: use different varnames for angle and its cosine.
Bastien Montagne [Tue, 20 Feb 2018 12:03:10 +0000 (13:03 +0100)]
Cleanup: split normals: use different varnames for angle and its cosine.

Using same name for two different things is not the best idea ever...