blender-staging.git
15 months agoCleanup: rename BLI_array_count -> len
Campbell Barton [Wed, 14 Mar 2018 14:42:44 +0000 (01:42 +1100)]
Cleanup: rename BLI_array_count -> len

Match naming convention used everywhere else.
Count should only be used when this isn't directly accessible.

15 months agoUpdated bpy.props getter/setter example
Sybren A. Stüvel [Wed, 14 Mar 2018 10:42:36 +0000 (11:42 +0100)]
Updated bpy.props getter/setter example

- The common name in computer science are 'getters' and 'setters', so by
  adding these names to the documentation (while 'get' and 'set are still
  also mentioned) we improve findability. Having 'Getters/Setters' as a
  title also makes it clearer that this example is not just about
  getting or setting the property value.
- Added a little prefix to each printed value, so that print statement,
  expected output, and real output can be matched easier.

15 months agoFix T54286: bpy.props operator example misses property access
Sybren A. Stüvel [Wed, 14 Mar 2018 10:31:14 +0000 (11:31 +0100)]
Fix T54286: bpy.props operator example misses property access

The old example had two downsides:

- It promoted a blocking UI design, where the user is shown a popup
  before actually executing the operator.
- It didn't show how to actually use the property values.

The new code avoids these mistakes. The properties are also shown in the
redo panel in the 3D view.

Note that I also changed the bl_idname, as this is an example about
properties, not about dialogue boxes, and changed the class name to use
the standard operator naming convention.

I also extended the example to include a panel that sets multiple
properties of the operator, since I see questions about this relatively
frequently.

15 months agoCleanup: use sections for editmesh tools/select
Campbell Barton [Wed, 14 Mar 2018 06:25:23 +0000 (17:25 +1100)]
Cleanup: use sections for editmesh tools/select

15 months agoAPI generating script: give better version for releases builds.
Bastien Montagne [Tue, 13 Mar 2018 18:49:39 +0000 (19:49 +0100)]
API generating script: give better version for releases builds.

Was giving '2.62.1 <sha1>' even for releases, now rather giving nicer
'2.62a <sha1>' in that case.

15 months agoCleanup: pass selectmode directly
Campbell Barton [Tue, 13 Mar 2018 15:02:05 +0000 (02:02 +1100)]
Cleanup: pass selectmode directly

Pass instead of editmesh or toolsettings.
Needed for multi edit-mode

15 months agoCleanup: doxygen comments
Campbell Barton [Tue, 13 Mar 2018 14:58:46 +0000 (01:58 +1100)]
Cleanup: doxygen comments

15 months agoFix T54302 - Wrong added scene when adding a scene strip to the Sequencer
Joshua Leung [Tue, 13 Mar 2018 10:04:58 +0000 (23:04 +1300)]
Fix T54302 - Wrong added scene when adding a scene strip to the Sequencer

When adding scene strips to the sequencer, the wrong scenes were
getting getting added if some were skipped. For example:
Given 4 scenes (A, B, C, D) if you're trying to add the last 3 scenes
(B, C, D) as strips to the first scene (A), it would ended up adding
"A, B, C" instead of "B, C, D" as expected.

Fix provided by Andrew (signal9).

15 months agoUse Action datablock's own icon (instead of Animation Data's one) for File Browser...
Joshua Leung [Mon, 12 Mar 2018 12:44:03 +0000 (01:44 +1300)]
Use Action datablock's own icon (instead of Animation Data's one) for File Browser's lib icons

15 months agoCleanup: long lines, use doxy sections
Campbell Barton [Tue, 13 Mar 2018 07:06:05 +0000 (18:06 +1100)]
Cleanup: long lines, use doxy sections

15 months agoFix T54299: crash rendering objects with motion blur disabled, after recent changes.
Brecht Van Lommel [Mon, 12 Mar 2018 16:33:46 +0000 (17:33 +0100)]
Fix T54299: crash rendering objects with motion blur disabled, after recent changes.

15 months agoCycles: reorganize tests in more evenly distributed groups.
Brecht Van Lommel [Sun, 11 Mar 2018 21:43:15 +0000 (22:43 +0100)]
Cycles: reorganize tests in more evenly distributed groups.

15 months agoCycles: add constant folding to displacement nodes.
Brecht Van Lommel [Sun, 11 Mar 2018 21:42:38 +0000 (22:42 +0100)]
Cycles: add constant folding to displacement nodes.

