3 years agobuild_environment: remove msvc compiler warning from boost.
Ray Molenkamp [Sat, 17 Mar 2018 18:47:17 +0000 (12:47 -0600)]
build_environment: remove msvc compiler warning from boost.

Even the boost people have given up trying to keep up with the rapid release
of new msvc versions, and have removed the warn for now see:

3 years agoMSVC: ignore warning c4828 The file contains a character that is illegal.
Ray Molenkamp [Sat, 17 Mar 2018 18:45:27 +0000 (12:45 -0600)]
MSVC: ignore warning c4828 The file contains a character that is illegal.

The only place this warning is coming from is from comments in headers of 3rd party libs. we can safely repress this warning for now.

3 years agoRefactor: Collada: remove param, changed order of params in Function call
Gaia Clary [Sat, 17 Mar 2018 13:16:19 +0000 (14:16 +0100)]
Refactor: Collada: remove param, changed order of params in Function call

* In the Collada Module parameters are typically ordered
  in a similar way. I changed this to:

    extern std::string get_joint_id(Object *ob, Bone *bone);

* The Object parameter was not used in get_joint_sid().
  I changed this to:

extern std::string get_joint_sid(Bone *bone);

3 years agoAdd an assert to BKE_icon_changed() that we are actually dealing with ID icon.
Bastien Montagne [Fri, 16 Mar 2018 16:17:19 +0000 (17:17 +0100)]
Add an assert to BKE_icon_changed() that we are actually dealing with ID icon.

Otherwise, ID->obj is an opaque pointer, wrong usage here could lead to
a vast amount of bad things.

3 years agoFix T54310: Assert when enable Brush custom icon.
Bastien Montagne [Fri, 16 Mar 2018 16:06:43 +0000 (17:06 +0100)]
Fix T54310: Assert when enable Brush custom icon.

We had a mix of two issues here actually:
* First, Brush are currently using their own sauce for custom previews,
this is not great, but moving them to use common ImagePreview system of
IDs is a low-priority TODO. For now, they should totally ignore their
own ImagePreview.
* Second, BKE_icon_changed() would systematically create a PreviewImage
for ID types supporting it, which does not really makes sense, this
function is merely here to 'tag' previews as outdated. Actual creation
of previews is deferred to later, when we actually need them.

3 years agoCleanup: naming and const parameter.
Bastien Montagne [Fri, 16 Mar 2018 15:44:23 +0000 (16:44 +0100)]
Cleanup: naming and const parameter.

3 years agoDepsgraph: Support colored addresses in debug prints
Sergey Sharybin [Fri, 16 Mar 2018 11:24:08 +0000 (12:24 +0100)]
Depsgraph: Support colored addresses in debug prints

Enabled with --debug-depsgraph-pretty, only works with ANSI terminals.

Thanks Bastien for review!

3 years agoAdd Truecolor ANSI console constants
Sergey Sharybin [Fri, 16 Mar 2018 11:16:29 +0000 (12:16 +0100)]
Add Truecolor ANSI console constants

They are used to start and end colored output in console.
Use with care, it is up to you to check that console actually
supports Truecolor ANSII.

In thew future we can extend this to other consoles and platforms.

3 years agoHash: Add utility function to convert address to rgb values
Sergey Sharybin [Fri, 16 Mar 2018 11:11:55 +0000 (12:11 +0100)]
Hash: Add utility function to convert address to rgb values

Some magic hashing, will become handy to make debug messages
easier to follow.

3 years agoDepsgraph: Move evaluation debug prints to depsgraph
Sergey Sharybin [Fri, 16 Mar 2018 10:14:38 +0000 (11:14 +0100)]
Depsgraph: Move evaluation debug prints to depsgraph

This way we can easily control format and keep it consistent.

And also possibly do other trickery, like coloring addresses!

3 years agoCleanup: move mesh mirror functions to own file
Campbell Barton [Fri, 16 Mar 2018 12:14:07 +0000 (23:14 +1100)]
Cleanup: move mesh mirror functions to own file

3 years agoCleanup: doxy sections for editmesh files.
Campbell Barton [Fri, 16 Mar 2018 09:46:14 +0000 (20:46 +1100)]
Cleanup: doxy sections for editmesh files.

