Commit Graph

112404 Commits

Author SHA1 Message Date
Sergey Sharybin
c69ee218d7 Revert "Fix size_t -> int -> size_t round trip in Cycles"
This reverts commit d74bb7be1916744ae56347b49333eac22ebb7339.

Need to re-iterate to have a proper support of all platforms.
2022-02-09 16:16:21 +01:00
Jacques Lucke
7313a84c5a Fix T95612: only overwrite existing attributes with matching domain and type
Also fixes T95611 and T95610.

Differential Revision: https://developer.blender.org/D14051
2022-02-09 15:50:03 +01:00
Sergey Sharybin
d74bb7be19 Fix size_t -> int -> size_t round trip in Cycles
There are two things achieved by this change:

- No possible downcast of size_t to int when calculating motion steps.
- Disambiguate call to min() which was for some reason considered
  ambiguous on 32bit platforms `min(int, unsigned int)`.

On an implementation side the `min()` is defined for a fixed width
integer type to disambiguate uint from size_t on 32bit platforms,
and yet be able to use it for 32bit operands on 64bit platforms without
upcast.

Fixes 32bit platforms (such as i386) in Debian package build system.

Differential Revision: https://developer.blender.org/D13992
2022-02-09 14:45:39 +01:00
Jacques Lucke
d82384f7e1 Fix T95640: missing null check in previous commit 2022-02-09 12:36:49 +01:00
Alaska
fd6506626b Adjust "Show Backface" tool tip to be more accurate
Reviewed By: fclem

Differential Revision: https://developer.blender.org/D13849
2022-02-09 11:28:39 +01:00
Alaska
d3d9e2abbf Fix small grammatical mistake in Refraction Depth tooltip
Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D13850
2022-02-09 11:26:21 +01:00
Jacques Lucke
06ac599261 Fix T91840: do not create invalid links when inserting a node
Differential Revision: https://developer.blender.org/D14050
2022-02-09 11:19:23 +01:00
Jacques Lucke
de71860555 Fix T95570: missing task isolation when computing normals 2022-02-08 12:12:49 +01:00
Philipp Oeser
1995aae6e3 Fix T94415: Nodes: poor selection behavior inside frame nodes
Previously, node selection made no distinction between a frame node and
other nodes. So a frame node would be selected by their whole rect or
center (depending on box/lasso/circle select). As a consequence of this,
box and lasso could not pratically be started inside a frame node (with
the intention to select a subset of contained child nodes) because the
frame would be selected immediately and tweak-transforming started.
Circle selecting would always contain the frame node as well (making
transforming a subset of nodes without also transforming the whole frame
impossible).

Now change selection behavior so that for all selection modes only the
border [the margin area that is automatically added around all nodes,
see note below] of a frame node is considered in selection. This makes
for a much more intuitive experience when arranging nodes inside frames.

note: to make the area of interest for selection/moving more obvious,
the cursor changes when hovering over (as is done for resizing).
note: this also makes the resize margin consistent with other nodes.
note: this also fixes right resize border (was exclusive instead of
inclusive as every other border)

Also fixes T46540.
2022-02-08 10:14:14 +01:00
Hans Goudey
b76918717d Fix T95573: Incorrect bounding box of evaluated curve
Account for `CurveEval`, which stores the proper deformed and
procedurally created data, unlike the `nurb` list, which has always
just meant a copy of the original curve.

Also account for the case when the curve is empty by using a -1, 1,
fallback bounding box in that case, just like mesh objects.
2022-02-07 18:42:31 -06:00
Wannes Malfait
229d0ace02 Fix T95532: Merge node deletes everything for empty selections
The problem was that nullptr was returned which is a valid value for
Mesh * and hence the returned optional was treated as having some value.
There was no check for point clouds so that was fixed as well.

Differential Revision: https://developer.blender.org/D14026
2022-02-07 16:08:36 -06:00
Brecht Van Lommel
11d785edea Fix T95502: macOS app has both python 3.9 and 3.10 executables 2022-02-07 20:51:03 +01:00
Myles Walcott
880e85fc80 Cleanup: Grammar in doc/python_api
* Its -> It's
* Scripts -> Script's
* then -> than

Several phrasing grammar fixes.

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D14021
2022-02-07 14:28:12 -05:00
Jacques Lucke
65d287a14a Fix T95543: incorrect handling of implicit field inputs in ui 2022-02-07 18:44:30 +01:00
Jacques Lucke
eb071e3d3c Fix: missing null check
This fixes https://github.com/JacquesLucke/animation_nodes/issues/1827.
2022-02-07 18:16:35 +01:00
Jacques Lucke
2f868e5647 Fix T95578: missing update when linking selected nodes
This removes a "narrow" update in `snode_autoconnect` in favor
of the more general update in `node_make_link_exec`.
2022-02-07 17:56:25 +01:00
Bastien Montagne
3cd686cae8 Fix UI messages (typos etc.). 2022-02-07 11:12:37 +01:00
Aras Pranckevicius
1d59a7aa77 Fix T95384: new obj exporter inaccurate roughness value in new exporter.
Fixes T95384. New exporter was missing a fix for T94516 that recently got applied to the python exporter.

