Commit Graph

102088 Commits

Author SHA1 Message Date
Pablo Dobarro 8b9b3d98e0 Rename use paint symmetry to use mesh symmetry in quadriflow
The original name was chosen because symmetry was a property of
the Paint struct. Now symmetry is a property of meshes, which
also makes the name of the property easier to understand.

Reviewed By: sergey, dbystedt

Differential Revision: https://developer.blender.org/D9618
2020-11-25 22:21:02 +01:00
Bastien Montagne 41a73909de Cleanup: Typo in `print_default_info` function name. 2020-11-25 20:45:47 +01:00
Alexander Gavrilov 02a0f6b04a Fluid Particles: fix viscoelastic spring threading crash again after D7394.
Since D6133 fluid particle code uses thread local storage to collect
springs created during a time step before adding them to the actual
spring array.

Prior to the switch to TBB there was a single finalize callback which
was called on the main thread, so it could use psys_sph_flush_springs
and insert the new entries into the final buffer. However in D7394 it
was replaced with a reduce callback, which is supposed to be thread
safe and have no side effects. This means that the only thing it can
safely do is copy entries to the other temporary buffer.

In addition, careful checking reveals that the 'classical' solver
doesn't actually add springs, so reduce isn't needed there.

Differential Revision: https://developer.blender.org/D9632
2020-11-25 22:31:47 +03:00
Germano Cavalcante 8330e19cb2 RNA Armature: Improve the description of AxisRollFromMatrix
The roll value may not be as expected when a matrix is not orthogonal
or has a negative determinant.

This can lead to confusion as seen in T82930.

Therefore, make it clear that this is a limitation and that a value for
the roll is somewhat indeterminable in these cases.

This fixes T82930
2020-11-25 13:55:05 -03:00
Antonio Vazquez f67f895770 GPencil: Disable vertex color when use holdout
If the material has the holdout enabled, the value of the vertex color must not be used.
2020-11-25 16:01:30 +01:00
Robert Guetzkow 436fd5663e Fix T82988: Div by zero with curve deform modifier
In `calc_curve_deform` a factor is calculated without checking if
the divisior is zero or close to zero. This patch adds the missing
checks and sets the factor to zero if the division shouldn't be
computed.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D9645
2020-11-25 15:18:18 +01:00
Sergey Sharybin 4a179e8e3e Atomics: Fix missing 64bit implementation for 32bit platforms
Blender uses 64bit atomics to manipulate SessionUUID, and these atomics
were not defined on any of 32bit platforms.

While official support is limited to 64bit platforms only, the code
should not make assumptions about bitness or endianess, in terms that
there should be codepaths and fallback (or provision of them) for 32bit
platforms.

This change makes 64bit atomic functions defined for all platforms.
The atomic_test was compiled and successfully tested on i686 and armv7l
platforms. The rest of compilation process of Blender will be very
tedious, so that was not done.

This change is essential, but not necessarily enough to make Blender
compilable on i686 (ability to compile Blender on 32bit platforms was
lost during the 2.91 development).

This is a functional part of original fix done by Brecht in D9577.
2020-11-25 12:43:43 +01:00
Sergey Sharybin 4323886123 Atomics: Cleanup, move defines closer to usage
There is a special defines block needed for ARM on Linux. Move it from
public header to an implementation file.

No functional changes.

This is a non-functional part of original fix done by Brecht in D9577.
2020-11-25 12:43:43 +01:00
Jacques Lucke 1c86d32fa7 Nodes: deduplicate ping pong math operation
The formula did not change. The only side effect of this change should be
that the compositor node now does not divide by zero in some cases.
2020-11-25 12:24:44 +01:00
Bastien Montagne 9e77fc533c Cleanup: remove useless cast. 2020-11-25 11:19:28 +01:00
Sergey Sharybin b1533f8fa4 Tracking: Cleanup, de-duplicate implementation of marker lookup
The logic was duplicated.

Should be no functional changes. The modified function is expected
to give same exact results for all inputs.