3 years agoFix T54326: Import Alembic stuck in edit mode
Kévin Dietrich [Fri, 16 Mar 2018 03:06:18 +0000 (04:06 +0100)]
Fix T54326: Import Alembic stuck in edit mode

Switch to object mode before doing the import.

3 years agoFix T53971: single layer render showing the wrong render layer in image editor.
Cheryl Chen [Thu, 15 Mar 2018 22:36:15 +0000 (23:36 +0100)]
Fix T53971: single layer render showing the wrong render layer in image editor.

Original patch Cheryl Chen, extra fixes by Brecht.

Differential Revision:

3 years agoCode refactor: move OIIO image buffer writing outside session, into callback.
Guillaume Chereau [Thu, 15 Mar 2018 21:07:37 +0000 (22:07 +0100)]
Code refactor: move OIIO image buffer writing outside session, into callback.

Original patch by Guillaume, modifications by Brecht.

Differential Revision:

3 years agoGHOST: Support Unity taskbar progress API
Lukas Stockner [Thu, 15 Mar 2018 19:43:08 +0000 (20:43 +0100)]
GHOST: Support Unity taskbar progress API

Unity itself is deprecated, but the API is also supported by KDE and the GNOME Dock extension,
which means that it will be useful for a wide variety of distributions.

To get a progress bar, the system must have a blender.desktop file and libunity installed.

The need for libunity is annoying, but the only alternative would be to integrate a DBus library...

Reviewers: campbellbarton, brecht

Differential Revision:

3 years agoBLI_assert: extract from BLI_utildefines
Campbell Barton [Thu, 15 Mar 2018 19:03:29 +0000 (06:03 +1100)]
BLI_assert: extract from BLI_utildefines

BLI_utildefines is quite large, defining many unrelated things.
Add BLI_assert to include in inline headers, so math defines don't
pull in too much.

3 years agoMissed last commit
Campbell Barton [Thu, 15 Mar 2018 00:16:32 +0000 (11:16 +1100)]
Missed last commit

3 years agoBLI_math: don't use asserts in inline API
Campbell Barton [Thu, 15 Mar 2018 00:10:11 +0000 (11:10 +1100)]
BLI_math: don't use asserts in inline API

Requires BLI_utildefines.h to be included first,
(already noted in other inline code).

Possible alternative could be to move BLI_assert into own header.

3 years agoStyle cleanup.
Bastien Montagne [Wed, 14 Mar 2018 17:05:09 +0000 (18:05 +0100)]
Style cleanup.

3 years agoFix (unreported) broken IDarray case in IDP_EqualsProperties_ex.
Bastien Montagne [Wed, 14 Mar 2018 16:53:29 +0000 (17:53 +0100)]
Fix (unreported) broken IDarray case in IDP_EqualsProperties_ex.

For IDProps IDarray, IDP_EqualsProperties was called for each item,
instead of IDP_EqualsProperties_ex, discarding value of `is_strict`

Probably not an issue with current code, though.

3 years agoFix T54319: Crash after double-clicking baked F-curve
Sergey Sharybin [Wed, 14 Mar 2018 14:57:14 +0000 (15:57 +0100)]
Fix T54319: Crash after double-clicking baked F-curve

3 years 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.

3 years 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.

3 years 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

3 years 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

3 years 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.

3 years 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

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

3 years 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).

3 years 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

3 years 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

3 years 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.

3 years 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.

3 years 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.

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

3 years 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.

3 years 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!

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

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

3 years 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.

3 years 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).

3 years 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

3 years 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

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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

3 years 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

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

3 years 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.

3 years 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.

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

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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.

3 years 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 bug tracker. Now we only add this default
button if the add-on is bundled and not installed by the user.

3 years 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.

3 years 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:

3 years 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:

3 years 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.

3 years 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.

3 years 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

3 years 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

3 years 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.

3 years 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

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

3 years 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.

3 years 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.

3 years 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.

3 years 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

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

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

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

3 years 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

3 years 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

3 years 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!

3 years 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

3 years 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!

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

3 years 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.

3 years 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

3 years 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

3 years 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.

3 years 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.