Commit Graph

78271 Commits

Author SHA1 Message Date
Germano Cavalcante 44bb73e765 Revert "Cleanup: simplify Weld Modifier logic"
This reverts commit 98b1a716d6.

That commit broke a few modifiers.py tests
(Screw+Weld and a weld merge threshold).

And some pairs may be lost in the first loop.
2020-07-15 08:10:41 -03:00
Jacques Lucke ff2fa59689 Fix T76690: Incorrect liquid particle count displayed
Reviewers: sergey, sebbas

Differential Revision: https://developer.blender.org/D7852
2020-07-15 12:53:05 +02:00
Antonio Vazquez 4e8fc14120 GPencil: Fix name typo error 2020-07-15 12:47:55 +02:00
Sebastian Parborg 7e2ffbfb25 Add missing NULL assignment to D8293
Missed reseting "next_td" in that patch.
Shouldn't have caused any issues in practice, but it is nice to be
extra clear and safe in the code.
2020-07-15 12:36:48 +02:00
Sebastian Parborg 50c6448781 Fix T78909: Curve-edit proportional connected-only broken
Now it calculates the actual distance when traveling along the curve.

I addition to this, it also now supports cyclic curves.

Reviewed By: Campbell

Differential Revision: http://developer.blender.org/D8293
2020-07-15 12:29:45 +02:00
Bastien Montagne 680a81fc49 LibOverride: rework 'make override' 3DView operator.
Removed the 'select main object to override' menu when overriding an
instanced collection, this was no more used anyway.

Added new behavior allowing to select which directly linked collection
to override when trying to override an inderctly linked object. This
allows to link collections without instancing them with an empty object,
select one of their objects, and call override operator.
2020-07-15 11:01:40 +02:00
Campbell Barton eb87b1c8f6 Cleanup: remove assignment from a NULL struct
Quiet ASAN 'member access within null pointer' warning.

While this doesn't crash, access to 'shading'
without checking if the 'v3d' would have.
2020-07-15 15:37:03 +10:00
Campbell Barton e062def3b4 Cleanup: spelling 2020-07-15 13:11:22 +10:00
Campbell Barton 061d76f55c Revert "Cleanup: remove public unused function."
This reverts commit 03c8b048a1.

This commit re-introduced T76837.

While there is a comment explaining why this function is needed,
the naming of the poll function does make this confusing.
The API could be changed to avoid confusion here.
2020-07-15 13:09:06 +10:00
Germano Cavalcante d493fc43bd Fix T78875: Numerical display of delta of translation is not updating in 3d view 2020-07-14 17:45:57 -03:00
Sebastián Barschkis 7f67e3200a Fluid: Fix liquid mesh scaling
Fixes issue with .bobj.gz and .obj mesh files not always being scaled correctly in the viewport.
2020-07-14 22:21:15 +02:00
Germano Cavalcante 98b1a716d6 Cleanup: simplify Weld Modifier logic
The original code to rearrange the weld vertices map was confusing.

It traverses the overlap result multiple times within a loop.

This part of the code has therefore been rethought, simplified and commented.

This also results in a slight improvement in the performance of the modifier.
2020-07-14 15:18:22 -03:00
Sebastián Barschkis dbcc74f801 Fix T77263: Mantaflow: Cache gets deleted at changing upres factor under Particles section.
Moved fluid simulation reset to separate functions based on type.
2020-07-14 18:11:35 +02:00
Jeroen Bakker 0b100e21fb Fix T78704: RenderPass normals disapear when view isn't updated
When the view isn't updated the renderpass thought that it was rendering
the next sample, skipping the conversion from encoded to blender
normals.

This patch resets the current sample when only rendering single sample
layers.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8280
2020-07-14 17:42:15 +02:00
Jeroen Bakker 6cc88e330b Fix T78431: Update mesh_cd_layers_type_ to support 8 bytes.
Sculpt vertex colors changed the `DRW_MeshCDMask` from 4 bytes to 8 bytes, but
the functions assumed it still was 4 bytes. This patch updates the functions and
adds a compile time check.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8215
2020-07-14 17:41:05 +02:00
Sebastian Parborg 2ba1cf4b40 Fix T78880: UV Editor - Match prop edit connected behavior with mesh editing and fix Rip Region double proportional checkbox
This fixes the double prop edit checkbox in the redo menu.

This also makes it so that proportional edit in connected mode now
matches how it behaves in mesh edit mode.

