blender.git
59 min agoCleanup: remove use of persistent data handles in geometry nodes master
Jacques Lucke [Sat, 8 May 2021 12:54:48 +0000 (14:54 +0200)]
Cleanup: remove use of persistent data handles in geometry nodes

Those were mostly just left over from previous work on particle nodes.
They solved the problem of keeping a reference to an object over
multiple frames and in a cache. Currently, we do not have this problem
in geometry nodes, so we can also remove this layer of complexity
for now.

7 hours agoCleanup: correct PlayState.stopped state which was inverted
Campbell Barton [Sat, 8 May 2021 05:57:57 +0000 (15:57 +1000)]
Cleanup: correct PlayState.stopped state which was inverted

7 hours agoCleanup: remove unused turbo struct member from PlayAnim
Campbell Barton [Sat, 8 May 2021 05:53:56 +0000 (15:53 +1000)]
Cleanup: remove unused turbo struct member from PlayAnim

This was never used (since 2.25 at least).

7 hours agoCleanup: comment PlayAnim struct members
Campbell Barton [Sat, 8 May 2021 05:50:34 +0000 (15:50 +1000)]
Cleanup: comment PlayAnim struct members

7 hours agoMerge branch 'blender-v2.93-release'
Campbell Barton [Sat, 8 May 2021 06:12:48 +0000 (16:12 +1000)]
Merge branch 'blender-v2.93-release'

7 hours agoFix PlayAnim cache size increasing when playing multiple animations blender-v2.93-release
Campbell Barton [Sat, 8 May 2021 06:10:07 +0000 (16:10 +1000)]
Fix PlayAnim cache size increasing when playing multiple animations

Error in 0499dbc5c16fe6b276da81d65cade4f5da92a308

8 hours agoMerge branch 'blender-v2.93-release'
Campbell Barton [Sat, 8 May 2021 04:59:30 +0000 (14:59 +1000)]
Merge branch 'blender-v2.93-release'

9 hours agoFix PlayAnim X/Y flipping
Campbell Barton [Sat, 8 May 2021 04:27:28 +0000 (14:27 +1000)]
Fix PlayAnim X/Y flipping

This functionality was missed in recent GLSL drawing update
fd3e44492e7606a741a6d2c42b31687598c7d09a.

14 hours agoFix: Curve to mesh node assert when last profile segment is vector
Hans Goudey [Fri, 7 May 2021 23:16:15 +0000 (18:16 -0500)]
Fix: Curve to mesh node assert when last profile segment is vector

We need to always add a single point to the last cyclic segment that
completes the loop, because that includes the starting point of the
evaluated edge. The existing code forgot about that point.

17 hours agoGeometry Noes: Curve Resample Node
Hans Goudey [Fri, 7 May 2021 20:37:06 +0000 (15:37 -0500)]
Geometry Noes: Curve Resample Node

This node generates a naturally parametarized (even length edge) poly
spline version of every spline in the input. There are two modes,
"Count", and "Length". These are similar to the same options for the
line primitive node in end points mode.

I implemented this instead of a "Sample Points" node, because for this
operation it's trivial to keep the result as a curve, which is nice
since it increases flexibility, and because it can make instancing
simpler, i.e. using the transforms of each evaluated point rather than
requiring the construction of a "rotation" attribute.

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

21 hours agoGPencil: New Append operators
Antonio Vazquez [Fri, 7 May 2021 16:27:47 +0000 (18:27 +0200)]
GPencil: New Append operators

Now it's possible to append materials of one grease pencil object into another one. The operator allows active material or all materials.

Also, the Layer Copy To Object has been renamed to Layer Append to Object to keep consistency and now allows to append all layers at once.

22 hours agoCleanup: Fix deinterlace code block style
Sebastian Parborg [Fri, 7 May 2021 15:21:19 +0000 (17:21 +0200)]
Cleanup: Fix deinterlace code block style

22 hours agoUI: Display indicator in the 3D Viewport when Clipping Region is on
Pablo Vazquez [Fri, 7 May 2021 14:12:23 +0000 (16:12 +0200)]
UI: Display indicator in the 3D Viewport when Clipping Region is on

