Commit Graph

1564 Commits

Author SHA1 Message Date
Christian Hubert
17ac0e824b Modifiers: ported Corrective Smooth DerivedMesh → Mesh
Reviewers: sybren

Differential Revision: https://developer.blender.org/D3339
2018-05-11 11:27:04 +02:00
Christian Hubert
e0a41fd0ce Modifiers: ported Decimate DerivedMesh → Mesh
Two things to indicate (which als apply before the DM → M port):

- Face count in the UI is not updated and stays at 0
- When planar mode is used, the result is inverted (mirrored along X)
  compared to 2.79

Reviewers: sybren

Differential Revision: https://developer.blender.org/D3303
2018-05-11 11:12:28 +02:00
Sybren A. Stüvel
4fe5a105f6 Fix bad pointer cast when modifier is used on non-mesh object 2018-05-11 10:14:35 +02:00
Campbell Barton
83a83a3d4b Cleanup: whitespace, duplicate includes 2018-05-11 07:43:20 +02:00
Christian Hubert
c67a0580fc Modifiers: ported Triangulate DerivedMesh → Mesh
Reviewers: sybren

Differential Revision: https://developer.blender.org/D3237
2018-05-09 16:14:22 +02:00
Christian Hubert
ed23bd5f3c Modifiers: ported Boolean DerivedMesh → Mesh
Reviewers: sybren

Differential Revision: https://developer.blender.org/D3236
2018-05-09 15:49:55 +02:00
Christian Hubert
65b0d31eb8 Modifiers: ported Hook DerivedMesh → Mesh
Differential Revision: https://developer.blender.org/D3235
2018-05-09 14:45:27 +02:00
Bastien Montagne
74234688de Modifier stack: ShrinkWrap: move to mesh-based BVHTree code.
Now only subsurf still needs some DM...
2018-05-09 12:51:53 +02:00
Bastien Montagne
e53cf14280 Cleanup/refactor: Move get_mesh_eval_for_modifier from MOD_util to BKE_modifier.
Because some modifiers' actual code is in BKE... Also renamed to more
BKE-valid name BKE_modifier_get_evaluated_mesh_from_object.
2018-05-09 12:47:23 +02:00
Sybren A. Stüvel
1cc7d7d5ec Surface Deform mod: removed some stuff that shouldn't have been committed 2018-05-09 12:41:32 +02:00
Sybren A. Stüvel
2862b58a38 Mesh Deform modifier: also show result while editing the deformation mesh
There is still an issue with the modified mesh not being updated until you
disable and re-enable the modifier. However, after that it'll now also work
while editing the deformation mesh.
2018-05-09 12:39:52 +02:00
Sybren A. Stüvel
632755a3b1 Modifiers: ported Surface Deform to Mesh
The modifier performed the 'bind' operation not in the bind operator,
but delayed in the mesh evaluation. This saved the result in a CoW copy
instead of in the actual modifier data. The binding operator now follows
the same approach as Mesh Deform: it forces the modifiers to run on the
real (non-CoW) data, making it possible for the modifier to store the
binding data.