15 months agoFix type in comment
Sergey Sharybin [Mon, 12 Mar 2018 16:03:54 +0000 (17:03 +0100)]
Fix type in comment

15 months agoDepsgraph: Make timing profile a command line option
Sergey Sharybin [Mon, 12 Mar 2018 16:01:02 +0000 (17:01 +0100)]
Depsgraph: Make timing profile a command line option

This way we can add even more statistics, even one which will be print
to the console.

Would be nice if we also have verbosity level control.

15 months agoFix T54296: Cycles viewport render stuck on constant re-render
Sergey Sharybin [Mon, 12 Mar 2018 09:49:07 +0000 (10:49 +0100)]
Fix T54296: Cycles viewport render stuck on constant re-render

Need Clear ID recalc flag on load. Otherwise it's possible to have
some IDs considered always updated by Cycles, when they were saved
in a tagged-for-update state.

Thanks Bastien for feedback and review!

15 months agoCleanup: remove misleading array size
Campbell Barton [Mon, 12 Mar 2018 05:37:26 +0000 (16:37 +1100)]
Cleanup: remove misleading array size

15 months agoCleanup: typo
Campbell Barton [Mon, 12 Mar 2018 05:35:31 +0000 (16:35 +1100)]
Cleanup: typo

15 months agoCleanup: sync EDBM_uv_* functions w/ 2.8
Campbell Barton [Mon, 12 Mar 2018 03:51:45 +0000 (14:51 +1100)]
Cleanup: sync EDBM_uv_* functions w/ 2.8

They're nearly the same, so keep names matching to avoid conflicts.

15 months agoUV: internal changes to picking
Campbell Barton [Mon, 12 Mar 2018 02:46:25 +0000 (13:46 +1100)]
UV: internal changes to picking

Nothing user visible, only things needed for multi-object support,
making picking functions more flexible too.

- Support passing in an initialized hit-struct,
  so it's possible to do multiple nearest calls on the same hit data.
- Replace manhattan distance w/ squared distance
  so they can be compared.
- Return success to detect changes to a hit-data
  which might already be initialized (also more readable).

15 months agofix Collada: wrong usage of pointer and hidden redeclaration
Gaia Clary [Sun, 11 Mar 2018 19:32:47 +0000 (20:32 +0100)]
fix Collada: wrong usage of pointer and hidden redeclaration

* Suspicious usage of pointer:

  short *type = 0; // this creates a null pointer

When this is later used for anything then blender would crash.
After following the code and check what happens i strongly believe
the author wanted to use a short and not a pointer to a short here.

* local variable where reused later in same function
While this did no harm, i still felt it was better to use a different
name here to make things more separated:

- moved variable declaraiotns into loop (for int a=0; ...)
- renamed uv_images to uv_image_set
- renamed index variable from i to j in inner loop that
  reused same index name from outer loop

15 months agoCleanup Collada: Removed duplicate variable setting
Gaia Clary [Sun, 11 Mar 2018 19:15:44 +0000 (20:15 +0100)]
Cleanup Collada: Removed duplicate variable setting

15 months agoCleanup: avoid redeclaration of iterator in same function
Gaia Clary [Sun, 11 Mar 2018 19:12:55 +0000 (20:12 +0100)]
Cleanup: avoid redeclaration of iterator in same function

The iterator was redeclared 3 times. I fixed this to avoid future issues.
I commit separately because so the changes are less cluttered all over
the place.

15 months agoCleanup Collada: Avoid unintentional reuse of previous defined variable
Gaia Clary [Sun, 11 Mar 2018 19:09:26 +0000 (20:09 +0100)]
Cleanup Collada: Avoid unintentional reuse of previous defined variable

The variable child was redeclared multiple times in the same function.
While this has not created any issues i still changed this to avoid
confusion and keep the usage of the variables more local.

15 months agoFix Collada: Avoid unnecessary and even wrong check on unavailable data
Gaia Clary [Sun, 11 Mar 2018 19:00:46 +0000 (20:00 +0100)]
Fix Collada: Avoid unnecessary and even wrong check on unavailable data

The function validateConstraints() potentially causes a null pointer
exception. I changed this so that the function returns a failure as soon
as the validation fails. This avoids falling into the null pointer trap.

15 months agoCleanup Collada: Make sure index variables are not reused
Gaia Clary [Sun, 11 Mar 2018 18:57:40 +0000 (19:57 +0100)]
Cleanup Collada: Make sure index variables are not reused