Small addition inspired by [this tweet](https://twitter.com/Vorundor/status/1390645286624763909) of a user in a situation I also saw myself in the past.

Showing "(Clipped)" next to the view name in the `Text Info` overlay fits well since it's a per-viewport setting.

{F10059921, size=full}

While on Local view:
{F10059925, size=full}

Multiple viewports:
{F10059946, size=full}

Reviewed By: Severin

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

22 hours agoNode Editor: Show frame label only when a label is set
Pablo Vazquez [Fri, 7 May 2021 15:12:30 +0000 (17:12 +0200)]
Node Editor: Show frame label only when a label is set

Avoids having frames with the word "Frame" on top, resulting in less visual noise.
(users were working this around by adding a space as label name).

Differential Revision: D11193

22 hours agoCleanup: Remove deprecated variables and functions calls from our ffmpeg code
Sebastian Parborg [Fri, 7 May 2021 15:10:03 +0000 (17:10 +0200)]
Cleanup: Remove deprecated variables and functions calls from our ffmpeg code

There need to be more cleanup for ffmpeg 4.5 (ffmpeg master branch).

However this now compiles on ffmpeg 4.4 without and deprication
warnings.

Reviewed By: Sergey, Richard Antalik

Differential Revision: http://developer.blender.org/D10338

22 hours agoFix: Curve to mesh node fails with one point and no profile
Hans Goudey [Fri, 7 May 2021 14:55:32 +0000 (09:55 -0500)]
Fix: Curve to mesh node fails with one point and no profile

Just because the spline is cyclic does not necessarily mean that it has
an edge.

23 hours agoMerge branch 'blender-v2.93-release'
Sebastian Parborg [Fri, 7 May 2021 14:53:24 +0000 (16:53 +0200)]
Merge branch 'blender-v2.93-release'

23 hours agoFix: No sound is exported with ffmpeg 4.4
Sebastian Parborg [Fri, 7 May 2021 14:51:28 +0000 (16:51 +0200)]
Fix: No sound is exported with ffmpeg 4.4

We were not assigning the amount of sound channels to the output frames.
Newer ffmpeg releases has sanity checks in place and doesn't fall back
to two channels anymore.

23 hours agoGeometry Nodes: Parallelize Attribute Curve Map node
Charlie Jolly [Fri, 7 May 2021 14:25:32 +0000 (15:25 +0100)]
Geometry Nodes: Parallelize Attribute Curve Map node

This adds `parallel_for` to the Attribute Curve Map node to improve performance.
Grain size set to 512.

Reviewed By: HooglyBoogly

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

23 hours agoMerge branch 'blender-v2.93-release'
Bastien Montagne [Fri, 7 May 2021 14:14:39 +0000 (16:14 +0200)]
Merge branch 'blender-v2.93-release'

23 hours agoLibOverride: more tweaking to handling of obsolete overrides during resync.
Bastien Montagne [Fri, 7 May 2021 14:07:37 +0000 (16:07 +0200)]
LibOverride: more tweaking to handling of obsolete overrides during resync.

this is a followup to rB2bd85d9cc623, we cannot forcefully delete
obsolete overrides of object data (meshes etc.), as this implies also
deleting their user object, which might still be a perfectly valid
override, albeit in conflict regarding its obdata ID pointer...

23 hours agoCleanup: clang tidy
Jacques Lucke [Fri, 7 May 2021 13:57:35 +0000 (15:57 +0200)]
Cleanup: clang tidy

readability-inconsistent-declaration-parameter-name

24 hours agoSilence warnings
Dalai Felinto [Fri, 7 May 2021 13:37:07 +0000 (15:37 +0200)]
Silence warnings

24 hours agoCleanup: make format (clang-format)
Dalai Felinto [Fri, 7 May 2021 13:43:01 +0000 (15:43 +0200)]
Cleanup: make format (clang-format)

24 hours agoMerge remote-tracking branch 'origin/blender-v2.93-release'
Dalai Felinto [Fri, 7 May 2021 13:45:25 +0000 (15:45 +0200)]
Merge remote-tracking branch 'origin/blender-v2.93-release'

24 hours agoCleanup: make format (clang-format)
Dalai Felinto [Fri, 7 May 2021 13:41:42 +0000 (15:41 +0200)]
Cleanup: make format (clang-format)

24 hours agoGPencil: Add Bracket keymaps to increase/decrease brush size
Antonio Vazquez [Thu, 6 May 2021 14:46:36 +0000 (16:46 +0200)]
GPencil: Add Bracket keymaps to increase/decrease brush size

This add the missing keymaps.

Requested by Jukien Kaspar.

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

27 hours agoMerge branch 'blender-v2.93-release'
Bastien Montagne [Fri, 7 May 2021 10:54:30 +0000 (12:54 +0200)]
Merge branch 'blender-v2.93-release'

27 hours agoLibOverride: Add proper reports when deleting user-edited overrides as part of resync.
Bastien Montagne [Thu, 6 May 2021 17:04:47 +0000 (19:04 +0200)]
LibOverride: Add proper reports when deleting user-edited overrides as part of resync.

Logs are not enough here, we need proper warning visible for the user.

27 hours agoLibOverride: Do not preserve local overrides when their linked data disappear.
Bastien Montagne [Thu, 6 May 2021 16:33:42 +0000 (18:33 +0200)]
LibOverride: Do not preserve local overrides when their linked data disappear.

This is the opposite of previous code, which would keep those
'deprecated' overrides arround (often in a dedicated collection), when
they were detected as user-edited.

While this is a safe-ish way to (try to) preserve user-edited data, this
tends to add too much 'trash' data to production scenes, which cleaning
becomes a burden.

Note that user will get warnings in thos cases, and can always choose
not to save the current blend file and go fix the library issue instead.

27 hours agoLibOverride: Fix many 'obsolete' overrides not being properly deleted.
Bastien Montagne [Fri, 7 May 2021 10:52:34 +0000 (12:52 +0200)]
LibOverride: Fix many 'obsolete' overrides not being properly deleted.

Code detecting overrides which reference linked data is missing was
actually missing many cases, leading to too much garbage data being kept
around after resync process.

27 hours agoFix T88100: Crash going to shading tab
Sergey Sharybin [Fri, 7 May 2021 10:43:43 +0000 (12:43 +0200)]
Fix T88100: Crash going to shading tab

27 hours agoFix strict compiler warning in sequencer code
Sergey Sharybin [Fri, 7 May 2021 10:39:11 +0000 (12:39 +0200)]
Fix strict compiler warning in sequencer code

29 hours agoVSE: New iterator design
Richard Antalik [Fri, 7 May 2021 08:25:13 +0000 (10:25 +0200)]
VSE: New iterator design

This iterator design provides means to create simple and flexible API
to query and work with collection of strips. It should be used in cases
when conditions require multiple stages of recursive iteration of all
strips or similar complex scenarios.

Quick API overview:
Basic queries are standalone functions that return SeqCollection
Use SEQ_collection_create() and SEQ_collection_free() to construct
such query functions.
Use these functions to get strips of known conditions, like selected
strips, movie strips, muted strips and so on.

Use SEQ_reference_query() when querying strips with relation to
some reference strip. For example to get its effects, strips that have
same type or use same input file and so on.
These aren't standalone functions because often you need to query strips
relative to each strip in collection.

Use SEQ_collection_expand() to query strips relative to each strip
in collection. These will be merged to original collection.

Use SEQ_collection_merge() to merge 2 collections

To iterate collection elements use macro SEQ_ITERATOR_FOREACH()

This API is quite specific, but I think it is best suited for tasks
that are usualy solved in sequencer codebase.

Old sequencer iterator has been completely removed.
SEQ_ALL_BEGIN and SEQ_ALL_END macros re-use new iterator design.

As initial use for this iterator select_grouped_effect_link()
function has been rewritten. It was not only broken, but also it used
DNA fields to aid iterating strips.

Reviewed By: sergey

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

29 hours agoMerge branch 'blender-v2.93-release'
Campbell Barton [Fri, 7 May 2021 08:18:21 +0000 (18:18 +1000)]
Merge branch 'blender-v2.93-release'

29 hours agoMerge branch 'blender-v2.93-release'
Campbell Barton [Fri, 7 May 2021 08:18:18 +0000 (18:18 +1000)]
Merge branch 'blender-v2.93-release'

29 hours agoMerge branch 'blender-v2.93-release'
Campbell Barton [Fri, 7 May 2021 08:18:15 +0000 (18:18 +1000)]
Merge branch 'blender-v2.93-release'

29 hours agoMerge branch 'blender-v2.93-release'
Campbell Barton [Fri, 7 May 2021 08:18:11 +0000 (18:18 +1000)]
Merge branch 'blender-v2.93-release'

29 hours agoMerge branch 'blender-v2.93-release'
Campbell Barton [Fri, 7 May 2021 08:18:08 +0000 (18:18 +1000)]
Merge branch 'blender-v2.93-release'

29 hours agoFix PlayAnim issue with images gradually loading into cache
Campbell Barton [Fri, 7 May 2021 07:54:52 +0000 (17:54 +1000)]
Fix PlayAnim issue with images gradually loading into cache

Instead of only drawing images on first start, load them into cache.

This resolves a logical problem when images don't load fast enough,
where the animation would load some frames each time until all images
loaded into cache.

In practice this could play back with severe frame skipping many times
times before all images were loaded making playback smooth.

Part of a fix for T81751.

29 hours agoCleanup: move frame caching into functions
Campbell Barton [Fri, 7 May 2021 07:53:27 +0000 (17:53 +1000)]
Cleanup: move frame caching into functions

29 hours agoCleanup: extract image loading into it's own function
Campbell Barton [Fri, 7 May 2021 07:49:14 +0000 (17:49 +1000)]
Cleanup: extract image loading into it's own function

29 hours agoFix use of imbuf that was never valid in animation player
Campbell Barton [Fri, 7 May 2021 07:25:06 +0000 (17:25 +1000)]
Fix use of imbuf that was never valid in animation player

Resizing the window would always draw the image with an empty imbuf.

29 hours agoCleanup: minor changes from master to avoid merge conflicts
Campbell Barton [Fri, 7 May 2021 07:12:41 +0000 (17:12 +1000)]
Cleanup: minor changes from master to avoid merge conflicts

29 hours agoMerge branch 'blender-v2.93-release'
Richard Antalik [Fri, 7 May 2021 08:05:19 +0000 (10:05 +0200)]
Merge branch 'blender-v2.93-release'

29 hours agoVSE: Fix freeing display buffer cache before use
Richard Antalik [Fri, 7 May 2021 07:57:09 +0000 (09:57 +0200)]
VSE: Fix freeing display buffer cache before use

`IMB_display_buffer_release()` was called before `display_buffer` was
used by drawing code. This should not be done as it may cause problems.

30 hours agoFix T81751: Use GLSL for better anim player performance
Richard Antalik [Fri, 7 May 2021 07:43:26 +0000 (09:43 +0200)]
Fix T81751: Use GLSL for better anim player performance

Originally colorspace of float images was converted using CPU.
GLSL will render images much faster.

Originally image was converted to `global_role_default_byte` space,
disregarding view transform and also display device, which now is
possible to specify. These parameters could be set via commandline to
settings used in Blender, however if they are to be set by users, these
needs to be sanitized.
Right now defaults are assumed for device given for
`COLOR_ROLE_DEFAULT_BYTE`. This should produce same behavior as
implemented before.

Together with D11167 animation player performance should be much better.

This code was mostly copy-pasted from sequencer.

Reviewed By: sergey

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

33 hours agoGeometry Nodes: Add Attribute Curve Map Node
Charlie Jolly [Fri, 7 May 2021 04:47:51 +0000 (23:47 -0500)]
Geometry Nodes: Add Attribute Curve Map Node

This node has the same functionality as the color and vector curve
mapping nodes in the shader editor. Here is works on every value for
the selected attribute, and it can also output a float value. Other
than that, the implementation is quite straightforward-- almost
completely boilerplate code.

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

34 hours agoCleanup: move UV element keymap items into a loop
Campbell Barton [Fri, 7 May 2021 03:34:55 +0000 (13:34 +1000)]
Cleanup: move UV element keymap items into a loop

Also add explanation for non-obvious dummy key-map item.

36 hours agoCleanup: de-duplicate checks in object-mode item callback
Campbell Barton [Fri, 7 May 2021 01:16:58 +0000 (11:16 +1000)]
Cleanup: de-duplicate checks in object-mode item callback

36 hours agoCleanup: remove OB_MODE_EDIT from GPencil compatibility check
Campbell Barton [Fri, 7 May 2021 01:13:50 +0000 (11:13 +1000)]
Cleanup: remove OB_MODE_EDIT from GPencil compatibility check

All callers replace this with OB_MODE_EDIT_GPENCIL.

36 hours agoCleanup: remove redundant NULL check in ED_object_mode_compat_test
Campbell Barton [Fri, 7 May 2021 01:10:12 +0000 (11:10 +1000)]
Cleanup: remove redundant NULL check in ED_object_mode_compat_test

36 hours agoObject Mode: avoid error message with particle-edit mode switch
Campbell Barton [Fri, 7 May 2021 01:03:45 +0000 (11:03 +1000)]
Object Mode: avoid error message with particle-edit mode switch

Mode switching passed through when the mode wasn't supported for all
modes except particle edit-mode.

Add a check to ED_object_mode_compat_test to prevent the error message.

36 hours agoMerge branch 'blender-v2.93-release'
Campbell Barton [Fri, 7 May 2021 00:54:52 +0000 (10:54 +1000)]
Merge branch 'blender-v2.93-release'

37 hours agoFix inconsistency setting particle edit-mode
Campbell Barton [Fri, 7 May 2021 00:44:13 +0000 (10:44 +1000)]
Fix inconsistency setting particle edit-mode

The check to include particle edit mode in the object-mode drop-down
didn't match the poll function to edit particle edit mode.

Share the check between both functions.

40 hours agoUpdate RNA to User Manual mapping
Aaron Carlisle [Thu, 6 May 2021 21:23:39 +0000 (17:23 -0400)]
Update RNA to User Manual mapping

44 hours agoMerge branch 'blender-v2.93-release'
Pablo Dobarro [Thu, 6 May 2021 17:23:34 +0000 (19:23 +0200)]
Merge branch 'blender-v2.93-release'

44 hours agoFix T83398: Fade inactive geometry overlay option not visible depending on the mode
Pablo Dobarro [Thu, 6 May 2021 17:16:10 +0000 (19:16 +0200)]
Fix T83398: Fade inactive geometry overlay option not visible depending on the mode

This option should always be available. Even if it does not affect the
current object depending on its mode, it affects the rest of the geometry
of the scene.

The rest of the options also work this way. For example, a grease pencil
object does not have face orientation, but the ovelay option is still
there for the rest of the scene.

Reviewed By: JulienKaspar, HooglyBoogly

Maniphest Tasks: T83398

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

44 hours agoMerge branch 'blender-v2.93-release'
Sebastian Parborg [Thu, 6 May 2021 17:02:38 +0000 (19:02 +0200)]
Merge branch 'blender-v2.93-release'

44 hours agoFix T88065: Spline-IK bone position calculation fails in some cases
Sebastian Parborg [Thu, 6 May 2021 16:55:22 +0000 (18:55 +0200)]
Fix T88065: Spline-IK bone position calculation fails in some cases

Fix trying to use cross product on parallel vectors.

Fix intersection checks failing because we run into floating point
issues with very small numbers.

45 hours agoMerge branch 'blender-v2.93-release'
Bastien Montagne [Thu, 6 May 2021 16:21:43 +0000 (18:21 +0200)]
Merge branch 'blender-v2.93-release'

45 hours agoLibOverride: Better handling of 'orphaned' Objects in override creation.
Bastien Montagne [Thu, 6 May 2021 15:45:40 +0000 (17:45 +0200)]
LibOverride: Better handling of 'orphaned' Objects in override creation.

One of current annoying limitations of Blender re Collections/Objects is
that objects are forbidden to not be instantiated in at least one
collection.

Code ensuring that as a pst-processing step of override creation/resync
operations would be a bit too eager to add those objects to an external
'ad-hoc' collection, which poses several issues (both in term of keeping
the scene well organized, and related to override hierarchy handling).

So now be very conservative and only generate and use  external 'storage'
collection for those objects when it is absolutely mandatory.

In pratice, it means this should never happen anymore on any decently
organized data source.

46 hours agoMerge branch 'blender-v2.93-release'
Philipp Oeser [Thu, 6 May 2021 15:11:58 +0000 (17:11 +0200)]
Merge branch 'blender-v2.93-release'

46 hours agoFix T88030: operator showing options it shouldnt
Philipp Oeser [Wed, 5 May 2021 16:42:41 +0000 (18:42 +0200)]
Fix T88030: operator showing options it shouldnt

Caused by {rB0d9f79b163ee}.

IDP_SyncGroupTypes was now syncing from src to src (leading to
unexpected operator properties).

Assume this is rather critical, dont know the part of the code well, but
above commit clearly shows a change from 'dest->data.group' to 'src-
>data.group' which shouldnt be there.

Maniphest Tasks: T88030

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

2 days agoFix T88058: Hover+return doesn't accept 0 as input
Falk David [Thu, 6 May 2021 10:14:12 +0000 (12:14 +0200)]
Fix T88058: Hover+return doesn't accept 0 as input

When the user hovered over a number input field, pressed Enter and then
typed in '0', confirming the input would always cancel the action. This
is because in this particular case `ui_textedit_begin` is called
instead of `ui_numedit_begin`. This function will not set
`data->startvalue` (leaving it at `0`) which will then trigger the
cancel in `ui_apply_but_NUM` which checks if the input changed (by
comparing the entered value with `data->startvalue`).

The fix makes sure that when `ui_textedit_begin` is called on a number
button, the `data->startvalue` is set correctly like in
`ui_numedit_begin`.

Breaking commit: rBSeb06ccc32462beaacbb114d6d0e450b6fc911047

Note: This also affects pressing tab to move to a new number field and
entering '0'. The fix will also cover this case.

Reviewed By: Severin, #user_interface

Maniphest Tasks: T88058

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

2 days agoAlembic export: export UV maps on every frame
Sybren A. Stüvel [Thu, 6 May 2021 10:19:24 +0000 (12:19 +0200)]
Alembic export: export UV maps on every frame

Export UV maps to Alembic on every frame. This makes the export of UV
maps consistent with mesh normals. In the case of static UV maps it may
cause a slight slowdown (since they're exported on every frame now), but
due to the deduplication performed by the Alembic library, the resulting
files will be the same size anyway.

Thanks to @CodyWinch for providing the solution to the problem, and
writing the original patch D8397.

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

2 days agoMerge branch 'blender-v2.93-release'
Falk David [Thu, 6 May 2021 09:01:21 +0000 (11:01 +0200)]
Merge branch 'blender-v2.93-release'

2 days agoFix T87983: Motion tracker button tooltips identical
Falk David [Thu, 6 May 2021 08:59:41 +0000 (10:59 +0200)]
Fix T87983: Motion tracker button tooltips identical

The tooltips for the tracker buttons were all equal (because they all
use the same operator).

This adds the `get_description` operator callback to the
`CLIP_OT_track_markers` operator and returns a more descriptive
tooltip for the different buttons.

Reviewed By: mont29

Maniphest Tasks: T87983

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

2 days agoMerge branch 'blender-v2.93-release'
Philipp Oeser [Thu, 6 May 2021 06:44:23 +0000 (08:44 +0200)]
Merge branch 'blender-v2.93-release'

2 days agoFix T86314: materials not updated correctly after collada import (again)
Philipp Oeser [Tue, 4 May 2021 13:19:33 +0000 (15:19 +0200)]
Fix T86314: materials not updated correctly after collada import (again)

While rB6b18678e34bf did the correct updates, it did it a bit early (not
covering all possible node tree changes).

Now do the ntreeUpdateTree() at the very end of the material import
instead.

Thx @scurest investigating.

Maniphest Tasks: T86314

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

2 days agoFix radius not taken into account when adding curve guide force field
Philipp Oeser [Wed, 5 May 2021 09:46:24 +0000 (11:46 +0200)]
Fix radius not taken into account when adding curve guide force field

Wrong usage of ED_curve_add_nurbs_primitive from {rBe8f3fa99de81}.

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

2 days agoMerge branch 'blender-v2.93-release'
Campbell Barton [Thu, 6 May 2021 05:34:16 +0000 (15:34 +1000)]
Merge branch 'blender-v2.93-release'

2 days agoFix memory leak in object.mode_set_with_submode
Campbell Barton [Thu, 6 May 2021 05:09:49 +0000 (15:09 +1000)]
Fix memory leak in object.mode_set_with_submode

2 days agoCleanup: VSE: move functions from incorrect file
Richard Antalik [Thu, 6 May 2021 03:53:17 +0000 (05:53 +0200)]
Cleanup: VSE: move functions from incorrect file

`SEQ_recursive_apply` and `SEQ_seqbase_recursive_apply` were incorrectly
refactored into `iterator.c` file, but they aren't part and don't use
sequencer iterator.

Functions are moved to `utils.c` file.

2 days agoCleanup: Move PlayAnim frame-cache variables into a struct
Campbell Barton [Thu, 6 May 2021 01:57:02 +0000 (11:57 +1000)]
Cleanup: Move PlayAnim frame-cache variables into a struct

Naming was inconsistent and hard to follow.

2 days agoMerge branch 'blender-v2.93-release'
Campbell Barton [Thu, 6 May 2021 01:35:10 +0000 (11:35 +1000)]
Merge branch 'blender-v2.93-release'

2 days agoPlayAnim: support limiting the cache by memory instead of frames
Campbell Barton [Thu, 6 May 2021 01:22:54 +0000 (11:22 +1000)]
PlayAnim: support limiting the cache by memory instead of frames

Partial fix for T81751 which exposes multiple playback performance
issues. Previously the cache was limited to 30 frames, without a way to
increase the cache for smooth playback with files that are slow to load.

Now the animation plays back smoothly once loaded into cache.

The cache limit from the system preference is used
when the player is launched from Blender.

A new player argument `-c <cache_limit>` was added to support this.

2 days agoMerge branch 'blender-v2.93-release'
Richard Antalik [Thu, 6 May 2021 01:23:16 +0000 (03:23 +0200)]
Merge branch 'blender-v2.93-release'

2 days agoVSE: Fix wrong flag value
Richard Antalik [Thu, 6 May 2021 01:18:42 +0000 (03:18 +0200)]
VSE: Fix wrong flag value

`SEQPROP_VIEW_TRANSFORM` value was set incorrectly.
Introduced in 9576612d45dc

2 days agoCleanup: spelling
Campbell Barton [Wed, 5 May 2021 22:09:05 +0000 (08:09 +1000)]
Cleanup: spelling

2 days agoCleanup: link directly to stackexchange URL
Campbell Barton [Wed, 5 May 2021 22:08:12 +0000 (08:08 +1000)]
Cleanup: link directly to stackexchange URL

2 days agoFix T82002: ENTER does nothing when mouse cursor is over save dialog text field
Severin [Wed, 5 May 2021 18:36:12 +0000 (20:36 +0200)]
Fix T82002: ENTER does nothing when mouse cursor is over save dialog text field

The `file.execute` operator would early-exit because the mouse wasn't hovering
the file list. Caused by 4ba9d7d71e8f.

Although simpler solutions would have been possible, I decided it's better to
split add a new operator for executing based on the mouse (for double-clicking
files), to separate that from the window level execute operator
(`file.execute`). This allows more control and we can get rid of the implicit
assumption that the keymap would call `file.select` on mouse-press, and
`file.execute` on double-click, for the double-click behavior to work. The cost
is that we execute the file selection & activation logic twice on the
double-click, but that shouldn't be an issue at all.
Also removes the `need_active` property from the `file.execute` operator.
That's ancient and wasn't implemented well anyway.

To be clear, reason this fixes the bug is that `file.execute` works entirely
with the `execute()` callback now and doesn't early-exit based on the mouse
position anymore.

Might trigger warnings about the `need_active` property not being found for
custom keymaps. These can be ignored and the property can safely be removed
from the keymap. I don't expect other keymap breakages.

2 days agoMerge branch 'blender-v2.93-release'
Clément Foucault [Wed, 5 May 2021 16:40:58 +0000 (18:40 +0200)]
Merge branch 'blender-v2.93-release'

2 days agoRemove printfs
Clément Foucault [Tue, 20 Apr 2021 22:49:14 +0000 (00:49 +0200)]
Remove printfs

2 days agoFix T86037 EEVEE: SSR option changes render passes result
Clément Foucault [Tue, 20 Apr 2021 22:43:35 +0000 (00:43 +0200)]
Fix T86037 EEVEE: SSR option changes render passes result

This was caused by the SSR option resetting the accumulation. But the
render passes were only cleared in the init phase. This means that
when SSR was resetting the `taa_render_sample` the actual renderpasses
would still contains 1 sample. This means the renderpasses were always
divided by the wrong number of samples.

The fix is to clear just before accumulation if the sample is 1.

The fact that it works for motion blur is kind of a blessing. This is because
we check `stl->effects->ssr_was_valid_double_buffer` before resetting the
sampling. So this only happens on the first motion step and does not affect
the rest of the rendering.

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

2 days agoFix T87068 EEVEE: Moire effect with particle hair and subsurface
Clément Foucault [Wed, 5 May 2021 16:13:24 +0000 (18:13 +0200)]
Fix T87068 EEVEE: Moire effect with particle hair and subsurface

This artifact was already present in previous version but was hidden
by the faulty SSS scale.

The issue comes from the translucence using the geometric normal
(computed using fragment shader derivative) leading to poor precision at
depth discontinuity.

Replacing using the same geometric normal reconstruction as the ambient
occlusion pass removes most of the issue.

2 days agoFix T86823 Eevee: refraction depth shared between different materials
Clément Foucault [Wed, 5 May 2021 14:30:34 +0000 (16:30 +0200)]
Fix T86823 Eevee: refraction depth shared between different materials

This was caused by the material grouping system which was missing
a per material uniform update in the opaque case.

2 days agoFix T86037 EEVEE: SSR option changes render passes result
Clément Foucault [Wed, 5 May 2021 14:10:43 +0000 (16:10 +0200)]
Fix T86037 EEVEE: SSR option changes render passes result

This was caused by the SSR option resetting the accumulation. But the
render passes were only cleared in the init phase. This means that
when SSR was resetting the taa_render_sample the actual renderpasses
would still contains 1 sample. This means the renderpasses were always
divided by the wrong number of samples.

The fix is to clear just before accumulation if the sample is 1.

The fact that it works for motion blur is kind of a blessing. This is
because we check stl->effects->ssr_was_valid_double_buffer before
resetting the sampling. So this only happens on the first motion step
and does not affect the rest of the rendering.

Reviewed by: jbakker

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

2 days agoMerge branch 'blender-v2.93-release'
Bastien Montagne [Wed, 5 May 2021 14:42:37 +0000 (16:42 +0200)]
Merge branch 'blender-v2.93-release'

2 days agoLibOverride: More fixes to properly ignore non-overridable ID pointers.
Bastien Montagne [Wed, 5 May 2021 14:40:51 +0000 (16:40 +0200)]
LibOverride: More fixes to properly ignore non-overridable ID pointers.

2 days agoLibOverride: Tag base's object pointer as not overridable.
Bastien Montagne [Wed, 5 May 2021 14:39:53 +0000 (16:39 +0200)]
LibOverride: Tag base's object pointer as not overridable.

3 days agoMerge branch 'blender-v2.93-release'
Sergey Sharybin [Wed, 5 May 2021 13:09:41 +0000 (15:09 +0200)]
Merge branch 'blender-v2.93-release'

3 days agoFix kernel loading time accounted twice in render progress
Sergey Sharybin [Wed, 5 May 2021 09:31:04 +0000 (11:31 +0200)]
Fix kernel loading time accounted twice in render progress

The render session is keeping track of the scene update, which includes
kernel loading time.

This fixes negative render times reported when CUDA kernels are compiled
at runtime.

A bit fragile logic, can be re-implemented using some user-counted
scope utility classes, so that only outer-most time skip is applied.

3 days agoMerge branch 'blender-v2.93-release'
Bastien Montagne [Wed, 5 May 2021 12:21:49 +0000 (14:21 +0200)]
Merge branch 'blender-v2.93-release'

3 days agoLibQuery: Cleanup: Document more fields of `LibraryForeachIDData` struct.
Bastien Montagne [Wed, 5 May 2021 10:51:12 +0000 (12:51 +0200)]
LibQuery: Cleanup: Document more fields of `LibraryForeachIDData` struct.

3 days agoLibOverride: Fix usage of IDProps that are not overridable.
Bastien Montagne [Wed, 5 May 2021 10:44:05 +0000 (12:44 +0200)]
LibOverride: Fix usage of IDProps that are not overridable.

Not all python-defined ID properties are overridable (yet), this needs
to be detected by libquery 'foreach id' code, such that those ID
pointers can be ignored by override code when working on override
hierarchies.

Fixes part of the issues found while investigating studio files (namely,
some py-defined ID pointer properties from rigify that are not currently
overridable would cause issues and false detections during resync).

3 days agoLibOverride/LibQuery: Refactor 'non-overridable' status management.
Bastien Montagne [Wed, 5 May 2021 10:31:38 +0000 (12:31 +0200)]
LibOverride/LibQuery: Refactor 'non-overridable' status management.

Move the detection/decision of whether an ID pointer should be taken
into account in library override hierarchy processing to the LibQuery
area of code, by introducing a new callback flag.

This allows to factorize the test logic, be explicit in liboverride code
about ID relationships that can be ignored when exploring the override
hierarchy, and adds the possibility to do more checks about pointers to
be tagged as non-overridable in the future.

Note that all but the 'special' ID pointers (loop-back, embedded, etc.)
should be overridable. If some is not, relevant IDType 'foreach_id'
callback code is reponsible to tag it properly.

Python-defined IDProperties however are not systematicaly overridable
(yet), so this should allow us to detect that case and act accordingly
in an incomming commit.

No behavioral change expected in this commit.

3 days agoMerge branch 'blender-v2.93-release'
Philipp Oeser [Wed, 5 May 2021 10:29:24 +0000 (12:29 +0200)]
Merge branch 'blender-v2.93-release'

3 days agoCleanup: clang format
Philipp Oeser [Wed, 5 May 2021 10:24:29 +0000 (12:24 +0200)]
Cleanup: clang format

Missing from rB04905c56523a, sorry for the noise.

3 days agoMerge branch 'blender-v2.93-release'
Campbell Barton [Wed, 5 May 2021 08:09:37 +0000 (18:09 +1000)]
Merge branch 'blender-v2.93-release'