Commit Graph

84463 Commits

Author SHA1 Message Date
Campbell Barton
5e82e77112 Cleanup: remove redundant code/comments from BKE_mesh_nomain_to_mesh 2021-04-20 15:28:27 +10:00
Campbell Barton
b760481f8d Merge branch 'blender-v2.93-release' 2021-04-20 15:21:25 +10:00
Campbell Barton
72fec0f7c5 Fix T87055: Crash applying modifier on mesh with multires data 2021-04-20 15:17:48 +10:00
Campbell Barton
ebe04bd3ca PyAPI: support Operator.poll functions 'disabled' hint
Python scripts can now define the reason it's poll function fails using:

`Operator.poll_message_set(message, ...)`

This supports both regular text as well as delaying message creation
using a callback which should be used in situations where constructing
detailed messages is too much overhead for a poll function.

Ref D11001
2021-04-20 12:07:01 +10:00
Campbell Barton
985ccba77c Cleanup: add CTX_wm_operator_poll_msg_clear
Call this function instead of `CTX_wm_operator_poll_msg_set(C, NULL)`
2021-04-20 11:42:00 +10:00
Brecht Van Lommel
795f024558 Merge branch 'blender-v2.93-release' 2021-04-19 22:49:14 +02:00
Brecht Van Lommel
0566ebdebe Fix crash with Alembic export after recent persistent data bugfix
We weren't clearing the recalc flags for that case.
2021-04-19 22:39:36 +02:00
Brecht Van Lommel
2d1d6fbb23 Merge branch 'blender-v2.93-release' 2021-04-19 21:07:42 +02:00
Hans Goudey
68cbf0a2be Cleanup: Clang tidy, clang format 2021-04-19 13:48:25 -05:00
Brecht Van Lommel
cedd8b8c56 Fix T87535, T87295: issues with new persistent data option
Some persistent data code was disable due to a deeper design issue, which
meant some updates were not communicated to renderers.

Dependency graph updates work in two passes, once where Blender scene
animation updates are done, then app handler scripts can run to make further
scene modifications, and then the depsgraph is updated again to take those
into account.

Previously the viewport would update renderers twice when such app handler
scripts were present. Now both viewport and persistent data rendering update
the renderers only once, accumulating updates from both passes.
2021-04-19 20:00:00 +02:00
Hans Goudey
c13b3dd168 Merge branch 'blender-v2.93-release' 2021-04-19 12:32:14 -05:00
Hans Goudey
d7caae56c4 Fix T87567: Crash adding item in empty attribute search
The function applying the search used the dummy search info for when
the item doesn't exist even when there was no UI data associated with
the node at all.

A fix is to only add the search menu when there is attribute info
stored for the node. This is something I wanted to do anyway, since
it makes it look more purposeful when there are no attribute info
for a node, less like a bug.

Differential Revision: https://developer.blender.org/D11016
2021-04-19 12:31:18 -05:00
Hans Goudey
2dc5961874 Merge branch 'blender-v2.93-release' 2021-04-19 12:25:45 -05:00
Hans Goudey
b8b7b47a00 Fix T85223: Some modifier panels can dissapear in old files
The problem is that each uiBlock needs to be assigned a unique name,
but when there can be multiple modifiers of the same type, we use the
panel sort order for the unique part of the string. However, the most
recent test file has 1200+ panels in the property editor, so 4
characters isn't enough for a unique string.

That's not a situation I expected, but it makes sense, because we don't
remove legacy panels with unused types when loading old files. So they
tend to accumulate a bunch of unused panels. That's why this works fine
with a new property editor, it doesn't all of the extra old panels.

These panels must be stored for the expansion status and order, but
arguably we could cull unused panels on save. However, simply increasing
the length of the unique panel string is a valid fix in this situation.
In the future, we can look into removing unused panels when saving.
2021-04-19 12:25:25 -05:00
Hans Goudey
458cbcbfea Merge branch 'blender-v2.93-release' 2021-04-19 11:12:42 -05:00
Hans Goudey
6f761c7110 Fix T87392: Copy modifier to selected does not do anything
This was caused by a stupid copy & paste error in rB9f323e9bf79fbf4157a.
2021-04-19 11:11:48 -05:00
Antonio Vazquez
8032bd98d8 GPencil: Add Layer Mask ordering buttons
Now the list of masks can be ordered as is done in Layers.

This can be used to organize list and in the future refquired for new masking options.
2021-04-19 17:44:40 +02:00
Antonio Vazquez
f99f884444 GPencil: Rename Draw" mode to Draw Mode` 2021-04-19 17:12:39 +02:00
Campbell Barton
feedf28549 Changes missed from 4402c2324b 2021-04-20 00:25:54 +10:00
Campbell Barton
4402c2324b Cleanup: use 'wmOperator.ptr' in draw functions
Draw functions used RNA_pointer_create to create the pointer,
however this already exists in the operator.
2021-04-20 00:14:37 +10:00
Antonio Vazquez
e1acefd45e GPencil: Add multiframe support to Reproject operator
Before only active frame was supported

Related to T87425
2021-04-19 15:58:41 +02:00
Campbell Barton
46a13482cb Cleanup: spelling 2021-04-19 23:56:12 +10:00
Campbell Barton
33440760a6 Merge branch 'blender-v2.93-release' 2021-04-19 23:54:06 +10:00
Campbell Barton
8245805ce3 Fix creating operator properties without an owner_id
Any dynamic enum access would not use the callback.
Always set the owner_id to avoid this causing problems.

