Commit Graph

75472 Commits

Author SHA1 Message Date
Clément Foucault
742119bcb5 Fix T68826 Eevee: Multi-Mat not working if switching from Solid shading
The correct fix would be to avoid all those hacks but this is needed if
we want to be able to parallelize object vbo extractions.

This is the fixed version of the hack. The issue was that the ibo ranges
were saved before the batch were reset and the IBO was discarded, leading
to a read after free error. All previous reported crash were tested and
are now not reproductible.
2019-08-26 15:43:28 +02:00
Bastien Montagne
16c1b10ed2 Fix T69146: Segment Fault using Undo for file with several scenes and script.
The specifc bug here came fro; some IDProperties ID pointer storing
references to workspaces.

But that was actually a main loophole in that 'unndoing data while
keeping same UI' process, as we never know who might store a pointer to
one of those datablocks that we want to keep the 'old' version off.

It might actually be ever more needed when we start undoing (changing)
only the IDs actually modified in an undo step...

Notes:
* While not ideal, I think we can afford an extra looping over the whole
Main DB here... Remapping process in itself is fairly cheap, thanks to
the hashes.
* This commit is considered rather risky (especially thanks to 'private'
IDs), think it should work fine for now, unless some IDPointers start
storing references to private IDs...

Once D5559 is in, we shall do another pass here, probably also forbids
assigning private IDs to IDProperties, etc.
2019-08-26 14:51:30 +02:00
Brecht Van Lommel
b5daed9680 Cleanup: fix compiler warning 2019-08-26 13:47:00 +02:00
Brecht Van Lommel
2778754925 Cleanp: fix compiler warnings 2019-08-26 11:27:04 +02:00
Campbell Barton
b2608af702 Gizmo: match the DOF gizmo size with the non-gizmo indicator 2019-08-26 17:12:42 +10:00
Campbell Barton
c70e6a2e21 Fix T69153: Camera DOF gizmo fails
Regression from bc3139d792
2019-08-26 17:04:47 +10:00
Campbell Barton
abd1a2d07d Gizmo: report error when property isn't found
Also add assert so this doesn't go unnoticed, see: T69153
2019-08-26 16:58:26 +10:00
Campbell Barton
db851c78b4 Transform: support snapping origins onto the objects geometry
Normally it wouldn't make sense for the object to snap onto it's self,
when moving origins this is a common use-case.
2019-08-26 14:40:00 +10:00
Campbell Barton
7b61fe1638 Cleanup: use BLI_assert 2019-08-26 14:32:35 +10:00
mano-wii
8d03e04493 Fix assert restricting allowed operation 2019-08-26 01:18:40 -03:00
Campbell Barton
22822b0572 Cleanup: unused arg 2019-08-26 12:20:02 +10:00
Harley Acheson
fd9614de0c UI: Dim Disabled Menu Items on Hover
Dims the text and background of disabled menu items while mouse is hovering.

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

Reviewed by William Reynish
2019-08-25 12:01:29 -07:00
Antonio Vazquez
b876fe3f3d GPencil: Show edit points in Sculpt only if mask is enabled
If the masks are disabled, the edit points must not visible.
2019-08-25 20:56:09 +02:00
Gaia Clary
de0fc96dfe cleanup: collada: removed unused public class variable 2019-08-25 19:38:12 +02:00
Gaia Clary
2f1604cef7 fix: Removed Debug statement from Collada CMakeLists. cmake now silently determines which collada library version it uses 2019-08-25 19:38:12 +02:00
Charlie Jolly
f2c3dc94b1 Fix T69127: Node sockets location bug after a keyframe is inserted 2019-08-25 16:37:06 +01:00
Antonio Vazquez
63533a0c7d Cleanup: Clarify alloc comment text 2019-08-25 17:13:13 +02:00
Antonio Vazquez
a67f218b54 GPencil: Use evaluated data for Sculpt Brushes
As part of T66294 is needed to use the evaluated data for Sculpt brushes to make possible to Sculpt a transformed stroke.

Without this commit, it was impossible sculpt the stroke if the modifier moves away the stroke point from original position. Also, some calculation is done in order to determine the rotation to transform the brush effect too.
2019-08-25 16:04:23 +02:00
Campbell Barton
6917ac06a2 Fix error accessing a named UV layer when baking 2019-08-25 16:45:47 +10:00
Campbell Barton
755c11c3db Curve: remove tessface calculation when calculating modifiers
- All parts of the code that need tessface should calculate it on demand.
- The check for tessloopnormal mask isn't correct
  (since this is loop data, not tessface data).