Without this change, ripping in UV edit mode with proportional edit on
would be useless as the UV verts you ripped will still be stuck together
even if they were not connected anymore.

Reviewed By: Campbell

Differential Revision: http://developer.blender.org/D8289
2020-07-14 17:27:48 +02:00
Antonio Vazquez 8e9dd5492a Gpencil: Simplify modifier sample mode minimal vert count fix.
For this mode is possible use strokes of 2 points.

Differential revision: https://developer.blender.org/D8138
2020-07-14 15:59:49 +02:00
Bastien Montagne c8a62e4f50 Cleanup: function name not following its module conventions. 2020-07-14 15:28:08 +02:00
Jacques Lucke 6068f49c33 BLI: remove static assert noexcept move constructors
The move constructor of `mpq_class` from GMP currently
allocates when it is moved. So, it cannot be noexcept.
Since we want to use this type, this static assert cannot
stay there.
2020-07-14 15:23:40 +02:00
Kévin Dietrich 2e8a78f4d1 Fluid bake: fix memory leak when path validation fails
Reviewed By: sebbas

Differential Revision: https://developer.blender.org/D8284
2020-07-14 15:21:08 +02:00
Campbell Barton 78148e20fa Cleanup: remove tab indention 2020-07-14 22:52:50 +10:00
Campbell Barton fa7ace2215 PyAPI: support element multiplication for vector, matrix, quaternions
This was disabled during 2.8x for smooth porting of 2.7x scripts,

Now '@' is used for matrix multiplication,
support '*' to multiple vector elements.

See T56276.
2020-07-14 22:52:50 +10:00
Bastien Montagne e3fd60b182 LibOverride: Outliner: Add an operation to override the selected ID and its parents.
This will override all linked data-blocks in the tree branch leading to
the selected one.
2020-07-14 14:51:13 +02:00
Bastien Montagne 140b26909e LibOverride: Move code tagging reauired dependencies of an override into BKE.
This is fairly generic code that can be re-used in other places.
2020-07-14 14:51:13 +02:00
Germano Cavalcante 1e5ce39156 Fix T78900: Single vertex sliding crashes
As we can see in `initVertSlide_ex`, `sld` can be `NULL`.
`sld` is dereferenced, but can still be `NULL`.
2020-07-14 09:31:05 -03:00
Jacques Lucke 01ec76842f Fix T77766: support animated global gravity toggle
Reviewers: sebbas

Differential Revision: https://developer.blender.org/D8281
2020-07-14 13:47:32 +02:00
Sergey Sharybin 25fc84bf2e Fix wrong vector size functions used in knife tool
Should not use copy_v3_v3 on a 2 element vectors.
2020-07-14 10:43:32 +02:00
Antonio Vazquez 26793d619c GPencil: Cleanup Build modifier and fix potential div by zero errors 2020-07-14 10:26:19 +02:00
Campbell Barton 0fb08b7cc4 Cleanup: sort header, cmake paths 2020-07-14 16:04:18 +10:00
Campbell Barton 93e14e5935 Fix T78883: New bezier curve points to uninitialized memory 2020-07-14 15:53:56 +10:00
Campbell Barton 5338b36fcc Cleanup: spelling 2020-07-14 15:19:52 +10:00
Hans Goudey b818f6b55f Fix T78902: Only check main modifier panel for expansion property
Internally the "show_expanded" property stores the expansion for every
subpanel, but for RNA we should only check the first bit of the flag that
corresponds to the main panel.
2020-07-13 20:10:49 -04:00
Hans Goudey 0b24930541 UI: Add missing row in curve profile template 2020-07-13 17:16:01 -04:00
Germano Cavalcante 37fb586a0b Cleanup: remove unnecessary member
`Kfv-> sco` was being treated as a local variable, and can be
confusing since this value is not updated when navigating the viewport.
2020-07-13 16:10:45 -03:00
Pablo Dobarro 2b5e21fe00 Sculpt: Add extra deform types to Smear
The smear brush was using the stroke direction to slide colors across
the mesh surface (this is called drag in other sculpt tools). Similarly,
other deformations can be included. The most common ones in image
editing are pinch and expand, which can be used to sharpen transitions
between colors.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8270
2020-07-13 17:53:24 +02:00
Pablo Dobarro eb3f74a0fe Sculpt: Enable color palettes for sculpt vertex colors
Enables the color palette subpanel for brushes that have color
capabilities (only the paint brush for now)

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8268
2020-07-13 17:51:12 +02:00
Bastien Montagne 8dd2386a68 IDTemplate: Minor tweak to 'make local/override' code.
Only update pointer of the template if we actually changed it...
2020-07-13 17:43:22 +02:00
Bastien Montagne fcc91faf3f Fix (unreported) bad handling of undo for some IDTemplates operations. 2020-07-13 17:03:39 +02:00
Jacques Lucke 91e67c7bda Cleanup: remove some incorrectly placed consts
Clang-tidy reported that those parameters could be const,
but that is not true on windows.
2020-07-13 16:55:39 +02:00
Bastien Montagne 3d587efef2 LibOverride: Cleanup: Remove option to disable library overrides.
Code is mature enough now to not need this anymore, people who do not
want to use liboverrides can just not create them.
2020-07-13 16:45:55 +02:00
Germano Cavalcante 5c8dd2a703 Cleanup: silence warnings 2020-07-13 11:40:21 -03:00
Ray Molenkamp 3dcc7c73e2 MSVC: Fix build error with the 8.1 SDK
shobjidl_core.h only exists in the windows 10 SDK in the 8.1
SDK ShObjIdl.h will have the definitions we need, which still
exists in the 10 SDK and implicitly includes shobjidl_core.h.