The variables i and j have been declared before in the same function.
I changed the names to mi and mj to keep things clear.

15 months agoCleanup Collada: make sure float array is initialised
Gaia Clary [Sun, 11 Mar 2018 18:51:16 +0000 (19:51 +0100)]
Cleanup Collada: make sure float array is initialised

This is just to silence a compiler warning and keeping
the code clean. The actual code never uses uninitialised
array elements.

15 months agoRefactor Collada: combined 2 almost identical functions into one
Gaia Clary [Sun, 11 Mar 2018 11:44:02 +0000 (12:44 +0100)]
Refactor Collada: combined 2 almost identical functions into one

The 2 methods add_bezt() and create_bezt() do almost the same.
I combined them both into add_bezt() and added the optional parameter
eBezTriple_Interpolation ipo

15 months agoFix T54274, and rename option --window-borderless to --window-fullscreen
Arto Kitula [Sun, 11 Mar 2018 10:26:43 +0000 (12:26 +0200)]
Fix T54274, and rename option --window-borderless to --window-fullscreen

15 months agoCleanup: long lines
Campbell Barton [Sun, 11 Mar 2018 04:50:07 +0000 (15:50 +1100)]
Cleanup: long lines

15 months agoCycles: add roughness baking support, using squared roughness convention.
Brecht Van Lommel [Sat, 10 Mar 2018 17:18:05 +0000 (18:18 +0100)]
Cycles: add roughness baking support, using squared roughness convention.

15 months agoCycles: switch to squared roughness convention for all nodes.
Brecht Van Lommel [Sat, 10 Mar 2018 15:09:22 +0000 (16:09 +0100)]
Cycles: switch to squared roughness convention for all nodes.

This was already done for the Principled BSDF to be compatible with typical
baked roughness maps in PBR workflows.

15 months agoCode cleanup: fix compiler warning.
Brecht Van Lommel [Sat, 10 Mar 2018 05:51:52 +0000 (06:51 +0100)]
Code cleanup: fix compiler warning.

15 months agoFix T54279: viewport update bug with volume meshes.
Brecht Van Lommel [Sat, 10 Mar 2018 05:10:14 +0000 (06:10 +0100)]
Fix T54279: viewport update bug with volume meshes.

Meshes without vertex normals were not handled correctly.

15 months agoCode refactor: reduce number of loops over meshes.
Brecht Van Lommel [Sat, 10 Mar 2018 04:45:49 +0000 (05:45 +0100)]
Code refactor: reduce number of loops over meshes.

15 months agoFix T54278: volume artifacts with small density and color after recent changes.
Brecht Van Lommel [Sat, 10 Mar 2018 04:03:03 +0000 (05:03 +0100)]
Fix T54278: volume artifacts with small density and color after recent changes.

15 months agoFix T54269: saved EXR file files unreadable some editors in Blender.
Brecht Van Lommel [Sat, 10 Mar 2018 03:33:14 +0000 (04:33 +0100)]
Fix T54269: saved EXR file files unreadable some editors in Blender.

Don't write the multichannel metadata when there is only a single layer,
and don't unnecessarily consider single layer images with Blender metadata
as multi layer.

15 months agoCode cleanup: use spaces for aligned indentation.
Brecht Van Lommel [Sat, 10 Mar 2018 02:57:18 +0000 (03:57 +0100)]
Code cleanup: use spaces for aligned indentation.

15 months agoCycles: support arbitrary number of motion blur steps for objects.
Brecht Van Lommel [Thu, 8 Mar 2018 03:04:52 +0000 (04:04 +0100)]
Cycles: support arbitrary number of motion blur steps for objects.

15 months agoCycles: support arbitrary number of motion blur steps for cameras.
Brecht Van Lommel [Sat, 10 Mar 2018 00:36:09 +0000 (01:36 +0100)]
Cycles: support arbitrary number of motion blur steps for cameras.

15 months agoCode refactor: motion blur cleanups, preparing for next commit.
Brecht Van Lommel [Fri, 9 Mar 2018 23:37:07 +0000 (00:37 +0100)]
Code refactor: motion blur cleanups, preparing for next commit.

15 months agoCode refactor: don't expose UpdateObjectTransformState in header.
Brecht Van Lommel [Sat, 10 Mar 2018 00:15:02 +0000 (01:15 +0100)]
Code refactor: don't expose UpdateObjectTransformState in header.