Oversight in 919558854d
2021-04-19 23:52:59 +10:00
Falk David
eb06ccc324 Fix T87448: Avoid uiBut update if value was same
Previously, clicking into a number field, changing nothing and then
clicking outside the field again would trigger an update (RNA prop
would be set to the same value again). This could potentially cause
an expensive operation (like a modifer) to run again, even if all the
parameters were identical.

The fix prevents this by treating unchanging values in the field as a
cancel operation.

Reviewed By: Severin

Maniphest Tasks: T87448

Differential Revision: https://developer.blender.org/D10976
2021-04-19 12:20:05 +02:00
Brecht Van Lommel
c75b2019e1 Fix incorrect compositor denoise node message about SSE on macOS Arm
Ref T78710
2021-04-19 12:12:23 +02:00
Eitan
799f532f46 Geometry Nodes: new Switch node
This is a first iteration of a switch node. It can only switch between
two inputs values based on a boolean. A more sophisticated switch
node that has an integer selector will probably come later.

Currently, the geometry nodes evaluator does not support lazy evaluation
of individual inputs. Therefore, all inputs will be computed currently.
An improvement to the evaluator will be worked on separately.

Ref: T85374

Differential Revision: https://developer.blender.org/D10460
2021-04-19 10:38:50 +02:00
Campbell Barton
112fb77157 Merge branch 'blender-v2.93-release' 2021-04-19 17:36:59 +10:00
Campbell Barton
1d96493c2f Merge branch 'blender-v2.93-release' 2021-04-19 17:36:56 +10:00
Campbell Barton
969cc22a89 Merge branch 'blender-v2.93-release' 2021-04-19 17:36:54 +10:00
Campbell Barton
eae39a4973 Merge branch 'blender-v2.93-release' 2021-04-19 17:36:51 +10:00
Campbell Barton
6dffdb02fa Fix drag event leaving the gizmo not under the cursor highlighted
Prevent drag events from changing the highlighted gizmo
unless the drag event activates the gizmo.

This resolves a glitch where testing a drag event would highlight
at the point the drag was initiated even when the event was not handled.
2021-04-19 17:18:59 +10:00
Campbell Barton
3b4b231be5 Cleanup: re-order gizmo handling checks
Non-functional change in preparation for fix.
2021-04-19 17:18:57 +10:00
Campbell Barton
0b903755a9 Fix spin-gizmo not allowing click events to select vertices 2021-04-19 17:18:52 +10:00
Campbell Barton
9175911ffa Fix spin-gizmo button tool-tip placement
gizmo_button2d_bounds result wasn't valid when the gizmo was part
of a 3D gizmo group.

Regression in cf6d17a6aa
2021-04-19 17:17:49 +10:00
Germano Cavalcante
0af28f007f Cleanup: Rename variables to indicate what is evaluated
`ob` --> `ob_eval`
`me` --> `me_eval`
`em` --> `em_eval`
2021-04-19 00:24:43 -03:00
Germano Cavalcante
950d8360f8 Fix typo in previous commit
`has_loose_edge` -> `has_loose_vert`
2021-04-18 20:45:06 -03:00
Germano Cavalcante
1825e67dea Transform Snap Object: Improve code that detects updates
The previous code had unclear hacks to avoid updating while transforming,
it was also duplicated in two functions causing an inconsistent
initialization of the looptris bvhtree (which could even generate
unpredictable snapping results).

Now, detection update and inicializatiom of common members are contained in
`snap_object_data_mesh_get` and `snap_object_data_editmesh_get`.

Also, the "Hack to avoid updating while transforming" is more evident.
2021-04-18 20:07:05 -03:00
Germano Cavalcante
c8dd684b65 Cleanup: Use utility to init userdata in 'transfrom_snap_object.c'
This deduplicates the code making it easier to edit.
2021-04-18 20:07:05 -03:00
Germano Cavalcante
6879868814 Merge branch 'blender-v2.93-release' 2021-04-18 20:06:32 -03:00
Germano Cavalcante
063c9938f1 Fix snap mixed with vertices ignored for meshes with vertices only
The logic assumed that there were only 3 basic snapping modes.
2021-04-18 20:04:58 -03:00
Hans Goudey
9a69653b42 Merge branch 'blender-v2.93-release' 2021-04-18 11:59:36 -05:00
Hans Goudey
06888a8970 Fix compile warning
The order of the two parameters was incorrect.
2021-04-18 11:58:44 -05:00
Jacques Lucke
76eae59648 Cleanup: make format 2021-04-18 09:51:03 +02:00
Jacques Lucke
01448ee7ce Cleanup: clang tidy readability-else-after-return 2021-04-18 09:49:14 +02:00
Germano Cavalcante
8d30a7a1cf Merge branch 'blender-v2.93-release' 2021-04-17 17:13:12 -03:00
Germano Cavalcante
4bce9c5283 Fix memory leak in the BLI_bitmap created in 'looptri_no_hidden_map_get' 2021-04-17 16:55:59 -03:00
Germano Cavalcante
1544bcfc37 Measure Tool: Snap to Cage Geometry
For Measure tool, it is more useful to snap to what is really visible.

So use the cage instead of the geometry that may be hidden with Bmesh.
2021-04-17 16:51:19 -03:00
Germano Cavalcante
4e1507bd3b Snap Gizmo Refactor: Implement options for the gizmo behavior
The Snap Gizmo now has options for occlusion, selection filter and edit
geometry.

It will be useful to implement in current tools.
2021-04-17 16:51:19 -03:00
Germano Cavalcante
1fc446a908 Fix recent snap refactor
It is important to check if editmesh eval cage is also bmesh.
2021-04-17 16:50:49 -03:00