so ShObjIdl.h will work on both SDK versions.
2020-07-13 08:38:31 -06:00
Szymon Ulatowski 29da019cb3 EEVEE: Fix sky zenith bug
Careless use of acos() in spherical coordinates transformation was
deteriorating the precision near zenith (and nadir) and producing
glitchy pixels (best seen in longer focal lengths).

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D8266
2020-07-13 17:08:58 +02:00
Bastien Montagne 16989c4d1d Fix T78037: fresh install of blender 2.83.0 not able to save user startup file.
Simply remove that check ob userdef's themes, we are never read any
userdef from startup file anymore, so this check makes no more sense.

To be backported to 2.83.
2020-07-13 16:17:35 +02:00
Sebastián Barschkis 952279a366 Fix T76687: [Mantaflow] low domain transformation performance
Implemented G.moving suggestion from comments.
2020-07-13 16:15:43 +02:00
Sybren A. Stüvel 2be7a11e43 Python API: new RNA property `Screen.is_scrubbing`
This commit adds a new read-only boolean property `Screen.is_scrubbing`.

The related property `Screen.is_animation_playing` is set to `True` in
two situations:

- Animation is actually playing (for example via the Play button in the
  timeline)
- The user is scrubbing through time (in the timeline, dopesheet, graph
  editor, etc.)

To distinguish between these two cases, the property
`Screen.is_scrubbing` has been added.

Concept approved by @brecht.
2020-07-13 15:26:00 +02:00
Sybren A. Stüvel b9f565881e VSE: Python API, allow creation of VSE Movie strips with missing file
It was already possible to create Sound and Image strips that reference
non-existing files. Now it's also possible to create Movie strips
referencing missing files via the Python API call
`Sequences.new_movie()`. In this case, the duration of the strip will be
set to 1 frame.

Note that this commit does not change anything in the user interface.

The Python API of the `MovieStrip` class is extended with a function
`reload_if_needed()`. This function only performs disk I/O if the movie
strip cannot produce frames, that is either when its filepath points to
a non-existing file, or when the video sequence editor has not been
shown yet (for example because it is in an inactive workspace).

This allows for the following:

```
import bpy

scene = bpy.context.scene
vse = scene.sequence_editor_create()

filepath = bpy.path.abspath('//demo.mkv')
strip = vse.sequences.new_movie("movie", filepath,
    channel=2,
    frame_start=47,
    file_must_exist=False)
strip.frame_final_end = 327
```

This will create a new movie strip, even when `demo.mkv` does not exist.

Once `demo.mkv` has appeared at the expected location, either
`strip.reload_if_needed()` or `strip.filepath = strip.filepath` will
load it.

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

Reviewed By: Sergey, ISS
2020-07-13 15:09:18 +02:00
Bastien Montagne 9db0c36af1 LibOverride: add more polling checks to operators not supposed to work on overrides.
This is long work, we are still likely missing a lot of cases...
2020-07-13 14:29:54 +02:00
Bastien Montagne 03c8b048a1 Cleanup: remove public unused function. 2020-07-13 14:29:54 +02:00
Germano Cavalcante 9c9eb03d78 Fix T78855: Knife tool crashes when the geometry has no face
I don't see the need for a BVH Tree to have root but not have leafs.
But apparently this case is possible.
2020-07-13 08:59:47 -03:00