blender-staging.git
3 years agoAdd upstream information to curve_fit_nd library
Campbell Barton [Thu, 4 Aug 2016 22:35:12 +0000 (08:35 +1000)]
Add upstream information to curve_fit_nd library

3 years agoCurve Fitting: sync with upstream
Campbell Barton [Thu, 4 Aug 2016 22:34:23 +0000 (08:34 +1000)]
Curve Fitting: sync with upstream

Correct accidental float use

3 years agoCleanup: Use BKE_gpencil prefix
Julian Eisel [Thu, 4 Aug 2016 13:03:18 +0000 (15:03 +0200)]
Cleanup: Use BKE_gpencil prefix

This is a good point to change this as grease-pencil-v2 branch was just merged, so I hope merge conflicts with other branches are minimal.

3 years agoCycles: copy shader node names over in the blender sync code.
Alexander Gavrilov [Thu, 4 Aug 2016 11:48:34 +0000 (14:48 +0300)]
Cycles: copy shader node names over in the blender sync code.

This makes constant folding logs with --debug-cycles more meaningful.
A tiny fix is needed in OSL generator to match recent node refactoring.

3 years agoCycles: Report human-readable string of compilation error code
Sergey Sharybin [Thu, 4 Aug 2016 10:14:43 +0000 (12:14 +0200)]
Cycles: Report human-readable string of compilation error code

It is possible that compilation will fail without giving anything in the
log buffer. For this cases giving a tip about error code will be really
handy.

Patch by @Ilia, thanks!

3 years agoCleanup: Use bool
Julian Eisel [Thu, 4 Aug 2016 01:10:28 +0000 (03:10 +0200)]
Cleanup: Use bool

3 years agoMinor whitespace correction for eaea4ea51f665
Julian Eisel [Wed, 3 Aug 2016 23:43:01 +0000 (01:43 +0200)]
Minor whitespace correction for eaea4ea51f665

Caused by merge conflicts, slipped throug when double checking.

3 years agoFix T47782: popups with wrong size when switching from retina to non-retina on OS X.
Brecht Van Lommel [Wed, 3 Aug 2016 23:05:27 +0000 (01:05 +0200)]
Fix T47782: popups with wrong size when switching from retina to non-retina on OS X.

3 years agoUI: Correct tooltips for properties region toggle OP
Julian Eisel [Wed, 3 Aug 2016 22:26:49 +0000 (00:26 +0200)]
UI: Correct tooltips for properties region toggle OP

Now all consistent and using term "properties region" instead of "properties panel". Ideally we had a more generic operator for all those.

Fixes T49006.

3 years agoGrease Pencil v2 Branch
Antonio Vazquez [Wed, 3 Aug 2016 21:31:48 +0000 (23:31 +0200)]
Grease Pencil v2 Branch

Improve current Grease Pencil in order to get a better 2D animation tool.

More info in WIKI pages: https://wiki.blender.org/index.php/User:Antoniov

Reviewed By: Severin, aligorith, campbellbarton

Patch by @antoniov, with edits by @Severin.

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

3 years agoFix T48164: messed up interface switching between retina and non-retina display on...
Brecht Van Lommel [Wed, 3 Aug 2016 20:43:58 +0000 (22:43 +0200)]
Fix T48164: messed up interface switching between retina and non-retina display on OS X.

3 years agoBoolean modifier UI improvement
Julian Eisel [Wed, 3 Aug 2016 17:46:11 +0000 (19:46 +0200)]
Boolean modifier UI improvement

This patch improves UI of a recently added solver preference in boolean modifier:

{F331776}

Issue with the current UI is that it shows user unnecessary information and breaks established grid layout.

Reviewers: carter2422

Reviewed By: carter2422

Subscribers: carter2422

Tags: #user_interface, #bf_blender

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

3 years agoCycles: Recent SSS inline changes broke CPU tests
Sergey Sharybin [Wed, 3 Aug 2016 13:27:48 +0000 (15:27 +0200)]
Cycles: Recent SSS inline changes broke CPU tests

Very weird, but let's just fall back a bit for now.