15 months agoCode refactor: make Transform always affine, dropping last row.
Brecht Van Lommel [Thu, 8 Mar 2018 05:48:14 +0000 (06:48 +0100)]
Code refactor: make Transform always affine, dropping last row.

This save a little memory and copying in the kernel by storing only a 4x3
matrix instead of a 4x4 matrix. We already did this in a few places, and
those don't need to be special exceptions anymore now.

15 months agoCode refactor: add DecomposedTransform.
Brecht Van Lommel [Thu, 8 Mar 2018 05:19:17 +0000 (06:19 +0100)]
Code refactor: add DecomposedTransform.

This is in preparation of making Transform affine only, and also gives us
a little extra type safety so we don't accidentally treat it as a regular
4x4 matrix.

15 months agoCode refactor: add ProjectionTransform separate from regular Transform.
Brecht Van Lommel [Thu, 8 Mar 2018 04:33:55 +0000 (05:33 +0100)]
Code refactor: add ProjectionTransform separate from regular Transform.

This is in preparation of making Transform affine only.

15 months agoCode refactor: avoid motion transform copy, remove unused curved code.
Brecht Van Lommel [Wed, 7 Mar 2018 22:52:26 +0000 (23:52 +0100)]
Code refactor: avoid motion transform copy, remove unused curved code.

The purpose of the previous code refactoring is to make the code more readable,
but combined with this change benchmarks also render about 2-3% faster with an
NVIDIA Titan Xp.

15 months agoCode refactor: use KernelShader and KernelParticle instead of float arrays.
Stefan Werner [Wed, 7 Mar 2018 23:35:24 +0000 (00:35 +0100)]
Code refactor: use KernelShader and KernelParticle instead of float arrays.

Original patch by Stefan with modifications by Brecht.

15 months agoCode refactor: use KernelLight instead of float4 arrays.
Stefan Werner [Wed, 7 Mar 2018 23:15:41 +0000 (00:15 +0100)]
Code refactor: use KernelLight instead of float4 arrays.

Original patch by Stefan with modifications by Brecht.

15 months agoCode refactor: use KernelOject struct instead of float4 array.
Stefan Werner [Wed, 7 Mar 2018 21:19:56 +0000 (22:19 +0100)]
Code refactor: use KernelOject struct instead of float4 array.

Original patch by Stefan with modifications by Brecht.

15 months agoDon't add "Report a Bug" button for official tracker to non-official add-ons
Julian Eisel [Fri, 9 Mar 2018 20:17:43 +0000 (21:17 +0100)]
Don't add "Report a Bug" button for official tracker to non-official add-ons

If no custom URL was set, add-ons would get a "Report a Bug" button opening
the default developer.blender.org bug tracker. Now we only add this default
button if the add-on is bundled and not installed by the user.

15 months agoFix Pose Lib: pose is applied when selected bones don't overlap with pose
Sybren A. Stüvel [Fri, 9 Mar 2018 18:03:29 +0000 (19:03 +0100)]
Fix Pose Lib: pose is applied when selected bones don't overlap with pose

Premise: When pose bones are selected, applying a pose library should
only affect the selected bones.

This commit fixes a bug where the pose was also applied when there was
no overlap between the selected bones and the bones in the pose. For
example, applying a pose which contains only keyframes for the left
hand, while only right-hand bones are selected, would apply the pose
to the left hand anyway.

The code is now also slightly more efficient; the removed 'selcount'
counter was only used as a binary (i.e. zero or non-zero). It's now
stored as a bitflag instead.

15 months agoFFmpeg: Add regression tests
Sergey Sharybin [Mon, 5 Mar 2018 14:32:49 +0000 (15:32 +0100)]
FFmpeg: Add regression tests

Currently only covering handful of files from reports about wrong fps detected.

It will need D3083 applied first to get tests passed, also tests themselves
are to be committed to svn.

But there are some python code which needs to be reviewed, like blendfile
passed to run_blender().

Reviewers: sybren, mont29

Reviewed By: sybren, mont29

Subscribers: mont29

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

15 months agoFix T53857: Incorrect framerate for videos imported from OBS
Sergey Sharybin [Mon, 26 Feb 2018 15:39:18 +0000 (16:39 +0100)]
Fix T53857: Incorrect framerate for videos imported from OBS

This is an issue with which value to trust: fps vs. tbr. They both cam be
somewhat broken. Currently the idea is:

