Commit Graph

105049 Commits

Author SHA1 Message Date
Ankit Meel 1a100d2d78 Cleanup/CMake: tweak messages in platform_apple 2021-04-01 01:13:22 +05:30
Ankit Meel f061de9b3e Cleanup/CMake: warning to status to reduce noise
Correction in e5f0d176d4
2021-04-01 01:12:48 +05:30
Hans Goudey 910469eccf Cleanup: Remove remaining unused code for DispList "bevel_split"
This was added in rB93aeb6b318a7, last changed in rB8f0a44a5d55d,
and removed in rB51b796ff1528. I assume it was a way for curves to
have split edges at corners. As far as I can tell it only ever worked
in Blender Internal, and that has been gone for years.

Another possible route here would be restoring this functionality,
but it's generally preferrable to reduce complexity in this
area of curve code than adding it back, especially in the context
of other improvements planned related to curves in geometry nodes.

Differential Revision: https://developer.blender.org/D9966
2021-03-31 11:37:21 -05:00
Hans Goudey 46ee9b599a Fix T87094: Transforming geometry instances component is broken
Caused by an incorrect transformation order in cleanup commit
rBd037fef3bd1dc2e. The fix is to simply reverse the order.
2021-03-31 11:32:52 -05:00
Kévin Dietrich 94bfb1ab62 Alembic procedural: fix missing update when editing shaders 2021-03-31 17:18:32 +02:00
Kévin Dietrich 6f2e9e9f90 Alembic procedural: comment, speficy the behavior of a function 2021-03-31 17:18:32 +02:00
Kévin Dietrich 5580f64d80 Alembic procedural: cleanup, make add_object private
This should only be accessed from within the procedural.
2021-03-31 17:18:32 +02:00
Kévin Dietrich b4e584949c Alembic procedural: fix out of bound access when editing object properties or shaders
The index_data_map was not cleared when clearing a cache, so this would just append
the new correct data to the end of the array instead of overwriting it, which would
cause us to then use outdated indices.
2021-03-31 17:18:32 +02:00
Hans Goudey 4fd7b1f3db Geometry Nodes: Rename "Grid" to "Density"
For other "Attribute Name" fields we usually give a more specific name
that relates to what the attribute is actually used for, like "Mask" in
the point separate node. This is a similar situation, and would also
be consistent with the naming planned in D10506.
2021-03-31 10:10:44 -05:00
Jacques Lucke 482a42c0f6 Fix T87087: attributes were removed automatically even though they are still needed
The geometry nodes modifier did not specify that it needs all custom data layers.
Therefore the modifier evaluation code tagged some layers so that they will not be
copied later on by calling `mesh_set_only_copy` in `mesh_calc_modifiers`.
2021-03-31 16:25:39 +02:00
Antonio Vazquez 23bd6cff81 GPencil: Avoid LineArt modifier uses negative material index
In some situations the material index could be negative, and this is wrong.
2021-03-31 16:17:31 +02:00
Antonio Vazquez d55d4fee30 Fix compiler error in Windows
C7555	use of designated initializers requires at least '/std:c++latest'

This is not supported by the current Windows compiler version.
2021-03-31 16:01:18 +02:00
Antonio Vazquez 10272ca788 GPencil: Remove flag PROP_ID_SELF_CHECK from materials
This flag was used by error when the code of RNA object was used as base, but it's not logic in materials.
2021-03-31 15:50:48 +02:00
Howard Trickey 94079ffc7f Fix T86879 Boolean exact crash with dependency loop.
When boolean's Object also has a modifier that depends back on
the target Object, a crash occurred.
In a case like this, BKE_modifier_get_evaluated_mesh_from_evaluated_object
returns NULL, so just have to protect against that case.
2021-03-31 09:35:40 -04:00
Campbell Barton 23c1e48e19 Cleanup: naming for edit-mesh nearest distance values
- Don't use `r_` prefix for an argument that's also read from
  (this is meant for return only arguments).
- Rename variables to make it clear the distance is pixels,
  using manhattan length measurement.
2021-04-01 00:01:23 +11:00
Jeroen Bakker 5f787b290c Cleanup: Removed Unused Definition. 2021-03-31 14:47:38 +02:00
Jeroen Bakker bc837ad14e Fix: Cryptomatte Picker on Legacy Node Failing.
The new Cryptomatte workflow assumes that the picker is used in the new
workflow. The legacy node wasn't working as it would never find a
correct cryptomatte layer. This fix will use the color sampling like we
used to do.
2021-03-31 14:43:14 +02:00
Jeroen Bakker 1a7b94236e Compositor: Keep WorkPackages and Data Around.
WorkPackages struct was created when scheduled. This patch keeps the
WorkPackages around and stores additional data with the workpackages.