3 years agoFix T49010: Portals don't work in recent Blender versions
Sergey Sharybin [Wed, 3 Aug 2016 10:38:25 +0000 (12:38 +0200)]
Fix T49010: Portals don't work in recent Blender versions

3 years agoCycles: Revert recent inline changes for CUDA 8 and sm_50+
Sergey Sharybin [Wed, 3 Aug 2016 09:41:58 +0000 (11:41 +0200)]
Cycles: Revert recent inline changes for CUDA 8 and sm_50+

This changes actually lead to 2x slowdown. It's getting a bit annoying
because those are the changes to make pre-maxwell cards render with the
same speed.

3 years agoFix T48283: on OS X, mouse clicks not working properly if application launch takes...
Brecht Van Lommel [Wed, 3 Aug 2016 00:39:29 +0000 (02:39 +0200)]
Fix T48283: on OS X, mouse clicks not working properly if application launch takes a long time.

3 years agoViewport: Make lights in local view behave like BI and Cycles
Julian Eisel [Tue, 2 Aug 2016 19:52:08 +0000 (21:52 +0200)]
Viewport: Make lights in local view behave like BI and Cycles

Ignore that lights are not included in local view, always render them if they are on the correct layers. BI and Cycles do this as well.

3 years agoFix T49003: Cycles volumes have wrong results after recent microdisp commits
Mai Lavelle [Tue, 2 Aug 2016 19:27:41 +0000 (15:27 -0400)]
Fix T49003: Cycles volumes have wrong results after recent microdisp commits

Problem was that sd->prim can be -1 for volumes and was causing check in subd
code to access out of bounds

3 years agoFix T43220, T47551: collider scaling or rotation causes smoke to explode.
Alexander Gavrilov [Mon, 18 Jul 2016 16:03:05 +0000 (19:03 +0300)]
Fix T43220, T47551: collider scaling or rotation causes smoke to explode.

The problem happens because smoke collides only with the surface of the
collider and uses incompressible fluid solver. This means that scaling
the collider tries to compress or decompress fluid within the volume of
the collider, which can't be handled by the simulation. Fast rotation
likely also causes transient scaling due to emulation of arcs by chords.

This can be fixed by finding compartments completely isolated by obstacles
from the rest of the domain, and forcing total divergence within each one
to be zero so that equations are solvable. Physical validity is somewhat
dubious, but without this the solver simply breaks down.

From the physics point of view, the effect of the correction should be
similar to opening a hole from every cell to another dimension that lets
an equal amount of air to pass through to balance the change in volume.

Reviewers: miikah, lukastoenne

Reviewed By: lukastoenne

Subscribers: dafassi, scorpion81, #physics

Maniphest Tasks: T43220, T47551

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

3 years agoFix T43782: smoke simulation problems with multiple touching colliders.
Alexander Gavrilov [Sun, 17 Jul 2016 17:42:06 +0000 (20:42 +0300)]
Fix T43782: smoke simulation problems with multiple touching colliders.

When the colliders are joined, each cell that touches them only gets
velocity contribution once. When there are multiple objects, velocities
are summed, which causes some cells to get 2x, 3x or more than the actual
object velocity.

Fix this by using the average velocity of all colliders touching a cell.

Reviewers: miikah, lukastoenne

Reviewed By: lukastoenne

Subscribers: dafassi, scorpion81, #physics

Maniphest Tasks: T43782

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

3 years agoCycles: log how many nodes were deduplicated for use in tests.
Alexander Gavrilov [Tue, 2 Aug 2016 16:26:57 +0000 (19:26 +0300)]
Cycles: log how many nodes were deduplicated for use in tests.

To make the number more meaningful, also skip deduplicating
obviously unused nodes with no outgoing links.

3 years agoCycles: add folding for redundant A to B to A conversions.
Alexander Gavrilov [Tue, 2 Aug 2016 09:22:43 +0000 (12:22 +0300)]
Cycles: add folding for redundant A to B to A conversions.

As a result of other folding simplifications it may happen that
two type conversion nodes end up directly connected. In some
cases it may be possible to then remove both. A realistic case
might be an optimized out Mix RGB node used to blend vectors.