On the "caching last-used track" topic. The code was using last_marker
to allow faster lookup of marker closest to the frame. With this
change it is still the case since the BKE_tracking_marker_get() does
cache last used marker.
2020-11-25 09:37:24 +01:00
Jacques Lucke e922dd7d8a Viewport: cannot select object by clicking on its instances
Selecting an object by clicking on its instances only worked,
when the object itself is visible. However, it is possible to hide
the object and still keep the instances visible.

The solution is to give every object the correct `select_id` in the
depsgraph object iterator right before rendering.

Reviewers: fclem, brecht

Differential Revision: https://developer.blender.org/D9640
2020-11-24 17:32:56 +01:00
Sybren A. Stüvel 256a9d983d Merge remote-tracking branch 'origin/blender-v2.91-release' 2020-11-24 16:05:58 +01:00
Jeroen Bakker 278011e44d Fix T80748: Render Emissive Colors in Compositor Backdrop
This change will use the image engine to draw the backdrop of the compositor. With this patch the alpha blending will be done in Linear Scene Reference space and shows pure emissive colors.

See differential for an example image.

**Technical changes**

As only the backdrop drawing is done using the draw manager there are some technical changes.
1. The overlay buffer is partly drawn outside the draw manager. When drawing the backdrop image the overlay buffer needs to be masked to simulate premultiplied alpha under.
2. The backdrop of the node editor is done in region pixel space. A `DRWView` is constructed with this space.
3. UDIM textures uses world position to generate the UV coordinates. This has been implemented more strict by the `IMAGE_DRAW_FLAG_USE_WORLD_POS`. When the flag isn't used the local coordinates are used to generate the UV coordinates what is image space.
4. The draw manager now checks the actual `eSpaceType` of the space data to use different code paths. In the future the movie clip editor will be added.

NOTE: The preview images in nodes are drawn in display space and cannot show pure emissive colors. As preview images are used on more locations it is best to fix this in a separate patch.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D9451
2020-11-24 13:22:17 +01:00
Sergey Sharybin 82cc21d5e4 Fix T77261: Multires creates spikes when subdividing ngons
The spikes were caused by non-initialized tangent matrix used during
smoothing process. The reason tangent matrix was not initialized was
because wrong usage of API: n-gons should pass corner of 0 to the
matrix construction function.

Corrected usage of the API and added assert() to help catching such
kind of non-initialized issues easier.
2020-11-24 12:40:42 +01:00
Sybren A. Stüvel 31bf8307af Graph Editor: fix keyframe not activating in certain cases
When clicking on an already-selected keyframe, mark it as active if the
click caused the previously-active keyframe to become deselected.

When clicking on a key in the graph editor, it is selected and all other
keys are deselected. If that key was already selected before the click,
it would not become the active keyframe. This is now fixed.

Reviewed by: Severin

Differential Revision: https://developer.blender.org/D9639
2020-11-24 12:27:43 +01:00
Jeroen Bakker bb5c4de009 Fix T82962: Crash changing lattice resolution with Vertex Group
Regression introduced by {rB042143440d76}. The deform group lookup was
performed on the wrong object. Before the lookup was performed on
the lattice object. This patch changes this back.

Reviewed By: Bastien Montagne

Differential Revision: https://developer.blender.org/D9638
2020-11-24 11:46:38 +01:00
Sybren A. Stüvel aca8eadb63 Animation: Remove debug prints
Remove accidentally-commited debug prints.

No functional changes.

Reviewed by: sergey

Differential Revision: https://developer.blender.org/D9637
2020-11-24 11:13:43 +01:00
Dalai Felinto e74f61b49a Fix Python API docs for the render API
The API doc for free_blender_memory() was used in
get_preview_pixel_size()

Issue introduced in 5494683651.
2020-11-24 10:42:28 +01:00
Nathan Craddock 037ce662e5 Outliner: Switch properties tabs only on icon click
According to feedback the outliner to properties editor tab switching
was annoying when it always changed tabs on selection, especially for
selecting individual objects. This limits the tab switching behavior to
only when the icons in the outliner are selected.
2020-11-23 22:21:02 -07:00
Yevgeny Makarov d86fcde39c UI: Batch Rename Layout Improvements
Improvements to the layout of the Batch Rename dialog.

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

