Commit Graph

14527 Commits

Author SHA1 Message Date
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
Bastien Montagne
501637879d Static Override: fix stupid ;istake in moving autooverride to own struct flag. 2018-05-04 15:44:19 +02:00
Bastien Montagne
66be4a1136 Merge branch 'blender2.8' into tmp-static-override-insertion 2018-05-04 15:36:06 +02:00
Bastien Montagne
10fb83e3f0 Merge branch 'blender2.8' into tmp-static-override-insertion 2018-05-04 15:26:02 +02:00
Sergey Sharybin
554fb0e7e0 Merge branch 'master' into blender2.8 2018-05-04 15:21:42 +02:00
Sergey Sharybin
aa0380a6a5 Cleanup: Remove G.main from framechange_poses_clear_unkeyed() 2018-05-04 15:18:47 +02:00
Germano
0a79de526d Merge branch 'master' into blender2.8 2018-05-04 10:12:47 -03:00
Germano
78fde19e68 BKE: Smoke: Fix error with implicit declaration of function due recent changes. 2018-05-04 10:11:30 -03:00
Germano
02baf71409 Merge branch 'master' into blender2.8 2018-05-04 09:22:48 -03:00
Germano
aea637456e BKE: BVHtree: Replace all external references of bvhtree_from_mesh_looptri with bvhtree_from_mesh_get. 2018-05-04 09:21:42 -03: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
Germano
3dd6912fce Mesh Remap: Face Corner Data: Do not use large epsilon values to create bvhtrees.
Use ray radius instead.
2018-05-04 09:01:56 -03:00
Germano
8c6a1d8f95 Mesh Remap: Face Data: Do not use large epsilon values to create bvhtree.
If you need the approximation, use raycast radius.
2018-05-04 08:29:00 -03:00
Bastien Montagne
4880e2e75a ID management: add higher level BKE_id_new... helpers.
Those should be used in priority when you need to create either a new
datablock in Main, or a new temp one. Lower level BKE_libblock_...
should only be used when you need a very specific, uncommon behavior.
2018-05-04 12:55:36 +02:00
Germano
a0f369bc13 Merge branch 'master' into blender2.8 2018-05-04 07:44:34 -03:00
Germano
b886cdf81d Mesh Remap: Change the sphere_radius parameter instead of creating a bvhtree with epsilon equal to the value of ray_radius.
This is the desirable behavior.
It also removes one more use of `bvhtree_from_mesh_looptri`.
2018-05-04 07:43:08 -03:00
Germano
3d26cf112b Constraint: Shrink Warp: Replace bvhtree_from_mesh_looptri with bvhtree_from_mesh_get.
The value of epsilon was never used to create this bvhtree because whenever we activate this constraint, a bvhtree with parameter epsilon 0.0 was created and cached.
2018-05-04 07:39:07 -03:00
Campbell Barton
bdd5617c54 Cleanup: avoid local definitions for one-off args 2018-05-04 09:04:33 +02:00
Campbell Barton
b3545ae373 Merge branch 'master' into blender2.8 2018-05-04 07:30:14 +02:00
Campbell Barton
f3c5b0394f IDProp API: expose repr utility function
Useful for logging properties passed to operators.
2018-05-04 07:29:05 +02:00
Germano
892dd3d069 Merge branch 'master' into blender2.8 2018-05-03 18:47:14 -03:00
Germano
16253285ff BKE: BVHtree: make bvhtree_from_mesh_edges a static function.
This will help us have more control over bvhtrees that are cached.
2018-05-03 18:33:16 -03:00
Germano
133dadcdee Fix Transfer Mesh Data with Edge Mapping of type Projected Edge Interpolated and Ray Radius other than 0.0.
`MREMAP_RAYCAST_APPROXIMATE_BVHEPSILON(ray_radius)` greatly increased the radius making for example that 0.1 becoming 1.5
Now the result is much more predictable.
2018-05-03 18:19:36 -03:00