Commit Graph

105969 Commits

Author SHA1 Message Date
Campbell Barton efc6f4675d Cleanup: spelling 2021-05-06 08:09:05 +10:00
Campbell Barton 832f7170dc Cleanup: link directly to stackexchange URL 2021-05-06 08:08:12 +10:00
Severin 6c8c30d865 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 4ba9d7d71e.

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.
2021-05-05 20:53:06 +02:00
Clément Foucault ebd912ca8f Merge branch 'blender-v2.93-release' 2021-05-05 18:40:58 +02:00
Clément Foucault ccb5caef08 Remove printfs 2021-05-05 18:40:50 +02:00
Clément Foucault c8293d6258 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
2021-05-05 18:40:50 +02:00
Clément Foucault a1a9f8e6c3 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.
2021-05-05 18:40:20 +02:00
Clément Foucault 95889fe071 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.
2021-05-05 18:40:20 +02:00
Clément Foucault a7b7f67fc4 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
2021-05-05 18:40:20 +02:00
Bastien Montagne 5f7f90d5a2 Merge branch 'blender-v2.93-release' 2021-05-05 16:42:37 +02:00
Bastien Montagne 0e5f58b68e LibOverride: More fixes to properly ignore non-overridable ID pointers. 2021-05-05 16:41:41 +02:00
Bastien Montagne cbb057e378 LibOverride: Tag base's object pointer as not overridable. 2021-05-05 16:41:41 +02:00
Sergey Sharybin 632c3304bc Merge branch 'blender-v2.93-release' 2021-05-05 15:09:41 +02:00
Sergey Sharybin d9d7169837 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.
2021-05-05 14:50:03 +02:00
Bastien Montagne 1f184066ba Merge branch 'blender-v2.93-release' 2021-05-05 14:21:49 +02:00
Bastien Montagne fff80afe39 LibQuery: Cleanup: Document more fields of `LibraryForeachIDData` struct. 2021-05-05 12:51:59 +02:00
Bastien Montagne 693a215dc4 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).
2021-05-05 12:51:59 +02:00
Bastien Montagne b616c522d9 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.
2021-05-05 12:51:59 +02:00
Philipp Oeser 8e0995d006 Merge branch 'blender-v2.93-release' 2021-05-05 12:29:24 +02:00
Philipp Oeser f7a14b2ac0 Cleanup: clang format
Missing from rB04905c56523a, sorry for the noise.
2021-05-05 12:24:29 +02:00
Campbell Barton 515afeb11b Merge branch 'blender-v2.93-release' 2021-05-05 18:09:37 +10:00
Campbell Barton 20b6f7abb2 Fix PlayAnim error applying cache limiter
Each frame display would add an item to the cache limiting list
without checking if it was already in the list.

Limiting would then free image buffers when the length of the list
exceeded USE_FRAME_CACHE_LIMIT (currently 30).

In practice this meant short animations would free and reload
frames during playback.
2021-05-05 18:07:49 +10:00
Campbell Barton 736a7dcca9 PlayAnim: add in missing define check 2021-05-05 18:04:32 +10:00
Richard Antalik 89bc6b5508 Merge branch 'blender-v2.93-release' 2021-05-05 07:22:10 +02:00
Richard Antalik 9576612d45 VSE: Set view transform based on strip colorspace
In some cases, users start video editing work from General template,
where Filmic view transform is chosen by default. Currently, this causes
issue when working with sRGB footage, which are not properly decoded
into linear working space and final render looks miscolored.

When adding first strip, check it's colorspace and if it corresponds to
colorspace for byte images, ensure that view transform is set to
default value, which is Standard.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D11151
2021-05-05 07:19:30 +02:00
Ankit Meel 08f4bab658 System info: add OS version to sys_info.py
Match the output to the prefilled bug report script's output.
Make the output file self-contained.

Reviewed By: lichtwerk
Differential Revision: https://developer.blender.org/D11144
2021-05-05 10:08:04 +05:30
Campbell Barton 20aed341ee Cleanup: use doxy sections for info_ops.c 2021-05-05 12:12:20 +10:00
Campbell Barton 909506200a Cleanup: quiet warning about description ending with '.' 2021-05-05 12:11:39 +10:00
Hans Goudey d08cc63e2f Nodes Splines: Apply tilt to normal evaluation
This patch makes the spline tilts (interpolated to the evaluated points)
affect the evaluated normals, allowing manual control of the rotation of
each profile in the curve to mesh node.