- If file was saved with FFmpeg AND we are decoding with FFmpeg we trust tbr.
- If we are decoding with Libav we use fps (there does not seem to be tbr in
  Libav, unless i'm missing something).
- All other cases we use fps.

Seems to work all good for files from T53857, T54148 and T51153. Ideally we
would need to collect some amount of regression files to make further tweaks
more scientific.

Reviewers: mont29

Reviewed By: mont29

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

15 months agoCleanup: Rename view3d context set function
Campbell Barton [Thu, 8 Mar 2018 06:30:24 +0000 (17:30 +1100)]
Cleanup: Rename view3d context set function

Use common prefix so adding related functions share the prefix.

15 months agoCleanup: use edit/active objects from view context
Campbell Barton [Thu, 8 Mar 2018 06:26:02 +0000 (17:26 +1100)]
Cleanup: use edit/active objects from view context

Needed to implement multiple edit-objects.

15 months agoCleanup: set the view-context once
Campbell Barton [Thu, 8 Mar 2018 06:21:39 +0000 (17:21 +1100)]
Cleanup: set the view-context once

15 months agoCleanup: Use BKE_ prefix for all public functions exposed by the NLA module
Joshua Leung [Thu, 8 Mar 2018 04:14:46 +0000 (17:14 +1300)]
Cleanup: Use BKE_ prefix for all public functions exposed by the NLA module

15 months agoT54233: NLA "Push Down" discards Blend Mode, Extrapolation, and Influence
Joshua Leung [Thu, 8 Mar 2018 03:49:33 +0000 (16:49 +1300)]
T54233: NLA "Push Down" discards Blend Mode, Extrapolation, and Influence

Each AnimData block has a set of Blend/Extrapolation/Influence settings
that can be used to control how the active action is blended with the
NLA stack. However, these settings were not getting copied over to the
newly created strips (as the push-down code existed long before these
settings were added).

This commit solves this in several ways:
* Active Action Blend/Extrapolation/Influence settings now get copied
  to the new strips when adding them to the NLA stack via Push Down.

  Note: This doesn't happen when there are no existing NLA tracks,
        as these settings don't get used in that case.

* Strip Influence will be copied across when inf < 1.0 (i.e. when a
  non-default value is used), to maintain the effect. To make this work,
  the influence value will get added as a keyframe to the strip's
  "Influence" Control FCurve.

  - See code comments for an alternative approach and why that was not chosen
  - Strip Time still doesn't get keyframes added automatically yet.

* To ensure the "extrapolation mode" settings don't get always overwritten,
  I've put in place a compromise: the extrapolation will only get changed
  if the chosen setting will cause problmes (i.e. hold forward & back -> hold forward
  if there are other tracks before it already).

Not safe for backporting to 2.79[x] stable releases.

15 months agoFix crash if NLA strip with "Use Animated Influence" setting is enabled without the...
Joshua Leung [Thu, 8 Mar 2018 02:17:53 +0000 (15:17 +1300)]
Fix crash if NLA strip with "Use Animated Influence" setting is enabled without the Influence Strip F-Curve existing

15 months agoCleanup: Fix invalid name prefix
Joshua Leung [Mon, 5 Mar 2018 02:58:07 +0000 (15:58 +1300)]
Cleanup: Fix invalid name prefix

15 months agoFix T54206: bevel and inset operations repeat did not remember offset.
Brecht Van Lommel [Wed, 7 Mar 2018 21:19:56 +0000 (22:19 +0100)]
Fix T54206: bevel and inset operations repeat did not remember offset.

Now repeating the operator will use the previously chosen offset, either with
the modal operator or typed in. The modal operator will still start at zero.

15 months agoEditMesh: pass object data to notifiers
Campbell Barton [Wed, 7 Mar 2018 14:47:35 +0000 (01:47 +1100)]
EditMesh: pass object data to notifiers

Both were being passed in different parts of the code,
use object data for consistency.

15 months agoCleanup: edit-mode undo API
Campbell Barton [Wed, 7 Mar 2018 02:55:36 +0000 (13:55 +1100)]
Cleanup: edit-mode undo API

Move function descriptions into the struct,
minor improvements to variable naming,
use convention of 'g_' prefix for static vars.

15 months agoCycles: Fix crash when building with no shading systems
Sergey Sharybin [Tue, 6 Mar 2018 11:00:51 +0000 (12:00 +0100)]
Cycles: Fix crash when building with no shading systems

15 months agoCycles: Cleanup, indentation
Sergey Sharybin [Tue, 6 Mar 2018 10:42:30 +0000 (11:42 +0100)]
Cycles: Cleanup, indentation

15 months agoCleanup: unused var
Campbell Barton [Tue, 6 Mar 2018 11:42:32 +0000 (22:42 +1100)]
Cleanup: unused var

15 months agoUtility to enter sculpt mode
Campbell Barton [Tue, 6 Mar 2018 08:04:43 +0000 (19:04 +1100)]
Utility to enter sculpt mode

15 months agoFix T54234, add BLENDER_VERSION_CHAR to .plist
Arto Kitula [Tue, 6 Mar 2018 00:36:29 +0000 (02:36 +0200)]
Fix T54234, add BLENDER_VERSION_CHAR to .plist

15 months agoFix T53206: Array modifier doesn't merge vgroups
Campbell Barton [Mon, 5 Mar 2018 22:57:41 +0000 (09:57 +1100)]
Fix T53206: Array modifier doesn't merge vgroups

Vertex group remapping utility function,
now shared between object join and array modifier cap-ends.

Weights which don't exist are removed.

D3092 by @Foaly

15 months agoSequencer: Expose read-only FPS property for movie-type strips
Sergey Sharybin [Mon, 5 Mar 2018 14:00:04 +0000 (15:00 +0100)]
Sequencer: Expose read-only FPS property for movie-type strips

Main purpose is to make it possible to cover FPS detection with regression test.
But it might also be handy for some other scripters.

Thanks Campbell for review!

15 months agoFix T54204: Wrong selection on Clean Tracks (Motion Tracking)
Sergey Sharybin [Mon, 5 Mar 2018 11:00:25 +0000 (12:00 +0100)]
Fix T54204: Wrong selection on Clean Tracks (Motion Tracking)

A mistake in a fix for T53612.

Regression in 2.79a, candidate for 2.79b :S

15 months agoFix T54225: Blur node stopped working when Map Range was fed with image
Sergey Sharybin [Mon, 5 Mar 2018 10:44:42 +0000 (11:44 +0100)]
Fix T54225: Blur node stopped working when Map Range was fed with image

The issue was happening with fast Gaussian blur, and caused by NaN value pixels
in the input buffer.

Now made it so Map Range output does not produce NaN, by returning arbitrary
value of 0. Still better than NaN!

15 months agoCleanup: left wrong comment in
Campbell Barton [Mon, 5 Mar 2018 06:01:57 +0000 (17:01 +1100)]
Cleanup: left wrong comment in

15 months agoFix T53478, T53430: Sequencer cut edge case fails
Campbell Barton [Mon, 5 Mar 2018 05:00:27 +0000 (16:00 +1100)]
Fix T53478, T53430: Sequencer cut edge case fails

Previous fix for T53430 caused T54200.

The edge case for soft & hard cuts weren't working,
where the strip used start/end-still & the frame was placed exactly on
the start/end of of the sequence content.

T54200 fixed the end-still case but broke hard-cuts for all other cases.

This fixes the case for soft/hard cuts with/without start/end-still.

15 months agoRevert "Fix T53430: Cut at the strip end fails w/ endstill"
Campbell Barton [Mon, 5 Mar 2018 04:11:33 +0000 (15:11 +1100)]
Revert "Fix T53430: Cut at the strip end fails w/ endstill"

This reverts commit 855799ecc1c5e53d9fbfe520fd5402bc0138f674.

Caused T54200

15 months agoError passing context arg to marker menu
Campbell Barton [Mon, 5 Mar 2018 03:10:43 +0000 (14:10 +1100)]
Error passing context arg to marker menu

own mistake in 6981861fcfd

15 months agoFix LLVM/OSL library detection on macOS to prefer own OSL libraries.
Brecht Van Lommel [Sun, 4 Mar 2018 06:30:04 +0000 (07:30 +0100)]
Fix LLVM/OSL library detection on macOS to prefer own OSL libraries.

15 months agoFix Clang compiler detection on macOS.
Brecht Van Lommel [Sun, 4 Mar 2018 06:22:05 +0000 (07:22 +0100)]
Fix Clang compiler detection on macOS.

"AppleClang" was not properly detected here. Now make the compiler ID
test a bit less compact but consistent with other code.

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

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

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

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

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

15 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

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

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

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

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

15 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

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

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

15 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

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

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

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

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

15 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

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

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

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