This commit also ports the usage of DerivedMesh to Mesh.
2018-05-09 12:17:24 +02:00
Bastien Montagne
d152a326f9 Modifier stack: remove last usage of DM in WeightVGProximity . 2018-05-09 10:11:10 +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
Bastien Montagne
f7727b5366 Modifier stack: Port Warp to new Mesh-based system. 2018-05-08 18:41:43 +02:00
Bastien Montagne
8f7e4b314b Modifier stack: port Mask to new Mesh-based system. 2018-05-08 18:19:28 +02:00
Bastien Montagne
5f2a2e048d Modifier stack: Port Caqst to new Mesh-based system. 2018-05-08 17:52:53 +02:00
Campbell Barton
03dd109a84 Cleanup: consistent BKE_mesh naming 2018-05-08 17:28:43 +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
5b3559576d Modifier stack: Port Smooth to new Mesh-based system. 2018-05-08 16:42:01 +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
43e0e8defa Fix (unreported) bloody modifiers messing with ID user count in copy.
User count of IDs is handled by higher-level, generic function,
low-level copydata functions *MUST NOT* touch them anymore, ever!
2018-05-08 15:27:10 +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
b857b8f4c4 Merge branch 'master' into blender2.8 2018-05-08 14:22:46 +02:00
Bastien Montagne
49fe27ee46 Modifiers: sanitize/cleanup modifiers' copying & freeing code.
Should also fix T55000: Crash with hooks and curves in Cycles render.
2018-05-08 14:22:14 +02:00
Bastien Montagne
c51b017a1a WeightVG modifiers: Cleanup, add asserts to validate expected data status... 2018-05-08 12:58:48 +02:00
Sybren A. Stüvel
002dcd2001 Modifiers: pass the ob->data to the modifier if the mesh param is NULL
This enables the modifiers to access things like vertex groups. Care should
be taken to not modifier the mesh itself in this case.
2018-05-08 12:34:06 +02:00
Bastien Montagne
d8706f5407 Modifier stack: port Displace to new Mesh-based system. 2018-05-08 12:01:06 +02:00
Bastien Montagne
cd5b57b4fc Fix recent Curve porting: mesh pointer may also be NULL in non-EditMode case. 2018-05-08 12:01:06 +02:00
Bastien Montagne
0cd3412d4c Mod_util: Add back vcos parameter to get_texture_coords_mesh().
Now we use vcos when provided, and fall back to mesh vertices' co
otherwise.

Deform modifiers usually do not have up-to-date coordinates in Mesh
itself, only in given vcos array!
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
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
Bastien Montagne
3800be695b Modifier stack: move vgroup editing modifiers to new Mesh-based system.
Some notes here:
* Proximity with non-mesh objects (like curve, see TEST_2 scene in
weightvg testfile) are not working currently. This is known TODO of COW
depsgraph project.
* Proximity modifier is slower, due to some other TODO pending on
BVHTree creation/caching for Mesh.
2018-05-07 18:18:05 +02:00
Bastien Montagne
15f9ca05d1 Modifier stack: add new get_texture_coords_mesh() helper.
Will eventually fully replace get_texture_coords().
2018-05-07 18:18:05 +02:00
Campbell Barton
b49184b608 Merge branch 'master' into blender2.8 2018-05-07 18:02:48 +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
Bastien Montagne
13aa3de697 Modifier stack: port 'normals edit' to new Mesh-based system.
Note that custom normals drawing seems to be broken, and there also are
some refresh issues in some cases... But this is same with old DM-based
code, so not related to modifiers themselves probably.
2018-05-07 14:37:56 +02:00
Bastien Montagne
2496c08c39 Modifier stack: move Edge Split to new Mesh-based system. 2018-05-07 12:29:20 +02:00
Sergey Sharybin
68c5503570 Merge branch 'master' into blender2.8 2018-05-07 12:26:06 +02:00
Sergey Sharybin
ea1751a038 Fix T54594: Lattice with Armature modifier not updating correctly 2018-05-07 12:05:09 +02:00
Sybren A. Stüvel
d8a03c77d7 Allocate/free meshes with generic library functions.
This avoids the need to use Mesh-specific functions, and makes allocation
and freeing easy oneliners.
2018-05-04 14:02:58 +02:00
Philipp Oeser
52aa1f3c6c Merge branch 'master' into blender2.8 2018-05-04 10:32:35 +02:00
Campbell Barton
bf52d20e62 Modifiers: add back dirty normal flag 2018-05-04 10:05:57 +02:00
Philipp Oeser
288d7794d4 Fix T54341: Particle Instance Modifier doesn't preserve edge data 2018-05-04 09:20:57 +02:00
Campbell Barton
bdd5617c54 Cleanup: avoid local definitions for one-off args 2018-05-04 09:04:33 +02:00
Campbell Barton
14883a0945 Cleanup: avoid local definitions for one-off args 2018-05-04 08:51:04 +02:00
Campbell Barton
29fc9275c7 Modifiers: ported wire modifier to mesh 2018-05-04 08:45:43 +02:00