Also changed the obj export tests code so that when save_failing_test_output is requested and MTL result is different from the golden expectation, it is saved as well, similar to how it's done for the OBJ file result.
2022-02-06 14:53:07 -05:00
Clément Foucault
8be20fcc61 GPU: Fix assert when running without --debug-gpu option on older GL
This was caused by rB3a90f93507a344d2b6eb3ae631371348ff977047
2022-02-06 12:39:17 +01:00
Hans Goudey
59a8bdd48c Fix: Displaying any point cloud in the viewport causes crash
Caused by rBf75449b5f2b04b79, which was missing a null check when
attempting to extract a `CustomData` pointer from an mesh that might
be null if the object isn't a mesh object. The commit added null checks
elsewhere, so simply adding them here is a straightforward fix.

Fixes T95526, T95539
2022-02-05 17:52:04 -06:00
Aras Pranckevicius
c24b2cdebf Fix T95360, new 3.1 obj exporter losing nurbs curve "endpoint".
The new wavefront .obj exporter in 3.1 was producing slightly invalid parm line syntax (missing u), and was not setting first/last N params to zeroes and ones for curves with "endpoint" flag properly.
2022-02-05 17:51:03 -05:00
Clément Foucault
3a90f93507 GPU: Debug: Avoid double printing of compilation issues
To avoid that, we simply filter using a debug group.
2022-02-05 23:08:49 +01:00
Clément Foucault
f2087dfc69 GPUTexture: Fix missing/wrong cases in to_data_format() 2022-02-05 19:29:45 +01:00
Clément Foucault
edc0e77afe GPU: Enable CLOG for gpu when --debug-gpu option is set
This is because all of the debug printing is done through CLog now. Without
it the is little point in this option.
2022-02-05 19:27:21 +01:00
Clément Foucault
7bdfce687b GL: Fix compute shader label error 2022-02-05 19:27:09 +01:00
Hans Goudey
0b4cf2984f Fix: Remove incorrect assert in mesh modifier evaluation
Since we have a node that sets a mesh's auto smooth angle
(unfortunately, in retrospect), we generally can't assume at all
that value is the same as whatever input mesh. Similar asserts
were removed previously in 8216b759e9557c786. While the attempt
at assertions to clarify assumptions is noble, this one doesn't
make sense anymore.

I found this while investigating T95479.

Differential Revision: https://developer.blender.org/D14009
2022-02-04 14:19:04 -06:00
Brecht Van Lommel
a5be935966 Fix uninitialized value in Cycles BVH after recent changes
Found by asan, unknown if it actually caused an issue.
2022-02-04 20:27:49 +01:00
Clément Foucault
260e6fd46b Workbench: Fix unreported heavily quantized mesh due to driver issue
Detected on `amdgpu-pro` libGL implementation. The workaround is to not
use explicit location for vertex attributes. This is not a real problem
as we don't rely on them for now.
2022-02-04 19:34:48 +01:00
Hans Goudey
0446c9c875 Fix: Incorrect default distance for merge by distance node
This was an oversight in the patch that added this node,
the default merge distance is meant to be the same as the weld
modifier, 0.001m, meaning by in most situations it removes
vertices generally at the same location.
2022-02-04 12:21:27 -06:00
Brecht Van Lommel
b61cb67e6d Fix T94410: stopping Cycles render in 3D viewport quad view keeps using CPU
Only one of the four renders was being stopped.
2022-02-04 18:55:07 +01:00
Brecht Van Lommel
edb0e7ca30 Fix T95471: baking normals wrong after recent MVert normals refactor 2022-02-04 18:15:39 +01:00
Brecht Van Lommel
0f40855a09 Fix T93851: Cycles wrong glossy indirect pass with volumes 2022-02-04 17:53:39 +01:00
Ray Molenkamp
b2e43a4a9d deps_builder: Update to freetype 2.11.1
Required to solve a crash on windows (T95367)

Mostly an uneventful update, except for FreeType
giving its cmake options a rename.

Reviewed By: brecht, sybren
Differential Revision: https://developer.blender.org/D13968
2022-02-04 09:19:10 -07:00
Sergey Sharybin
f75449b5f2 Fix T95467: Textures disappear when going to Edit Mesh on Solid Texture mode
The check for existence of custom data layers did not take wrapper nature of
mesh into account.

Quickest and safest for 3.1 solution is to take care of branching of checks
in the draw manager.

Ideally both wrapper and mesh access will happen via the same public API
without branching in the "user" code. That is something outside of the fix
for the coming release though.

Differential Revision: https://developer.blender.org/D14013
2022-02-04 15:54:25 +01:00
Jeroen Bakker
2e766ff762 Image Editor: Fix slowdown with 8b colormanaged images.
Byte images are converted to float. Due to an issue how VSE cache is
freeing its images we cannot store these float buffers what leads
to recalculating it for each change in the image editor.

This fix will reduce the slowdown to areas that have the root cause of
the memory leak, so the buffers can be reused between refreshes.