The method is based on Animation Nodes code, which keeps the data in
direction vector form, and rotates around the tangent vector.

Differential Revision: https://developer.blender.org/D11152
2021-05-04 17:35:48 -05:00
Hans Goudey 1f5710326f Fix: Splines: Use consistent bezier linear interpolation method
While the method of interpolating based on the curve length at each
evaluated point may be useful in some situations, for now it's best to
be consistent with the existing methods in Blender, so this commit adds
a simple linear-based-on-resolution sampling method to bezier splines.
2021-05-04 17:27:20 -05:00
Campbell Barton d18be66a54 Fix T86871: Mesh.mesh_from_object creates empty mesh from curve
Regression in 2b723abea0
2021-05-05 08:08:33 +10:00
Hans Goudey 7ab7ae80c5 Fix: Incorrect cyclic interpolation for nodes bezier spline
The special case for the interpolation to the last point was being used
for every point in the last segment, because of the rounding. Instead,
make the function slightly more complicated to properly handle the
correct interolation in the cyclic and non-cyclic cases.
2021-05-04 16:28:22 -05:00
Clément Foucault 96abe5ebbc DRW: Fix issue with batch reusing freed VBO indices.
Some discard of vertbuf were not correctly followed by discards of
the GPUBatches that were using them. This lead to a use-after-free
situation where GPUBatches would reuse old VBO information. This did
not crash immediatly because the VBO indices were cached by our VAO
caching system. It kept working on some implementation because VBO
reference in the VAO (probably) preventing the VBO from being freed
by reference counting.

This fixes T85977 NVidia: Random crashes in 'DrvPresentBuffers'
2021-05-04 22:58:43 +02:00
Hans Goudey 441160930b Fix: Incorrect type used for geometry nodes poly splines 2021-05-04 14:34:16 -05:00
Julian Eisel d28c46183d Fix missing header & footer toggle chevrons in Spreadsheet
The little chevron tab to open a hidden region wouldn't show up in the
Spreadsheet editor. Cause was an incorrect GPU-scissor usage:
While drawing regions, the scissors should be kept enabled, just the
scissor rectangle should be updated - and afterwards reset to what it
was before.
2021-05-04 20:31:33 +02:00
Julian Eisel 5ea113a555 Fix missing header & footer toggle chevrons in Spreadsheet
The little chevron tab to open a hidden region wouldn't show up in the
Spreadsheet editor. Cause was an incorrect GPU-scissor usage:
While drawing regions, the scissors should be kept enabled, just the
scissor rectangle should be updated - and afterwards reset to what it
was before.
2021-05-04 20:20:15 +02:00
Julian Eisel b3ba41ecd1 Fix missing background of buttons after reports
Reports would change the active emboss of the Block, to make some of its
buttons appear without background. But it didn't reset it so that
buttons added afterwards wouldn't use the correct embossing.
2021-05-04 18:17:16 +02:00
Kévin Dietrich 87ee8ddfe3 Fix compile error without Alembic
Thanks to @Severin for noticing and providing a little patch.
2021-05-04 17:30:49 +02:00
Antonio Vazquez f8f6e0b256 GPencil: New Dilate parameter for Fill brush
Internally, when using Fill brush a dilate of the filled area was done, but this was hardcoded to 1 pixel.

In some situations, this was not enough, so now the value is accesible in the UI and can be set with different values.

Also, as this value is more used than `Leak Size`, the new Dilate is on Topbar, and Leak Size has been moved to Advanced panel.
2021-05-04 16:46:33 +02:00
Cody Winchester 7904899d02 Gpencil - Fix stroke normal from D10171
In my previous patch https://developer.blender.org/D10171 some code changing the direction the strokes normal was accidentally included. This patch reverts that back to the original normal calculation.

Reviewed By: #grease_pencil, antoniov

Differential Revision: https://developer.blender.org/D11148
2021-05-04 16:31:15 +02:00
Sybren A. Stüvel d2311de218 Fix T87935: allow library overrides on NLA/FCurve modifiers
Mark NLA/FCurve modifier properties as library-overridable.

It was already allowed to add such modifiers to a library-overridden
object, but then the properties of those modifiers were read-only,
limiting their use.
2021-05-04 16:25:50 +02:00
Sybren A. Stüvel 46d56bd956 Animation: correct active track/strip pointers after copying NLA tracks
After copying NLA tracks from one `AnimData` to another, also ensure
that the `AnimData::act_track` and `AnimData::actstrip` pointers are
pointing to the copy rather than the original.

