Commit Graph

1551 Commits

Author SHA1 Message Date
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
Campbell Barton
2cdbbfcc5a Merge branch 'master' into blender2.8 2018-05-03 19:53:19 +02:00
Campbell Barton
38b6f8e143 Cleanup: correct solidify logic
Code for side normals isn't executing at the moment,
so not essential, but better correct it.
2018-05-03 19:48:28 +02:00
Germano
a9d264f5ca Merge branch 'master' into blender2.8 2018-05-03 14:33:52 -03:00
Germano
ac19483e63 BKE bvhtree: Add tree_type parameter to bvhtree_from_mesh_get.
This will allow greater control of the bvhtrees that are obtained, and helps identify problems.
It is also an additional step to unify the functions.
2018-05-03 14:26:39 -03:00
Sybren A. Stüvel
181356edba Restored HQ normals in Solidify modifier 2018-05-03 14:11:22 +02:00
Sybren A. Stüvel
648de1be52 Modifiers: ported Skin modifier DerivedMesh → Mesh 2018-05-02 16:39:22 +02:00
Sybren A. Stüvel
40771a0e9e Modifiers: ported Solidify modifier DerivedMesh → Mesh 2018-05-02 16:03:16 +02:00
Campbell Barton
5659d8bc0a Merge branch 'master' into blender2.8 2018-05-02 14:40:00 +02:00
Sybren A. Stüvel
1f8720cf05 Modifiers: ported Lattice modifier DerivedMesh → Mesh 2018-05-02 13:42:09 +02:00
Sybren A. Stüvel
81175eb40d Modifiers: ported Bevel modifier DerivedMesh → Mesh
This introduces `BKE_mesh_to_bmesh_ex()`, which exposes all of the
`BMeshFromMeshParams` parameters to the caller. This is required to enable
the `calc_face_normal` flag, which is required for the Bevel modifier.

This also introduces `BKE_bmesh_to_mesh()`, which allocates a new `Mesh`,
converts the `BMesh` to it, and returns it. The returned mesh is owned by
the caller.
2018-05-02 12:15:00 +02:00
Sybren A. Stüvel
334b55fd2e Extract common modifier parameters into ModifierEvalContext struct
The contents of the ModifierEvalContext struct are constant while iterating
over the modifier stack. The struct thus should be only created once, outside
any loop over the modifiers.
2018-05-01 18:02:17 +02:00
Sybren A. Stüvel
6b9f1ffe6e Formatting 2018-05-01 18:02:17 +02:00
Sybren A. Stüvel
2d6620a100 Modifiers: Array DerivedMesh → Mesh 2018-05-01 18:02:17 +02:00