Reviewed by Reviewed by Hans Goudey
2020-11-23 17:27:01 -08:00
Yevgeny Makarov df31ecf0c3 UI: Add Trackpad Smooth Scrolling for Popovers
Adds smooth scrolling with the trackpad for popovers. Also fixes the position of the scroll arrows on high-DPI.

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

Reviewed by Brecht Van Lommel
2020-11-23 17:22:20 -08:00
Yevgeny Makarov b6a50b5dcb UI: Block Safety Not Scaled Correctly
Layout block safety sizes were not scaled correctly with interface scale.

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

Reviewed by Brecht Van Lommel
2020-11-23 16:56:01 -08:00
Howard Trickey 246c11634f Speedups for new boolean. Better hash function for verts.
The existing hash function didn't work well with Set's method of
masking to the lower bits, because many verts have zeros in the
lower bits.
Also, replaced VectorSet with Set for Vert deduping.
2020-11-23 19:30:40 -05:00
Jeroen Bakker b0a9081883 Fix T82884: Cycles Compilation Error OpenCL/NanoVDB
Recent changes introduced `acc` parameter into the texture read
functions. When nanovdb isn't enabled this leads to compilation errors
as the `acc` variable wasn't defined. OpenCL only compiles needed
features what made it more prominent.

Reviewed By: Patrick Mours

Differential Revision: https://developer.blender.org/D9629
2020-11-23 16:42:48 +01:00
Jeroen Bakker 8351760ed0 Cycles: Remove Compilation Warning
ROCm 3.9 already defined `NULL`. This patch will first check if it was
already defined to remove compilation warnings.

NOTE: This doesn't add official support for ROCm as it still fails to
render correctly (crashes with default cube).

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D9610
2020-11-23 16:36:15 +01:00
Christoph Lendenfeld 1f09dcc121 Cleanup: Animation, split `graph_edit.c` into separate files
Split some of the code of `graph_edit.c` into:
* `graph_view.c`: preview range, view all, view selected etc.
* `graph_slider_ops.c`: the decimate modal operator code.

The latter file will be extended later with more slider-based operators.

Maniphest Tasks: T81785

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D9312
2020-11-23 15:26:54 +01:00
Sergey Sharybin 152754a477 Tracking: Cleanup, typos and spelling in DNA comments 2020-11-23 15:25:55 +01:00
Sybren A. Stüvel e4ca1fc4ea Animation: New Euler filter implementation
This new discontinuity filter performs actions on the entire Euler
rotation, rather than only on the individual X/Y/Z channels. This makes
it fix a wider range of discontinuities, for example those in T52744.

The filter now runs twice on the selected channels, in this order:
- New: Convert X+Y+Z rotation to matrix, then back to Euler angles.
- Old: Add/remove factors of 360° to minimize jumps.

The messaging is streamlined; it now reports how many channels were
filtered, and only warns (instead of errors) when there was an actual
problem with the selected channels (like selecting three or more
channels, but without X/Y/Z triplet).

A new kernel function `BKE_fcurve_keyframe_move_value_with_handles()` is
introduced, to make it possible to move a keyframe's value and move its
handles at the same time.

Manifest Task: T52744

Reviewed By: looch

Differential Revision: https://developer.blender.org/D9602
2020-11-23 12:48:04 +01:00
Ankit Meel 1318eaf166 Cleanup: CMake: use string(APPEND..), not set(..)
Left out in {rB7f28a99dd5a57216fb477d844ae1fec5510ad5d5}
2020-11-23 16:34:17 +05:30
Ankit Meel 36426b0a68 CMake/macOS: Replace -Xlinker with -Wl.
Causes link issues on Xcode's "New Build System" which was introduced
in Xcode 10 and is default on Xcode 12.
https://devtalk.blender.org/t/16273