The speedup is to small to notice, but it is needed as preparation
to introduce a faster scheduling method.
2021-03-31 14:43:14 +02:00
Campbell Barton 14901e3774 Fix T87080: Select shortest path fails in face mode
Regression in 80cbbd2843.

Unfortunately keeping selection picking behavior as well as
supporting finding the nearest face within a radius requires an
inconsistency between x-ray and back-buffer selection that
doesn't work well using the current arguments.

Resolve by adding an argument that causes the input distance
to be ignored for back-buffer selection.

This is used by selection picking but not the knife tool.

This changes behavior for path-selection in face mode,
which now uses a margin for back-buffer selection.

From my own testing this doesn't seem to be a problem like it could be
for regular selection picking.
2021-03-31 23:36:51 +11:00
Falk David d97dca5106 Fix T86947: Drag & Drop tooltip in Scene mode
The tooltip while dragging a collection in Scene mode in the Outliner
was always "Link inside Collection" even if the action performed was
different. This was because the `collection_drop_init` set the
`from_collection` always to `NULL` if the Outliner display mode was
currently set to Scene.
Commit that introduced this issue:
rB0f54c3a9b75be8f8db9022fb0aeb0f8d0d4f0299

The fix removes the check of the display mode and only sets the
`from_collection` to `NULL` if the ctrl (linking) key is held.

Reviewed By: JacquesLucke

Maniphest Tasks: T86947

Differential Revision: https://developer.blender.org/D10864
2021-03-31 14:23:08 +02:00
Falk David 8d45a96789 Fix T87082: Smooth thickness not working
When using the smooth operator, the thickness would not be
smoothed on the first iteration. This was becasue the inner loop
was set to run `r * 20` times but `r` starts at 0.

The fix makes sure that "Smooth Thickness" works on the first
iteration by using  a fixed value of `20` as the loop limit. This
makes sure that for every iteration, we run the smoothing of the
thickness 20 more times.

Reviewed By: antoniov

Maniphest Tasks: T87082

Differential Revision: https://developer.blender.org/D10867
2021-03-31 14:19:01 +02:00
Ray Molenkamp f02e1a77c9 Makefile: add update_code target
Convenience target for updating the code, skipping SVN.

The Python script supports it, but this wasn't exposed in the makefile.

Ref D10457
2021-03-31 22:34:11 +11:00
Richard Antalik 4d856ecb11 Cleanup: Fix warnings
Introduced in b128ffd539
2021-03-31 12:34:44 +02:00
Jeroen Bakker e9616c82bd Cleanup: use constexpr for num channels.
Don't assume all compilers are smart. MSVC doesn't inline the call away like CLANG and GCC did.
2021-03-31 11:00:07 +02:00
Richard Antalik 645fc0c767 Fix build error on windows
Error was caused by using `#if` directive in `PyDoc_STRVAR` macro.

This partially reverts 1e4c35d910
2021-03-31 09:46:38 +02:00
Richard Antalik b128ffd539 Cleanup: Remove SEQ_CURRENT_BEGIN macro
Use LISTBASE_FOREACH instead.
SEQ_CURRENT_BEGIN did null checks, so now these must be explicit.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D10823
2021-03-31 09:27:31 +02:00
Campbell Barton 43369ca80e PyDoc: quiet warning with literalinclude including blank lines
Files that only contain a doc-string still included the last blank line,
since this normally contains code examples.

There are some cases where only a docstring exists
which made sphinx report warnings.
2021-03-31 17:47:31 +11:00
Campbell Barton d5f2043ab3 PyDoc: fix indentation with multi-line property descriptions
New lines were written without indentation,
causing invalid RST to be generated.
2021-03-31 17:43:30 +11:00
Campbell Barton 1e4c35d910 PyDoc: correct sphinx syntax for gpu.state.blend_set 2021-03-31 17:42:21 +11:00
Campbell Barton b547ac32d9 Cleanup: use early return for imbuf image loader functions
Most imbuf loaders already did this, use early exit for the remaining
loaders that didn't.
2021-03-31 17:05:57 +11:00
Campbell Barton e7f890aa59 WM: use data-path utility functions for WM operators
Use utility functions to decompose data paths and resolve the
RNA property from a data-path.
Replaces in-line string manipulation and RNA access.

This allows more complex data paths to be used, where previously string
literals in a data path could break the simple data-path handling logic.
2021-03-31 15:29:50 +11:00
Campbell Barton 1beca76934 PyAPI: add bl_rna_utils.decompose_data_path
Utility function for splitting an RNA path, to be used by `bpy.ops.wm.*`
2021-03-31 15:03:19 +11:00
Campbell Barton c59a7f44a1 Fix bl_rna_utils._TokenizeDataPath function argument extraction error
Converting functions with single arguments to a string
added an additional comma.
2021-03-31 15:01:44 +11:00
Campbell Barton 5678e6c2bc Cleanup: improve navigation gizmo flag use
Flag check for V3D_LOCK_CAMERA used boolean style assignment to a char,
which worked with this flag but could fail if other flags are added
that use this convention in the future.