NOTE: The root cause should still be fixed.

Thanks for reporting Sybren!
2022-02-04 15:32:28 +01:00
Clément Foucault
080dd18cdf Fix T95427: Crash during dragging a link in a node editor
This was caused by macros interpreted as recursive. Workaround by
not using macros at all and just define local variables which
hopefully will be optimized.
2022-02-04 14:05:17 +01:00
Clément Foucault
8e0763827e Fix T95284 Workbench: "World" Cavity Type Doesn't Render Anything
This was caused by a faulty UBO bind (not updated after renaming).
2022-02-04 14:05:17 +01:00
Jeroen Bakker
cb986446e2 Fix Crash: Switching to wireframe mode.
Crash introduced by {rB0cb5eae}.

When switching to between drawing modes the region.draw_buffer could be
uninitialized when the gizmo depth test is performed. When the mouse is
placed on top of a gizmo part that could be highlighted would crash.

This fix adds a early exit when depth testing is requested, but there
isn't a draw_buffer. Not sure this is an root cause fix.

Reported by multiple animators in Blender Studio.
2022-02-04 14:00:06 +01:00
Jacques Lucke
b8a634cb1d Fix T95489: support writing to vertex groups with geometry nodes again
Technically, this can't be relied upon in the long term. It worked more or
less accidentally before. It was broken by a previous fix accidentally. I mainly
bring it back because rBa985f558a6eb16cd6f0 was not expected to have
this side effect.

Note, this change can result in slower performance. Writing to a vertex
groups is less efficient than using a generic attribute.
2022-02-04 13:10:02 +01:00
Jeroen Bakker
5088d907e5 Compositor: Backdrop mode changes node grid.
When viewing backdrop on top of the node grid, the grid would be
rendered black when the mode wasn't set to RGBA. This fix fixes this by
reverting the previous fix of drawing the backdrop and implement a
different one that recomputes the UV coordinates on the screen edges.
2022-02-04 09:51:25 +01:00
lictex_
f7a6e8db04 Fix T88579: scale cage doesn't work well for small/large objects
Apply proper view scale for cage 3d's draw_select,
same as draw.

Reviewed By: campbellbarton

Ref D13956
2022-02-04 15:37:07 +11:00
Campbell Barton
ef2685afea Fix assertion snapping to selected in mesh edit-mode
ED_transverts_create_from_obedit expected an evaluated object.

Add flag to request TX_VERT_USE_MAPLOC to be set, which avoids having to
calculate this data when it's not used as well as the requirement
that the input object be evaluated from the depsgraph.
2022-02-04 11:08:34 +11:00
Aaron Carlisle
a0c1306e8c Py Docs: Fix error is version switch
Slile parameter of 4 was looking for the language in the URL but the API docs do not have a language in the URL.
2022-02-03 15:21:44 -05:00
Aaron Carlisle
bda210d74a Py Docs: Fix json URL
In the future when we have a docs staging area it will be
important to change where this JSON is pulled from.
For now, always pull from the "Production" versions
2022-02-03 15:06:11 -05:00
Aaron Carlisle
e7f74a7d6a Py Docs: Fix typo in previous commit
- Correct spacing
- Add missing comma
2022-02-03 14:37:55 -05:00
Aaron Carlisle
6a2fc3230f Py Docs: Implement version switch to switch between versions on the website
This commit adds a version switch similar to the one on the user manual,
in the future it would be nice to refactor both of these into a more generic
code that works for both. Maybe develop this into a sphinx extension.

As part of this change I had to change how the blender hash is displayed.
Instead of the version hash in the top left it has been moved to the page footer.

This change will also be backported to 2.93 LTS, 2.93 LTS, and 3.0.
2022-02-03 14:25:26 -05:00
Bastien Montagne
71cd9f9fbb Fix (unreported) broken logic in proxy to liboverride conversion.
Iterating over scene's objects while we modify those (through proxy to
override conversion code) is call for problems (use after free etc.).

Instead, all proxy objects need to be gathered first in a temporary
list, and processed all at once in a second loop.
2022-02-03 17:19:04 +01:00
Jacques Lucke
4be87e97f4 Fix T94435: remove anonymous attributes when applying modifier
Differential Revision: https://developer.blender.org/D13994
2022-02-03 16:52:16 +01:00
Bastien Montagne
946c70e6a7 Fix (unreported) broken do_version of hidden layers from pre-2.8 files.
`BKE_collection_object_add` ensures given object is added to an editable
collection, and not e.g. a linked or override one.

However, some processes like do_version manipulate collections also from
libraries, i.e. linked collections, in those cases we need a version of
the code that unconditionnally adds the given object to the given
colleciton.
2022-02-03 15:37:05 +01:00
Howard Trickey
3bcbbf8992 Split Python OBJ importer and exporter, enabling only the importer.
This is from patch D13988. It removes the "- New" from the menu of the
new obj exporter, changes the default addon to just io_import_obj,
and does the right versioning thing.
Also disables the python tests for the old python exporter.
2022-02-03 09:30:55 -05:00