Germano
2d2875fc15
BKE: bvhutils: Always return NULL when the BVHtree has no leafs.
...
BLI_bvhkdop functions were not made to work with zero-leaf trees.
Perhaps a better solution would be to modify BLI_bvhkdop to work with zero leaf trees.
But this solution of returning NULL was already used for bvhtrees of looptris.
2018-05-08 20:31:26 -03:00
Germano
7fd19bcbe1
BKE: bvhutils: Port bvhtree_from_mesh_get to take a Mesh param instead of a DerivedMesh.
...
Differential Revision: https://developer.blender.org/D3227
2018-05-08 20:00:51 -03:00
Campbell Barton
4f213c1495
Cleanup: naming (prefer len over num for new code)
2018-05-08 19:36:02 +02:00
Campbell Barton
305c455ffe
Cleanup: mesh_runtime naming
...
- BKE_mesh_get_looptri_num -> BKE_mesh_runtime_looptri_len
- BKE_mesh_runtime_recalc_looptri -> BKE_mesh_runtime_looptri_recalc
- BKE_mesh_get_looptri_array -> BKE_mesh_runtime_looptri_ensure
2018-05-08 19:26:36 +02:00
Campbell Barton
65ae4e27b0
Missed last commit
2018-05-08 19:16:33 +02:00
Campbell Barton
6e88075618
Merge branch 'master' into blender2.8
2018-05-08 19:15:58 +02:00
Bastien Montagne
9a055d1abc
Modifier stack: partial port of ShrinkWrap to new Mesh-based system.
...
Partial only, complete depends on BVHTree helper updates, and subsurf
updates.
2018-05-08 19:04:12 +02:00
Campbell Barton
e0a436fcff
Cleanup: includes
2018-05-08 18:01:47 +02:00
Campbell Barton
0012082c10
Cleanup: move mesh conversion into own function
2018-05-08 17:54:25 +02:00
Brecht Van Lommel
e6d11c6ce6
Collections: remove per collection and view layer engine overrides.
...
This will be handled by the new view layer override system which will
store data elsewhere, removing the code already for easier refactoring.
2018-05-08 17:46:20 +02:00
Campbell Barton
03dd109a84
Cleanup: consistent BKE_mesh naming
2018-05-08 17:28:43 +02:00
Campbell Barton
00127d03f1
Cleanup: use bool for BKE_mesh_new_from_object
2018-05-08 17:17:40 +02:00
Campbell Barton
7522af49a3
Cleanup: rename variables
...
DerivedMesh had some odd conventions, remove from BKE_mesh.
2018-05-08 17:15:23 +02:00
Campbell Barton
0e964afaa4
Cleanup: use 'nomain' when not in library data
...
Rename only.
2018-05-08 17:06:30 +02:00
Campbell Barton
fa69ce9e3a
Cleanup: whitespace, duplicate includes
2018-05-08 16:57:07 +02:00
Bastien Montagne
43be434310
Merge branch 'master' into blender2.8
...
Conflicts:
source/blender/modifiers/intern/MOD_dynamicpaint.c
source/blender/modifiers/intern/MOD_uvproject.c
2018-05-08 16:06:32 +02:00
Bastien Montagne
4e4a93bc45
Fix building with latest versions of ffmpeg.
...
Some years-old deprecated stuff has now been removed.
Correct solution is probably to use valid defines etc. in own code, but
this is more FFMEPG maintainer task (since it also may change how old
FFMPEG we do support...).
2018-05-08 16:00:52 +02:00
Bastien Montagne
53a56b7b6c
Merge branch 'master' into blender2.8
2018-05-08 15:20:18 +02:00
Bastien Montagne
3740f7593d
Cleanup: Nuke empty dummy wrappers around modifier_copyData_generic().
...
This also changes signature of modifier copy callback, first (source)
parameter is now a const, which is saner anyway!
2018-05-08 15:04:10 +02:00
Bastien Montagne
029d3fa8b6
Mesh normals: clear runtime dirty normal flag also when computing clnors.
2018-05-08 12:01:06 +02:00
Sybren A. Stüvel
1c0be0e90f
Ported Mesh Deform modifier
...
This modifier still has issues that are not related to this port:
- While editing the deformation mesh, the deformed mesh doesn't update.
This update only happens after exiting edit mode, making editing
cumbersome.
- Binding doesn't work yet. It works fine when binding in master and
loading pre-bound in 2.8. This was also an issue before this port, and
will be investigated separately.
2018-05-08 11:46:28 +02:00
Sybren A. Stüvel
abb58eec53
looptri + bvhtree support for Mesh
2018-05-08 11:36:48 +02:00
Bastien Montagne
fdc967e616
Modifiers stack: port Curve to new Mesh-based system.
2018-05-08 11:05:49 +02:00
Bastien Montagne
50e31136fd
Rename BKE_bmesh_to_mesh to BKE_bmesh_to_mesh_nomain.
...
Let's be clear about functions generating datablocks outside of Main
database.
2018-05-08 11:04:20 +02:00
Sybren A. Stüvel
cf7c3462ed
BKE_mesh_new → BKE_mesh_new_nomain
...
Including 'nomain' in the name explicitifies that the returned mesh is
NOT stored in any library.
2018-05-08 11:00:34 +02:00
Sybren A. Stüvel
66b1cd45fb
Added BKE_mesh_ensure_normals()
...
This calls BKE_mesh_calc_normals() only if the mesh vertex normals are
marked as dirty.
2018-05-08 10:47:00 +02:00
Sybren A. Stüvel
42dfbf79c3
Added BKE_mesh_new()
...
This function creates a Mesh struct with a number of vertices/edges/etc.
It allocates the minimal number of CD layers needed.
Currently not yet used, but will be soon in the upcoming
BKE_new_mesh_from_curve_displist().
2018-05-08 10:47:00 +02:00
Mai Lavelle
b626360857
Add note about compat code in uber eval causing modifiers to be applied twice
2018-05-08 02:47:49 -04:00
Bastien Montagne
56f7b4616a
Merge branch 'master' into blender2.8
2018-05-07 18:04:16 +02:00
Campbell Barton
b49184b608
Merge branch 'master' into blender2.8
2018-05-07 18:02:48 +02:00
Bastien Montagne
c09e22306a
Fix (unreported) memleak when copying object with some modifiers.
2018-05-07 17:59:23 +02:00
Campbell Barton
f74d85ffc8
Cleanup: rename char/float conversion functions
...
- FTOCHAR -> unit_float_to_uchar_clamp
- F3TOCHAR3 -> unit_float_to_uchar_clamp_v3 (swap args)
- F4TOCHAR4 -> unit_float_to_uchar_clamp_v4 (swap args)
- FTOUSHORT -> unit_float_to_ushort_clamp
- USHORTTOUCHAR -> unit_ushort_to_uchar
2018-05-07 17:51:40 +02:00
Joshua Leung
6c2588761c
Fix: Left in debug prints
2018-05-07 16:55:13 +02:00
Joshua Leung
e7eee7764a
Fixes for motion path evaluation (part of T54810 work)
...
This commit brings back motion path calculations working on same level
as 2.7x. Caveats:
* You cannot actually see anything, as all the drawing code for motion
paths was removed and not reimplmented in 2.8 draw engines yet
* This doesn't actually use a separate depsgraph instance for fast
background calculations yet. That's a separate topic, and will require
further investigation (probably after code quest, according to original
planning).
* The work here *does* however pave the path forwards towards fully separate
COW evaluation though. We only need to stub in a different depsgraph instance
here to get things working.
2018-05-07 16:52:51 +02:00
Bastien Montagne
ca6dfa2e85
Clear dirty normals flag from Mesh at least in main BKE_mesh_calc_normals().
2018-05-07 14:37:56 +02:00
Bastien Montagne
4e2125e967
Modifier stack: Fix broken 'dirty normals' flag for new mesh-aware modifiers.
...
Since modifier stack is still primarily based on DM in blender2.8, we
need to copy over 'dirty normals' flag from temp Mesh to DM after
modifier has been evaluated.
2018-05-07 12:29:20 +02:00
Campbell Barton
4163beb818
Merge branch 'master' into blender2.8
2018-05-06 09:02:47 +02:00
Campbell Barton
9e3bfd9210
IDProp API: use stored string length for IDP_repr
...
Also NULL check ID pointers.
2018-05-06 08:57:19 +02:00
Brecht Van Lommel
b365cc017a
3D Viewport: move overlay settings from collections to 3D viewport.
...
For some we may add per object overrides, but for most we plan to keep them
strictly per viewport settings. Display settings from the mesh still need to
be moved here, only collections were done to remove that code.
2018-05-05 15:54:43 +02:00
Brecht Van Lommel
2094b45447
3D Viewport: make shading and overlay DNA match UI names.
...
We should use consistent naming between the internal code and UI whenever
possible, only reason not to is file compatibility.
2018-05-05 15:54:36 +02:00
Campbell Barton
29aa531e51
Merge branch 'master' into blender2.8
2018-05-05 14:42:15 +02:00
Campbell Barton
d3b3df0371
IDProp API: add native C repr function
...
Was using Python which wasn't very efficient (even for logging).
2018-05-05 14:41:25 +02:00
Campbell Barton
f91e9529da
Merge branch 'master' into blender2.8
2018-05-05 09:57:45 +02:00
Campbell Barton
86c2c4d513
IDProp API: Avoid redundant group replace lookup
2018-05-05 09:31:17 +02:00
Germano
26d87bd577
Merge branch 'master' into blender2.8
2018-05-04 11:58:55 -03:00
Germano
b27b4743a2
BKE: bvhuils: remove member sphere_radius.
...
This member currently doubles the value of `ray->radius` or is not even used.
2018-05-04 11:57:01 -03:00
Germano
3b25b25752
Merge branch 'master' into blender2.8
2018-05-04 11:25:40 -03:00
Germano
02788a9d1a
Fix erroe in previous commit.
2018-05-04 11:22:50 -03:00
Germano
2439ac2202
Merge branch 'master' into blender2.8
2018-05-04 11:16:13 -03:00
Germano
e78ef82827
BKE: bvhutils: Unifies static functions oh bvhtrees creation.
2018-05-04 11:15:21 -03:00