Blender Git Loki

Blenderin Git "master"-kehityshaaran kommitit.

Page: 16 / 5574

Revision a8b730e by Hans Goudey
December 10, 2021, 20:54 (GMT)
Cleanup: Use const argument, rename variables

The const argument makes sense because these are the "source"
sockets, even though a const cast is necessary at one point.
The name "interface_socket" is an improvement over "stemp"
because the latter sounds like "temporary", or it confuses
the old socket template system with a node group's interface.
Revision 7c2fb00 by Hans Goudey
December 10, 2021, 19:52 (GMT)
Cleanup: Remove unnecessary runtime rectangle from nodes in DNA

I assume this `butr` rectangle was used more in the past,
but currently its value is set and used less than 10 lines apart,
so it's trivial to remove 16 bytes from every node. The other
rectangles are also runtime data and could be removed, but
they are more difficult.
Revision 5a3d5f7 by Hans Goudey
December 10, 2021, 18:55 (GMT)
Revert recent changes to ImBuf transform

This reverts commit 943aed0de35621e328 and f76e04bf4d7cdce8

The latter caused a test failure: `sequencer_render_transform`
Reverting since the fix is not obvious (to me), and people are
away for the weekend.
Revision 5ca38fd by Hans Goudey
December 10, 2021, 16:42 (GMT)
Cleanup/Docs: Add comments to Mesh header, rearrange fields

Most of the fields in Mesh had no comments, or outdated misleading
comments. For example, "BMESH ONLY" referred to the BMesh project,
not the data structure. Given how much these structs are used, it should
save a lot of time to have proper comments.

I also rearranged the fields in mesh to have a more logical order. Now
the most important fields come first. In the process I was able to
remove 19 bytes of unnecessary padding (31->12). I just had to
change a `short` flag to `char`.

Differential Revision: https://developer.blender.org/D13454
December 10, 2021, 15:34 (GMT)
Fix T93591: Random Value node first and last value proportion

This patch replaces `round_fl_to_int` with `floor` and adjusts the
maximum value accordingly. The call to `round_fl_to_int` is problematic
here because it messes with the probability distribution at the edges
of the value range, meaning the first and last values were only half
as common as all other values. Since `round_fl_to_int` does
`floor(val + 0.5)`, it will not introduce misbehavior in edge cases.

Differential Revision: https://developer.blender.org/D13474
December 10, 2021, 15:14 (GMT)
ImBuf: Extracted UV Wrapping from the Interpolation functions.

Improvement of the IMB_transform function by separating the UVWrapping
method from the color interpolation function. This would allow us to
perform uv wrapping operations separate from the interpolation function.

Currently this wrapping is only supported when interpolating colors.
This change would allow us to perform it on non-color image buffers.
December 10, 2021, 14:38 (GMT)
Added support for large images to openexr.
December 10, 2021, 14:38 (GMT)
Added support for large texture to OCIO.
December 10, 2021, 14:19 (GMT)
ImBuf: Use templating for IMB_transform.

Reduce the inner loop of IMB_transform by extracting writing to an
output buffer in a template. This reduces a branch in the inner loop and
would allow different number of channels in the future.
December 10, 2021, 11:28 (GMT)
Fix crash using 32k images.

Use IMB_get_rect_len to solve overflow issues.
December 10, 2021, 10:42 (GMT)
Cleanup: move public doc-strings into headers for various API's

Some doc-strings were skipped because of blank-lines between
the doc-string and the symbol and needed to be moved manually.

- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.

Ref T92709
December 10, 2021, 10:40 (GMT)
Cleanup: move public doc-strings into headers for 'python/intern'

Ref T92709
December 10, 2021, 10:40 (GMT)
Cleanup: move public doc-strings into headers for 'nodes'

Ref T92709
December 10, 2021, 10:28 (GMT)
Cleanup: doxygen comments for node_geo_dual_mesh

- Indent text after dot-points.
- Use an unparsed code-block to display the text verbatim in doxygen.
December 10, 2021, 10:28 (GMT)
Cleanup: spelling in comments
December 10, 2021, 09:37 (GMT)
Fix Crash: Loading Huge Images.

When loading huge images (30k) blender crashed with a buffer overflow.
The reason is that determine the length of a buffer was done in 32bit
precision and afterwards stored in 64 bit precision.

This patch adds a new function to do the correct calculation in 64bit.
It should be added to other sections in blender as well. But that should
be tested on a per case situation.
December 10, 2021, 08:09 (GMT)
Fix T92036: `Magic Texture` in Volumetric World Shaders render differently with the CPU and GPU

When rendering volume surfaces in unbounded worlds the volume stepping can produce large values. If used with a magic texture node the values can results in a Inf float which when used in a sin or cos produces a NaN.

To fix this the input values are mapped into the periodic range of the sin and cos functions (-2*PI 2*PI) this stops the possibility of a Inf occurring and thus the NaN. It also improves the accuracy and smoothness of the result due to loss of precision when large values are summed with smaller ones effectively removing the parts of the smaller number (i.e. those in the -2PI to 2PI range) that result in variation of the output of sin and cos.

Reviewed By: brecht

Maniphest Tasks: T92036

Differential Revision: https://developer.blender.org/D12821
December 10, 2021, 01:19 (GMT)
Cleanup: move public doc-strings into headers for 'depsgraph'

- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.

Ref T92709
Revision dffd032 by Hans Goudey
December 9, 2021, 23:43 (GMT)
Geometry Nodes: Remove unnecessary copy when replacing data

In the `replace_mesh`/`replace_curve` etc. methods, the component
was retrieved with write access. Retrieving with write access will
duplicate the data if the component has another user. This means that
the replaced geometry data was often duplicated just to be deleted
a moment later.

I expect this would have a large impact in performance in some specific
situations when dealing with large geometry. In a scene with many small
meshes though, I didn't observe a significant difference.

This also makes replacing a geometry set's data with the same data
that's already in the set safe. It would be valid to assert for that
case instead, but this seems safer.

Differential Revision: https://developer.blender.org/D13530
December 9, 2021, 21:17 (GMT)
Fix T93687: Transform Gpencil vertices not working if scale is zero

Solution similar to rBd5cefc1844cf.

Basically the problem occurs because `td->smtx` was set to zero matrix.
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021