This is a necessary step to allow library overrides on NLA modifiers
without crashing Blender.

The remapping of the pointers is done by looping over the tracks/strips
and comparing pointers. Alternatively, I could update the copy functions
themselves to keep track of those pointers and return them, but IMO that
would produce more spaghetti (they're also used in cases where this
pointer-remapping is not desired).
2021-05-04 16:23:57 +02:00
Dalai Felinto 191664acd2 Docs: "File > External Data pack operator" lookup for the manual 2021-05-04 16:20:56 +02:00
Dalai Felinto ee51e73355 "File > External Data" menu improvements and cleanup
All changes:
* Include `file.pack_libraries` and `file.unpack_libraries` to the menu
[1].
* Rename "Pack Blender Libraries" → "Pack Linked Libraries" [2].
* Rename "Unpack Blender Libraries" → "Unpack Linked Libraries" [2].
* Rename "Pack All Into .blend" → "Pack Resources" [3]
* Rename "Unpack All Into Files" → "Unpack Resources" [3]
* Rename "☑ Automatically Pack Into .blend" → "☑  Automatically Pack
Resources" [3]
* Rename "Make All Paths Relative" → "Make Paths Relative" [4]
* Rename "Make All Paths Absolute" → "Make Paths Absolute" [4]
* Add separators accordingly

---

[1] - This was never exposed since its original commit rB16411da41e40.
Now that operator not listed in menus don't
show up in the search, this became even more hidden.

[2] - The original name (Pack Blender Library) was not clear enough.
Pose Libraries and Asset Libraries are also technically Blender
libraries.

[3] - The term All was misleading since it didn't include the Linked
Libraries.

[4] - No need to use "All". It is not used in the Report/Find Missing
Files either.

This commit put this in the File > External Data menu.

Differential Revision: https://developer.blender.org/D11109
2021-05-04 16:20:56 +02:00
Sebastian Parborg 57b94cf34b Merge branch 'blender-v2.93-release' 2021-05-04 15:20:33 +02:00
Sebastian Parborg d0b3f9c81b Fix T87489: Text Data-Blocks get deleted on Recursive Purge
Text data block were not considered special in the recursive purge
function.  So they would get deleted if they had no actual users.

To fix this we instead make text data block use "fake user" so that
addon authors can specify script files that should be removed if nothing
is using it anymore.

Per default, new text object have "fake user" set. So functionality
wise, the user has to explicitly specify that they want the text object
to be purge-able.

Reviewed By: Bastien

Differential Revision: http://developer.blender.org/D10983
2021-05-04 15:11:20 +02:00
Sebastian Parborg 756c9b2219 Fix T87489: Text Data-Blocks get deleted on Recursive Purge
Text data block were not considered special in the recursive purge
function.  So they would get deleted if they had no actual users.

To fix this we instead make text data block use "fake user" so that
addon authors can specify script files that should be removed if nothing
is using it anymore.

Per default, new text object have "fake user" set. So functionality
wise, the user has to explicitly specify that they want the text object
to be purge-able.

Reviewed By: Bastien

Differential Revision: http://developer.blender.org/D10983
2021-05-04 14:47:35 +02:00
Jacques Lucke 4599cea15d Geometry Nodes: refactor instances component
The main goal of this refactor is to not store Object/Collection
pointers for every individual instance. Instead instances now
store a handle for the referenced data. The actual Object/Collection
pointers are stored in a new `InstanceReference` class.

This refactor also allows for some better optimizations further down
the line, because one does not have to search through all instances
anymore to find what data is instanced.

Furthermore, this refactor makes it easier to support instancing
`GeometrySet` or any other data that has to be owned by the
`InstancesComponent`.

Differential Revision: https://developer.blender.org/D11125
2021-05-04 10:16:24 +02:00
Germano Cavalcante e6bf272abd Merge branch 'blender-v2.93-release' 2021-05-03 20:07:03 -03:00
Germano Cavalcante b874c152a8 Fix (unreported): 'CoInitializeEx' being called without 'CoUninitialize'
Problem introduced in {rB1f223b9a}.

This was possibly causing random crashes in Blender file browser when
compiled with ASAN.

Microsoft documents indicate that any call to `CoInitializeEx` must be
balanced by a corresponding call to `CoUninitialize`.

https://docs.microsoft.com/en-us/windows/win32/api/combaseapi/nf-combaseapi-coinitializeex#remarks
2021-05-03 19:58:13 -03:00