It seems it's safe to optimize when B is a float3 type
(color, vector), and A is float3 or float.

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: sergey

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

3 years agoFix T48986: Incorrect normals or tangents when using custom split normals.
Bastien Montagne [Tue, 2 Aug 2016 14:05:20 +0000 (16:05 +0200)]
Fix T48986: Incorrect normals or tangents when using custom split normals.

(Re)-setting custom normals could cause some unwanted splitting of some of them, leading
to slightly different tangent space. Simply enlarged slightly the threshold detecting
similar normals as identical ones for now, afarid this is the kind of issue that cannot
get a full complete solution for until we drop floats...

3 years agoBuildbot: Use annoying hybrid setup of two CUDA toolkits
Sergey Sharybin [Tue, 2 Aug 2016 13:32:03 +0000 (15:32 +0200)]
Buildbot: Use annoying hybrid setup of two CUDA toolkits

This is for until we'll solve issues with toolkit 8.0.

3 years agoCycles: Some more inline policy tweaks for CUDA 8
Sergey Sharybin [Tue, 2 Aug 2016 13:04:34 +0000 (15:04 +0200)]
Cycles: Some more inline policy tweaks for CUDA 8

Makes it so toolkit does exactly the same decision about what to inline,
but unfortunately it has really barely visible difference on GTX-980.

3 years agoCycles: Cleanup, trailing whitespace
Sergey Sharybin [Tue, 2 Aug 2016 09:28:20 +0000 (11:28 +0200)]
Cycles: Cleanup, trailing whitespace

3 years agoCycles: Some cleanup in CUDA device file
Sergey Sharybin [Tue, 2 Aug 2016 09:27:59 +0000 (11:27 +0200)]
Cycles: Some cleanup in CUDA device file

3 years agoCycles: Include NVCC compiler flags into md5 hash
Sergey Sharybin [Tue, 2 Aug 2016 09:24:42 +0000 (11:24 +0200)]
Cycles: Include NVCC compiler flags into md5 hash

This way we can easily switch between toolkits without worrying
whether some kernel was compiled with old or new CUDA toolkit.

It's also now possible to switch machine architecture and have
proper cached kernel detected. Not as if it happens every day,
but i did such a bitness switch back in the days :)