2019-08-25 16:45:47 +10:00
Campbell Barton
6eadd40597 Cleanup: redundant struct declarations 2019-08-25 16:45:47 +10:00
Campbell Barton
f1ddc6ed0a Cleanup: clang-format 2019-08-25 16:45:47 +10:00
Campbell Barton
8df6673165 Cleanup: skip adding tessface loop & color layers
Also correct check in unused poll function
2019-08-25 16:45:47 +10:00
Campbell Barton
7585d47b36 Cleanup: remove UV name syncing function
MTFace's on the mesh are now only used for conversion.
There is no need to keep both UV layers in sync at once.
2019-08-25 16:45:47 +10:00
Campbell Barton
5572986aad Cleanup: rename mesh looptri/tessface functions
Use consistent terminology.
2019-08-25 16:45:47 +10:00
Campbell Barton
2626a6fca2 Cleanup: remove tessface check when entering edit-mode 2019-08-25 15:49:32 +10:00
Campbell Barton
bada34c766 Cleanup: remove BKE_mesh_calc_normals_tessface
This was used for versioning, now normals are calculated after
initializing MPoly data.
2019-08-25 15:49:26 +10:00
Campbell Barton
4ab50eb7fa Cleanup: remove unused ED_mesh_*_tessface functions 2019-08-25 15:06:12 +10:00
Campbell Barton
f8d7993eec Cleanup: remove unused DM_to_mesh function 2019-08-25 14:09:09 +10:00
Campbell Barton
19f27cf3e9 RNA: remove Mesh.update() calc_loop_triangles argument
This calculated tessfaces, not loop-triangles.

Remove this since they aren't accessible from RNA anymore.
2019-08-25 12:39:15 +10:00
Campbell Barton
17e1c97e43 Cleanup: remove USE_TESSFACE_DEFAULT define 2019-08-25 12:21:09 +10:00
Campbell Barton
d42a23b31a Cleanup: remove tessface loop from set-smooth function 2019-08-25 12:08:18 +10:00
Antonio Vazquez
6bb2912704 GPencil: Fix unreported unable to deselect when masking is OFF
When the mask is disabled, all select operators must be disabled, but the deselect all operator must work or it's impossible to deselect.
2019-08-24 17:59:32 +02:00
mano-wii
a53ed1e049 Fix crash when snapping ruler 2019-08-24 09:21:13 -03:00
mano-wii
3437fcf2f1 BKE_bvhutils: implement hiden check
Accidentally unused in rB7c3bbe93aaa2
2019-08-24 09:20:55 -03:00
Antonio Vazquez
091e7979d3 GPencil: Use evaluated data in selection
Now the selection is using the position after evaluating the modifiers and makes possible to select a stroke point that has been moved from the original location.

Related to T66294
2019-08-24 13:46:00 +02:00
Antonio Vazquez
b1ed72f152 Cleanup: use eval as suffix
Follow conversion already used in most places.
2019-08-24 13:27:08 +02:00
Campbell Barton
8b806b8e64 Fix object origin transform with vertex snapping 2019-08-24 21:23:04 +10:00
Antonio Vazquez
b7f786c0b1 GPencil: Fix typo error 2019-08-24 09:02:42 +02:00
Philipp Oeser
ae0b855a32 Fix T68807: smoothing group issue
Showed in OBJ export.
Caused by comparison mistake in rB2e91fc39ac7.

Reviewers: mont29

Maniphest Task: T68807

Differential Revision: https://developer.blender.org/D5561
2019-08-24 08:50:58 +02:00
Campbell Barton
c9923baf84 Fix BKE_bvhtree_from_editmesh_get not setting cached value
The stored value was always false because of shadowing.

Also disable unused code.
2019-08-24 12:16:30 +10:00
Campbell Barton
fd43854fa3 Cleanup: use doxy sections for editfont 2019-08-24 12:06:58 +10:00
Campbell Barton
dc434bc273 Cleanup: correct use of term 'split' 2019-08-24 12:06:58 +10:00
Campbell Barton
67d9647ae4 Cleanup: use eval as a suffix
Follow conversion already used in most places.
2019-08-24 12:06:58 +10:00
mano-wii
a68e8ac993 BKE bvhutils: create and use new BKE_bvhtree_from_editmesh_get
With this function it is easier to create and have control over editmeshes `BHVtree`s.
2019-08-23 19:51:18 -03:00
William Reynish
4c353205ea UI: Various tooltip corrections and fixes
Patch by Yevgeny Makarov (jenkm)

Differential Revision: D5514
2019-08-24 00:45:21 +02:00
Campbell Barton
acdb14d264 Transform: option to transform origins in object mode
Currently supports mesh, armature, lattice, curve & metaballs.

Access from pivot popover.
2019-08-24 07:34:43 +10:00
Campbell Barton
71c43e9225 Cleanup: unused args 2019-08-24 07:34:43 +10:00
Antonio Vazquez
ee4ec69b28 Fix T66924 : Move GPencil Modifiers evaluation to Depsgraph
Before, the evaluation of modifers were done in draw manager. The reason of the old design was grease pencil was designed before depsgraph was in place.

This commit moves this logic to depsgraph to follow general design and reduce Draw Manager complexity. Also, this is required in order to use modifiers in Edit modes.

Really, there is nothing really new in the creation of derived data, only the logic has been moved to depsgraph, but the main logic is the same. In order to get a reference to the original stroke and points, a pointer is added to Runtime data as part of the evaluated data. These pointers allow to know and use the original data.

As the modifiers now are evaluated in Depsgraph, the evaluated stroke is usable in Edit modes, so now it's possible to work with the evaluated version instead to use a "ghost" of the final image over the original geometry as work today.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5470
2019-08-23 23:10:48 +02:00
Brecht Van Lommel
f16a28c4af Revert "Fix T68826 Eevee: Multi-Mat not working if switching from Solid shading"
This reverts commit d357e7b065. This caused crashes in UV editor drawing and
updates in lookdev mode.

Fixes T69087, T69083, T69088, T69096.
2019-08-23 20:32:51 +02:00