- Add static type checks for values so any change to DNA types
  will need to be made in the navigation gizmo too.
- Move camera lock check from `rv3d` to `v3d`,
  as this isn't stored in the region data.
2021-03-31 13:04:12 +11:00
Harley Acheson 87aa514611 UI: Gizmo Button to Lock Camera to View
2D gizmo navigation button that toggles 'Lock Camera to View' while in Camera View.

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

Reviewed by Campbell Barton
2021-03-30 14:09:26 -07:00
Germano Cavalcante 1425411249 Cleanup/Refactor: Unify functions that redraw the depth buffer
Now `ED_view3d_backbuf_depth_validate`, `ED_view3d_draw_depth` and
`ED_view3d_draw_depth_gpencil` are unified in `ED_view3d_depth_override`.

This new function replaces `ED_view3d_autodist_init`.

Also, since `ED_view3d_depth_update` depends on the render context, and
changing the context is a slow operation, that function also was removed,
and the depth buffer cached is now updated inside the new unified drawing
function when the "bool update_cache" parameter is true.

Finally `V3D_INVALID_BACKBUF` flag has been renamed and moved to
`runtime.flag`.

Differential revision: https://developer.blender.org/D10678
2021-03-30 16:23:58 -03:00
Germano Cavalcante da1b002c8d UI: Skip undo steps when changing properties of the 3d cursor
Differential revision: https://developer.blender.org/D10695
2021-03-30 16:13:21 -03:00
Germano Cavalcante 54d7dea283 Fix: buttons whose property contains an 'owner_id' ignore rna undo check
Introduced in rBce462fa1 but harmless since curretly only `StructRNA`
without `owner_id` have the `STRUCT_UNDO` flag cleared.

So this commit does not bring any functional changes but it will be
useful for {D10695}.
2021-03-30 16:10:58 -03:00
Antonio Vazquez 67b40f829e Fix T87058: GPencil Cutter delete all strokes if they are selected and the layer is locked
The problem was produced because the strokes were selected, but the loop to clear this flag before applying cutter was using unlocked layers only, and the protected layer flag was not reset.

Now, the flag is reset for all layers, locked and unlocked.
2021-03-30 19:43:45 +02:00
Wannes Malfait 6ddd280b21 Nodes: Expose multi input socket in python API
It was not possible to determine if a socket was multi input previously
with BPY. This patch exposes the flag as a read-only property of a node
socket. This is important for addons which automatically add connections
between nodes.

Differential Revision: https://developer.blender.org/D10847
2021-03-30 10:15:23 -05:00
Hans Goudey 6ea09db7a1 Cleanup: Improve comment 2021-03-30 10:03:11 -05:00
Ankit Meel e5f0d176d4 CMake: issue warnings when changing options
Only done in top level CMakeLists, and platform_apple.

Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D10343
2021-03-30 20:28:45 +05:30
Hans Goudey 9f323e9bf7 UI: Bring back hover shortcuts for mesh modifiers
Earlier last year, the shortcuts on hover were built as a way to regain
speed lost by removing the "Apply" and "Copy" buttons from the panel.
For the active modifier concept introduced for geometry nodes, the
shortcuts were changed to only affect the active modifier.

Based on feedback, this change slowed down many people's interaction
with the modifier stack so the UI team decided to return hover shortcuts
for modifier panels.

The downside of this change is that it looks like the active modifier is
"selected" and it could be confusing that the modifier shortcuts don't
apply to it. We can explore different ways to display the active status
to address this.

Ref T87012
2021-03-30 09:56:04 -05:00
Germano Cavalcante 1f58a0ea3c Cleanup: use doxy sections and rearrange editmesh_knife.c 2021-03-30 11:50:05 -03:00
Hans Goudey b1380101df Geometry Nodes: Set default grid vertices to 3 by 3
This is a relatively arbitrary value, but a good starting point-- it's
simple while also showing the possibility of the subdivisions.

Ref T86819
2021-03-30 09:33:42 -05:00
Hans Goudey a4b6c222fa Fix unused variable warning caused by recent cleanup
Caused by a cleanup, rBd037fef3bd1dc.
2021-03-30 09:18:33 -05:00
Jeroen Bakker 88b5d7f5f3 Cleanup: remove unneeded method.
size can be accessed via instance attribute.
2021-03-30 16:03:43 +02:00
Jeroen Bakker 094c950915 Cleanup: clang-format. 2021-03-30 16:03:43 +02:00
Jeroen Bakker 88e0ed3288 Cleanup: Use constexpr. 2021-03-30 16:03:43 +02:00
Jeroen Bakker b48a573adb Compositor: Fix Incorrect Attaching NodeSockets.
Introduced by recent commit.
2021-03-30 16:03:43 +02:00