3 years agoFix T48998: 'header input' of rotation transform was clamped in [-PI, PI[ range.
Bastien Montagne [Tue, 2 Aug 2016 10:41:43 +0000 (12:41 +0200)]
Fix T48998: 'header input' of rotation transform was clamped in [-PI, PI[ range.

Can't see any reason for this behavior (inherited from 2.4x code), so for now just removing it.

3 years agoFix T47591: Smoke keeps both .bphys and .vdb cache files
Kévin Dietrich [Tue, 2 Aug 2016 10:20:54 +0000 (12:20 +0200)]
Fix T47591: Smoke keeps both .bphys and .vdb cache files

Delete old caches when changing cache type.

3 years agoFix T47520: Compositor Node "Filter" Outputs clear image
Kévin Dietrich [Tue, 2 Aug 2016 09:38:03 +0000 (11:38 +0200)]
Fix T47520: Compositor Node "Filter" Outputs clear image

Make 'Laplace' filter an edge filter operation, since this what it is
typically used for, and such operation does not affect the input's alpha
channel.

Reviewers: sergey, campbellbarton

Reviewed By: sergey

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

3 years agoCycles: tweak some folding tests to avoid unnecessary type conversion.
Alexander Gavrilov [Tue, 2 Aug 2016 09:08:04 +0000 (12:08 +0300)]
Cycles: tweak some folding tests to avoid unnecessary type conversion.

It's easy to connect a simple value to output without forcing
conversion to color by using the Strength socket of Emission.

3 years agoFix tmp screen becoming permanent after going fullscreen
Julian Eisel [Mon, 1 Aug 2016 20:57:12 +0000 (22:57 +0200)]
Fix tmp screen becoming permanent after going fullscreen

Doubt this is intentional.

3 years agoFix T48991: some particles emitted at a distance from object.
Alexander Gavrilov [Mon, 1 Aug 2016 18:45:42 +0000 (21:45 +0300)]
Fix T48991: some particles emitted at a distance from object.

The cause seems to be that despite dt_frac being computed as
1/(subframes+1) with integer subframes value, it doesn't always
add up to exactly 1.0 due to precision limitations. If the sum
is similar to 1.00000???, the last subframe is skipped, and all
particles that were supposed to be emitted in that interval are
emitted next frame, with the code working incorrectly due to
skewed time range.

To fix, separate the code from the dynamic timestep feature that
adjusts the last subframe length into a separate function, and
use it even when dynamic timestep is disabled.

3 years agoAudapsace: Make it work with Jack and no libjack-dev package installed
Sergey Sharybin [Mon, 1 Aug 2016 18:39:54 +0000 (20:39 +0200)]
Audapsace: Make it work with Jack and no libjack-dev package installed

@neXyon, mind backporting it to your upstream? :)

3 years agoBuildbot: Enable proper Pascal architecture
Sergey Sharybin [Mon, 1 Aug 2016 16:26:53 +0000 (18:26 +0200)]
Buildbot: Enable proper Pascal architecture

3 years agoFix strict compiler flags with older GCC
Sergey Sharybin [Mon, 1 Aug 2016 15:58:45 +0000 (17:58 +0200)]
Fix strict compiler flags with older GCC

3 years agoCycles: add unit tests for supported constant folding rules.
Alexander Gavrilov [Mon, 1 Aug 2016 15:53:20 +0000 (18:53 +0300)]
Cycles: add unit tests for supported constant folding rules.

Code coverage of different combinations of secondary conditions
is obviously not complete because there are so many of them, but
all main rules should be there.

The reason for CORRECT vs INVALID is that both words have the same
number of characters so calls line up, but look quite different.

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: dingto, sergey, brecht

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

3 years agoBuildbot: Seems quotes are not really needed when passing list
Sergey Sharybin [Mon, 1 Aug 2016 14:25:03 +0000 (16:25 +0200)]
Buildbot: Seems quotes are not really needed when passing list

3 years agoBuildbot: Attempt to enable sm_60 CUDA architecture for build slaves
Sergey Sharybin [Mon, 1 Aug 2016 14:05:33 +0000 (16:05 +0200)]
Buildbot: Attempt to enable sm_60 CUDA architecture for build slaves

3 years agoCycles: Tweaks to support CUDA 8 toolkit
Sergey Sharybin [Mon, 1 Aug 2016 13:40:46 +0000 (15:40 +0200)]
Cycles: Tweaks to support CUDA 8 toolkit

All the changes are mainly giving explicit tips on inlining functions,
so they match how inlining worked with previous toolkit.

This make kernel compiled by CUDA 8 render in average with same speed
as previous kernels. Some scenes are somewhat faster, some of them are
somewhat slower. But slowdown is within 1% so far.

On a positive side it allows us to enable newer generation cards on
buildbots (so GTX 10x0 will be officially supported soon).

3 years agoFix T48901: Blender ignores xinput cursor matrix
Campbell Barton [Mon, 1 Aug 2016 03:40:59 +0000 (13:40 +1000)]
Fix T48901: Blender ignores xinput cursor matrix

3 years agoCleanup: unused vars, imports, pep8
Campbell Barton [Mon, 1 Aug 2016 01:54:02 +0000 (11:54 +1000)]
Cleanup: unused vars, imports, pep8

3 years agoReplace pep8 with flake8 checker
Campbell Barton [Mon, 1 Aug 2016 01:02:01 +0000 (11:02 +1000)]
Replace pep8 with flake8 checker

3 years agoSupport Auto-Clamped Handle for Curve-Mapping
Campbell Barton [Sun, 31 Jul 2016 23:01:43 +0000 (09:01 +1000)]
Support Auto-Clamped Handle for Curve-Mapping

This patch supports auto-clamped handles for curves,
useful since without this it can be difficult to have 'flat' sections of a curve.

3 years agoFix T48980: crash when loading a file that contains a custom node tree.
Bastien Montagne [Sun, 31 Jul 2016 18:07:33 +0000 (20:07 +0200)]
Fix T48980: crash when loading a file that contains a custom node tree.

Syupid logical mistake in own recent rB018d336cbd51...

3 years agoCorrection to 0f2ff52c0866
Julian Eisel [Sun, 31 Jul 2016 16:35:38 +0000 (18:35 +0200)]
Correction to 0f2ff52c0866

This info is shown while dragging, so should stay where it was.

3 years agoEnable Undo for "Add background Image"
Julian Eisel [Sun, 31 Jul 2016 15:33:57 +0000 (17:33 +0200)]
Enable Undo for "Add background Image"

Enabled the Undo option for the operation "Add background Image". This is to treat adding a background image like opening an image. This behavior is useful when a background image is add using 'drag and drop'.

Reviewers: Severin

Reviewed By: Severin

Subscribers: brecht

Tags: #bf_blender

Maniphest Tasks: T47050

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

3 years agoFix mistake in Cycles mix node multiply constant folding.
Brecht Van Lommel [Sun, 31 Jul 2016 12:56:49 +0000 (14:56 +0200)]
Fix mistake in Cycles mix node multiply constant folding.

3 years agoCleanup: reduce Vector_getseters size using macros
Campbell Barton [Sun, 31 Jul 2016 10:41:24 +0000 (20:41 +1000)]
Cleanup: reduce Vector_getseters size using macros

3 years agoCorrect own error in last commit
Campbell Barton [Sun, 31 Jul 2016 09:12:40 +0000 (19:12 +1000)]
Correct own error in last commit

3 years agoSupport limiting collisions by group for softbody and particles
Alexander Gavrilov [Sun, 31 Jul 2016 08:56:44 +0000 (18:56 +1000)]
Support limiting collisions by group for softbody and particles

This feature is extremely useful for layering multiple cloth objects,
and there is no reason there shouldn't be the same kind of feature for softbody.

3 years agoCleanup: spelling, style
Campbell Barton [Sun, 31 Jul 2016 07:41:05 +0000 (17:41 +1000)]
Cleanup: spelling, style

3 years agoPyAPI: minor optimization for dictionary creation
Campbell Barton [Sun, 31 Jul 2016 07:22:04 +0000 (17:22 +1000)]
PyAPI: minor optimization for dictionary creation

Pass size when its known.

3 years agoPyAPI: fix leak in unlikely case converting idprops fail
Campbell Barton [Sun, 31 Jul 2016 06:59:08 +0000 (16:59 +1000)]
PyAPI: fix leak in unlikely case converting idprops fail

3 years agoPyAPI: Add PyC_UnicodeAsByteAndSize
Campbell Barton [Sun, 31 Jul 2016 06:52:44 +0000 (16:52 +1000)]
PyAPI: Add PyC_UnicodeAsByteAndSize

Read the string length from Python directly when assigning id-properties

3 years agoDocs: add initial idprop.types API docs
Campbell Barton [Sun, 31 Jul 2016 05:39:30 +0000 (15:39 +1000)]
Docs: add initial idprop.types API docs

3 years agoDocs: simplify EXCLUDE_MODULES handling
Campbell Barton [Sun, 31 Jul 2016 04:37:25 +0000 (14:37 +1000)]
Docs: simplify EXCLUDE_MODULES handling

3 years agoCleanup: capitalize Blender & Python
Campbell Barton [Sun, 31 Jul 2016 04:31:39 +0000 (14:31 +1000)]
Cleanup: capitalize Blender & Python

3 years agosimplify redundant conditionals
Mike Erwin [Sun, 31 Jul 2016 05:22:36 +0000 (01:22 -0400)]
simplify redundant conditionals

The redundant terms were harmless but check an expression we already
know to be true (from earlier in the same conditional).

Found by PVS-Studio T48917

3 years agoImprove description for use_self py-driver option
Campbell Barton [Sun, 31 Jul 2016 04:21:16 +0000 (14:21 +1000)]
Improve description for use_self py-driver option

3 years agoCurve Fitting: circular fit could give NAN handles
Campbell Barton [Sun, 31 Jul 2016 03:55:50 +0000 (13:55 +1000)]
Curve Fitting: circular fit could give NAN handles

Fitting lines that exactly double back on themselves could give NAN length handles.

3 years agoCleanup: rename btree (incorrect & confusing)
Campbell Barton [Sun, 31 Jul 2016 02:02:33 +0000 (12:02 +1000)]
Cleanup: rename btree (incorrect & confusing)

3 years agoFix Cycles OpenCL compile error on Windows.
Brecht Van Lommel [Sat, 30 Jul 2016 23:54:05 +0000 (01:54 +0200)]
Fix Cycles OpenCL compile error on Windows.

3 years agoPy-Driver: re-use self PyObject when its unchanged.
Campbell Barton [Sun, 31 Jul 2016 01:43:24 +0000 (11:43 +1000)]
Py-Driver: re-use self PyObject when its unchanged.

3 years agoPy-Driver: use intern strings
Campbell Barton [Sun, 31 Jul 2016 01:22:02 +0000 (11:22 +1000)]
Py-Driver: use intern strings

Avoids managing strings inline

3 years agoFix for previous commit changing the addons submodule.
Brecht Van Lommel [Sun, 31 Jul 2016 01:23:51 +0000 (03:23 +0200)]
Fix for previous commit changing the addons submodule.

3 years agoCycles: refactor kernel closure storage to use structs per closure type.
Brecht Van Lommel [Mon, 25 Jul 2016 01:03:23 +0000 (03:03 +0200)]
Cycles: refactor kernel closure storage to use structs per closure type.

Reviewed By: dingto, sergey

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

3 years agoCycles: constant fold add/mul type nodes with known 0 and 1 arguments.
Alexander Gavrilov [Sat, 30 Jul 2016 18:03:49 +0000 (20:03 +0200)]
Cycles: constant fold add/mul type nodes with known 0 and 1 arguments.

These values often either turn the node into a no-op, or even make it
evaluate to 0 no matter what the other input value is, thus allowing
deletion of a branch of the node graph that otherwise is not constant.

Reviewed By: brecht

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

3 years agoCycles: constant folding for RGB/Vector Curves and Color Ramp.
Alexander Gavrilov [Sat, 30 Jul 2016 21:30:36 +0000 (23:30 +0200)]
Cycles: constant folding for RGB/Vector Curves and Color Ramp.

These are complex nodes, and it's conceivable they may end up constant
in some circumstances within node groups, so folding support is useful.

Reviewed By: brecht

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

3 years agoFix Cycles OpenCL not always allocating enough space for closures.
Brecht Van Lommel [Sat, 30 Jul 2016 17:16:29 +0000 (19:16 +0200)]
Fix Cycles OpenCL not always allocating enough space for closures.

3 years agoFix CUDA warning, due to extra ; at the line ending.
Thomas Dinges [Sat, 30 Jul 2016 19:37:20 +0000 (21:37 +0200)]
Fix CUDA warning, due to extra ; at the line ending.

3 years agoCycles OpenCL: use #line directives for better error messages.
Brecht Van Lommel [Sat, 30 Jul 2016 14:54:48 +0000 (16:54 +0200)]
Cycles OpenCL: use #line directives for better error messages.

3 years agoCycles OpenCL: detect incorrect usage of SOA members in the split kernel.
Brecht Van Lommel [Sat, 30 Jul 2016 13:18:21 +0000 (15:18 +0200)]
Cycles OpenCL: detect incorrect usage of SOA members in the split kernel.

3 years agoFix Cycles OpenCL address space compile error with amdgpu-pro drivers on Linux.
Brecht Van Lommel [Sat, 30 Jul 2016 13:17:30 +0000 (15:17 +0200)]
Fix Cycles OpenCL address space compile error with amdgpu-pro drivers on Linux.

3 years agoCleanup: pep8
Campbell Barton [Sat, 30 Jul 2016 08:39:22 +0000 (18:39 +1000)]
Cleanup: pep8

3 years agoFix bplayer (c)
Thomas Beck [Sat, 30 Jul 2016 08:35:30 +0000 (10:35 +0200)]
Fix bplayer (c)

3 years agoCleanup: pep8
Campbell Barton [Sat, 30 Jul 2016 08:15:16 +0000 (18:15 +1000)]
Cleanup: pep8

3 years agoCleanup: minor changes from last commit
Campbell Barton [Sat, 30 Jul 2016 06:47:18 +0000 (16:47 +1000)]
Cleanup: minor changes from last commit

Un-indent blocks, rename vars.

3 years agoPy-Driver: add 'self' option
Campbell Barton [Sat, 30 Jul 2016 06:34:01 +0000 (16:34 +1000)]
Py-Driver: add 'self' option

Drivers can use this to refer to the data which the driver is applied to,
useful for objects, bones, to avoid having to create a variable pointing to its self.

3 years agoCloth Simulation: add time scale property
Campbell Barton [Sat, 30 Jul 2016 04:46:19 +0000 (14:46 +1000)]
Cloth Simulation: add time scale property

This setting can also be animated, to create a "time warp" effect.

D2122 by @LucaRood

3 years agoCloth: option to use dynamic base mesh
Campbell Barton [Sat, 30 Jul 2016 04:47:31 +0000 (14:47 +1000)]
Cloth: option to use dynamic base mesh

This adds the ability for cloth simulations to respect changes in the underlying mesh.
So you can for instance, animate shape keys, armatures, or add any deformation modifiers (above the cloth modifier).

This is mainly useful for (but not limited to) cartoon animations,
where your character might stretch or change shape, and you want the clothes to follow accordingly.

D1903 by @LucaRood

3 years agoCloth: UI cleanup & quality hard limit removal
Campbell Barton [Sat, 30 Jul 2016 04:44:28 +0000 (14:44 +1000)]
Cloth: UI cleanup & quality hard limit removal

D2121 by @LucaRood

3 years agoCleanup: pep8
Campbell Barton [Fri, 29 Jul 2016 11:22:27 +0000 (21:22 +1000)]
Cleanup: pep8

3 years agoAdd copy/make_local to movieclip datablock.
Bastien Montagne [Fri, 29 Jul 2016 21:13:31 +0000 (23:13 +0200)]
Add copy/make_local to movieclip datablock.

As title says... Copying tracking data from movieclip was not the simplest thing...

Reviewers: sergey

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

3 years agoGtests: Re-apply strict compiler fixes
Sergey Sharybin [Fri, 29 Jul 2016 16:59:54 +0000 (18:59 +0200)]
Gtests: Re-apply strict compiler fixes

3 years agoCycles: Add fundamentals to test constant folding
Sergey Sharybin [Fri, 29 Jul 2016 16:44:29 +0000 (18:44 +0200)]
Cycles: Add fundamentals to test constant folding

This commit adds some easy to use way to check whether the graph
was properly optimized. The idea is based on using mock glog sync
which keeps track on all messages and expects specific log message
to appear in the logging.

This means each optimization step should report that it optimized
something (specifying what exactly was optimized) and what was used
for optimization.

There's also some ease-ish way to define shader networks which we
might want to make a bit more global and available for all tests
in the future.

For now only RGBToBW node is covered as an example, really hope
to get help from active guys in the community to finish covering
all existing optimization cases. Ready to fix any possible issues
with builder when needed tho :)

3 years agoAdd GMock library which is responsive for dealing with mock objects
Sergey Sharybin [Fri, 29 Jul 2016 16:34:33 +0000 (18:34 +0200)]
Add GMock library which is responsive for dealing with mock objects

3 years agoGTests: Update to a newer Git version
Sergey Sharybin [Fri, 29 Jul 2016 16:33:27 +0000 (18:33 +0200)]
GTests: Update to a newer Git version

Required to get GMock working with GTest.

3 years agoFix missing redraw of timeline when changing GPencil layer settings
Julian Eisel [Fri, 29 Jul 2016 18:42:57 +0000 (20:42 +0200)]
Fix missing redraw of timeline when changing GPencil layer settings

3 years agoCleanup space/tabs, Grrr.
Bastien Montagne [Fri, 29 Jul 2016 16:49:50 +0000 (18:49 +0200)]
Cleanup space/tabs, Grrr.

3 years agoFix a bunch of missing expand calls in object/particle physics area, was breaking...
Bastien Montagne [Fri, 29 Jul 2016 15:35:31 +0000 (17:35 +0200)]
Fix a bunch of missing expand calls in object/particle physics area, was breaking linking of those.

Initial report/patch by Alexander Gavrilov (@angavrilov), found more on the road.

Nice demo of why we should use libquery ID looper in read code too - but that's for another day
(also because read code needs to take care of some deprecated pointers sometimes)...

3 years agoCycles: Fix wrong projection coordinates for points behind the camera
Sergey Sharybin [Fri, 29 Jul 2016 15:28:36 +0000 (17:28 +0200)]
Cycles: Fix wrong projection coordinates for points behind the camera

Points behind camera will be flipped on projection, but that did not
happen.

This solves second issue reported at T48848.

3 years agoCycles: Fix wrong check for object is behind camera after recent fixes
Sergey Sharybin [Fri, 29 Jul 2016 14:37:02 +0000 (16:37 +0200)]
Cycles: Fix wrong check for object is behind camera after recent fixes

3 years agoFix T48971: Append creates linked image textures if object has shape keys.
Bastien Montagne [Fri, 29 Jul 2016 15:00:29 +0000 (17:00 +0200)]
Fix T48971: Append creates linked image textures if object has shape keys.

Hating all those not-so-real ID types... Here there were two causes for the issue:
1) Linked shapekey ID was made local twice (once from mesh's make local, once by itself).
   Solved by not explicitely making shapekeys (nor any other non-linkable datatype) local.
2) Key->from 'back pointer' to its owner was messing 'still in used' detection of linked data
   after localization. Fixed with a hack for now, thinking correct solution might actually
   be to not consider this pointer at all in libquery ID looper, since it's nothing like
   and actual usage of mesh/lattice/curve.

Again, shapekeys as ID is a joke, those should be mere struct, they have absolutely nothing to do in Main, period. :(

Point 2) still demonstrates the need for better handling of IDs dependencies though,
so far we only hit corner cases, but think there could also be valid cases generating those
'dependency cycles' between IDs (ID a using ID b which uses ID a), this will have to be addressed some day...

3 years agoRemove "debug build only" event printing.
Bastien Montagne [Fri, 29 Jul 2016 12:45:15 +0000 (14:45 +0200)]
Remove "debug build only" event printing.

This makes no sense since user usually only has release build... And those noisy printings are
behind debug flag anyway, so really no reason to only print them out in debug build.

3 years agoCycles: Fix strict compilation warning
Sergey Sharybin [Fri, 29 Jul 2016 13:06:13 +0000 (15:06 +0200)]
Cycles: Fix strict compilation warning

3 years agoFix T48679: Bone transform only alters between translation and rotation
Sergey Sharybin [Fri, 29 Jul 2016 12:45:27 +0000 (14:45 +0200)]
Fix T48679: Bone transform only alters between translation and rotation

There was some smart code in the transform which would alter between translation
and rotation based on whether bone is connected or not and whether translation is
locked or not.

It could be handy to also fallback to scale if both rotation and translation are
locked.

3 years agoCycles: remove narrowing conversion from recent commit
Mai Lavelle [Fri, 29 Jul 2016 08:00:37 +0000 (04:00 -0400)]
Cycles: remove narrowing conversion from recent commit

3 years agoCycles microdisplacement: move subdivision options to subsurf modifier
Mai Lavelle [Sat, 16 Jul 2016 23:56:45 +0000 (19:56 -0400)]
Cycles microdisplacement: move subdivision options to subsurf modifier

Subdivision options can now be found in the subsurf modifier. The modifier must
be the last in the stack or the options will be unavailable. Catmull-Clark
subdivision is still unavailable and will fallback to linear subdivision instead

Reviewed By: brecht

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