Differential Revision: https://developer.blender.org/D9624
Reviewed by: brecht, #platform_macos
2020-11-23 16:34:17 +05:30
Bastien Montagne 64513df8b6 Fix T82849: Assert When Unlinking "Edit Source" Text Data-block.
Simplify and sanitize handling of usercounts for Text IDs generated
trhough `BKE_text_load_ex`.
2020-11-23 11:56:40 +01:00
Sergey Sharybin 401612b8e1 Tracking: Cover markers access with basic tests
Just a beginning of tests coverage, related on the planned upcoming
development.
2020-11-23 09:23:19 +01:00
Sergey Sharybin 1e0ff6b723 Tracking: Cleanup, make units explicit in new track creation 2020-11-23 09:23:19 +01:00
Sergey Sharybin 6d314c940e Tracking: Cleanup, clarify comments in tracking settings
Make unit more explicit.

Ideally would be "embedded" into the field name itself, but this will be
more involved change.
2020-11-23 09:23:19 +01:00
Sergey Sharybin 2ee5bc33ea Tracking: Refactor, move track allocation to helper function
The caller is still responsible for allocating list of markers,
but the track allocation and initialization can now be reused.

Currently no functional changes, preparing for an upcoming
development.
2020-11-23 09:23:19 +01:00
Julian Eisel 7bab87c119 Fix T82918: File menu "Save Copy" shows "Save As" in File Browser
Use a dynamic name/description based on the set properties. This makes it more
clear what's going on and avoids confusion, as explained in the report.
2020-11-22 19:21:30 +01:00
Hans Goudey 4c01fbb564 Cleanup: Use const arguments in curve bevel
This makes it clear that only the final "r_data" is being changed.
Also rename a variable to be less vague.
2020-11-22 12:11:15 -05:00
Hans Goudey b11d409ac4 Cleanup: Improve readability of curve displist building
Just a few minor improvements: declare variables where they are
initialized, decrease scope, expand some variable names, and use
LISTBASE_FOREACH.
2020-11-22 11:47:37 -05:00
Hans Goudey 1cc3a0e2cf Cleanup: Reduce indentation
Having up to nine levels of indentation make this function hard to
follow. Instead of indenting the rest of the loop for a simple special
case, just continue.
2020-11-22 11:25:10 -05:00
Alexander Gavrilov 0f3ca3f4bc Fix unclear tooltip for the Affect Transform option of constraints. 2020-11-22 13:33:27 +03:00
Howard Trickey d25e116889 Previous commit forgot to guard some things with #ifdef WITH_GMP. 2020-11-21 22:44:35 -05:00
Howard Trickey df8cc5662b Improve speed of Constrained Delaunay Triangulation with exact arith.
By using floating point filters, the speed improves by a factor of 2 to 10.
This will help speed up some cases of the Exact Boolean modifier.
Changed the interface of mpq2::isect_seg_seg to not return mu, as it was
not needed and not calculating it saved 15% time.
2020-11-21 11:55:14 -05:00
Antonio Vazquez 38fe962d95 Merge branch 'blender-v2.91-release' 2020-11-21 14:18:12 +01:00
Antonio Vazquez 6c6a5a72c2 GPencil: Fix unreported assert when use select Box in single point strokes
The assert was when use segment selection mode.
2020-11-21 14:17:26 +01:00
Hans Goudey 0eb096f406 Cleanup: Declare variables where initialized
Reduce variable scope, and in a few cases, use bool instead of int.
2020-11-20 21:54:52 -05:00
Pablo Dobarro c850ce93a4 Fix wireframe opacity creating artifacts on sculpt overlay edges
When lowering the wireframe opacity with sculpt overlays enabled, the
wireframe overlay was creating white artifacts along the edges.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D9607
2020-11-20 18:02:07 +01:00
Hans Goudey cec22ba8db Cleanup: Use LISTBASE_FOREACH macro 2020-11-20 11:00:51 -05:00
Nathan Craddock 05ef031f37 UI: Remove excess row spacing in outliner popover
Some checkboxes had nonessential spacing between rows which made the
popover taller than needed.
2020-11-20 08:55:27 -07:00
Nathan Craddock 2afdb4ba87 Outliner: Object state filter invert toggle
This adds an invert toggle for the outliner object state filters.
There are some cases where we want a filter for invertable states (Selected,
Unselected) and having a single toggle to invert the filter reduces the
number of separate filter types needed. This removes the "Hidden" filter
which can now be replicated with an inverted "Visible" filter.

Differential Revision: https://developer.blender.org/D9598
2020-11-20 08:47:51 -07:00