Bastien Montagne
3235a3081c
Fix T57858: Add validation callback to CustomData layers.
...
Our mesh validation was only checking cd layout so far, not their actual
data. While this might only be needed for a few types, this is a
required addition for things like imported UVs, else we have no way to
avoid nasty things like NANs & co.
Note that more layer types may need that callback, time will say. For
now added it to some obvious missing cases...
2018-12-03 16:22:27 +01:00
Campbell Barton
6fcaa5de06
Revert "Inline function BKE_mesh_boundbox_calc inside BKE_mesh_texspace_calc to avoid confusion."
...
This reverts commit e6322abad2
.
2018-11-27 14:17:54 +11:00
mano-wii
e6322abad2
Inline function BKE_mesh_boundbox_calc inside BKE_mesh_texspace_calc to avoid confusion.
2018-11-26 11:02:14 -02:00
mano-wii
2ab798feb0
transform_snap_object: Use the texture space bound box to test the need to snap to meshes in edit mode.
...
Before a value for bound box was stored in a local cache.
2018-11-21 14:38:56 -02:00
Campbell Barton
720368e2d0
Cleanup: use const mesh arg to BM_mesh_bm_from_me
...
Needed for D3966
2018-11-20 13:30:25 +11:00
Campbell Barton
f6bec570c5
Merge branch 'master' into blender2.8
2018-11-07 12:28:26 +11:00
Alexander Gavrilov
0709fac41e
BKE_mesh: add a utility to get edge indices from looptri.
...
Not all three sides of a tesselated mesh triangle are guaranteed
to be original mesh edges, so a somewhat complicated check is
required to detect which ones are real. It seems that until now
there was no utility function for that, only some example code.
2018-11-06 21:20:17 +03:00
Campbell Barton
901ccfab52
Fix T57366: Mesh.from_pydata invalid loose-edge state
2018-10-24 11:37:44 +11:00
Campbell Barton
0941d99323
Cleanup: remove unused functions
2018-10-15 16:59:27 +11:00
Campbell Barton
881334c499
Cleanup: remove DerivedMesh bvhtree_from_mesh_get
2018-10-15 13:40:46 +11:00
Campbell Barton
b7363941f7
Cleanup: make BKE_mesh_ensure_normals_for_display public
2018-10-11 16:34:12 +11:00
Campbell Barton
fd2ffb0b9e
RNA: remove redundant new_from_object/to_mesh arg
...
If the caller wants loop-tris, there is a function to calculate them.
2018-10-11 12:24:38 +11:00
Brecht Van Lommel
e65784a051
Python API: add loop triangles access, remove tessfaces.
...
Loop triangles are tessellated triangles create from polygons, for renderers
or exporters that need to match Blender's polygon tesselation exactly. These
are a read-only runtime cache.
Tessfaces are a legacy data structure from before Blender supported n-gons,
and were already mostly removed from the C code.
Details on porting code to loop triangles is in the release notes.
Differential Revision: https://developer.blender.org/D3539
2018-10-10 17:43:44 +02:00
Campbell Barton
633e2cddd7
BMesh: simple bmesh -> mesh for evaluation
...
Copied from CDDM_from_bmesh, the modifier stack doesn't
need to handle shape keys, vertex parents or selection history
(needed for mode switching).
2018-10-10 13:14:15 +11:00
Campbell Barton
79ca13a745
Cleanup: naming
...
Use BKE_mesh_* prefix for mesh module.
2018-10-09 16:09:59 +11:00
Campbell Barton
3c78763482
Edit Mesh: remove derived-mesh from crazy-space calculation
2018-10-09 15:38:06 +11:00
Campbell Barton
d0b47ddd7d
Fix UV select tools not refreshing
...
Add BKE_mesh_batch_cache_dirty_tag option for resetting UV's.
2018-10-04 16:03:51 +10:00
Sebastian Parborg
d191676400
Modifiers: use Mesh instead of DerivedMesh for explode.
...
Differential Revision: https://developer.blender.org/D3718
2018-09-25 14:01:23 +02:00
Brecht Van Lommel
cfb7565cd5
Cleanup: convert smoke modifier from DerivedMesh to Mesh.
2018-09-21 13:56:22 +02:00
Dalai Felinto
613523d5f5
Rename: *_batch_cache_dirty > *_batch_cache_dirty_tag
2018-08-23 10:20:16 -03:00
Sergey Sharybin
e19439a169
Cleanup: Use dedicated function to copy mesh during evaluation process
...
It is rather fully annoying to have same sets of obscure flags all over.
2018-08-16 14:42:06 +02:00
Rohan Rathi
4e6bcd10e5
Merge branch 'blender2.8' into soc-2018-bevel
2018-07-21 19:29:15 +05:30
Campbell Barton
6f8a141fad
Merge branch 'master' into blender2.8
2018-07-12 21:43:51 +02:00
Campbell Barton
e77d2b4e3f
Cleanup: remove legacy mesh save support
...
This was used for saving files for Blender 2.6x.
2018-07-12 21:35:57 +02:00
Sybren A. Stüvel
99a6d616e8
Ported CDDM_apply_vert_normals from DM to Mesh
2018-07-05 11:30:38 +02:00
Rohan Rathi
31e43d021f
Merge branch 'blender2.8' into soc-2018-bevel
2018-07-02 23:31:19 +05:30
Campbell Barton
36a9436d80
Merge branch 'master' into blender2.8
2018-07-01 16:22:06 +02:00
Campbell Barton
ddee0931b8
RNA: use bool for boolean RNA types
...
We were using int's for bool arguments in BKE,
just to avoid having wrapper functions.
2018-07-01 15:57:59 +02:00
Rohan Rathi
c73a6b0d42
Merge branch 'blender2.8' into soc-2018-bevel
2018-06-20 22:29:44 +05:30
Bastien Montagne
3df5625ae7
Cleanup: remove some useless Derivedmesh struct declarations.
2018-06-20 15:17:35 +02:00
Rohan Rathi
1255129932
Merge branch 'blender2.8' into soc-2018-bevel
2018-06-11 21:03:07 +05:30
Bastien Montagne
204c167c72
Merge branch 'master' into blender2.8
...
Conflicts:
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/intern/mesh_convert.c
source/blender/editors/interface/interface_eyedropper_color.c
source/blender/editors/object/object_add.c
source/blender/editors/space_image/image_ops.c
source/blender/makesrna/intern/rna_image.c
source/blender/windowmanager/intern/wm_draw.c
2018-06-11 16:02:46 +02:00
Bastien Montagne
78a8d3685b
Cleanup: remove moar ugly G.main usages...
...
BKE_image was an ugly nest, could fix all but the ones from compositor,
so moved ugly G.main there, at least we know where the Evil is that way ;)
2018-06-11 15:40:37 +02:00
Sybren A. Stüvel
23db3a5ade
Renamed BKE_nomain_mesh_xxx → BKE_mesh_nomain_xxx
...
This maintains the `BKE_mesh_` prefix for the mesh-related BKE functions.
2018-06-06 10:30:24 +02:00
Sybren A. Stüvel
5f543915e8
Modifiers: ported curve_calc_modifiers_post() internals from DerivedMesh → Mesh
...
The function still returns a DerivedMesh, but internally it uses Mesh
now.
2018-06-06 10:11:31 +02:00
Sybren A. Stüvel
a9ed50514c
Moved function declarations from BKE_mesh.h → BKE_mesh_runtime.h
2018-06-05 16:59:18 +02:00
Sybren A. Stüvel
c0dd355926
Modifiers: ported applying modifier from DerivedMesh → Mesh
2018-06-01 17:35:26 +02:00
Campbell Barton
be8016908d
Mesh: Replace DM for mesh -> curve conversion
2018-06-01 14:01:44 +02:00
Brecht Van Lommel
cce16df10f
Fix Cycles viewport render stuck with curve objects.
...
We should solve this better by making the depsgraph convert all curves to
meshes, for now ensure we don't to depsgraph tags during export.
2018-05-30 18:17:49 +02:00
Bastien Montagne
8f670dd855
Merge branch 'master' into blender2.8
...
Conflicts:
source/blender/blenkernel/BKE_material.h
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/intern/library_remap.c
source/blender/blenkernel/intern/material.c
source/blender/editors/object/object_relations.c
source/blender/editors/render/render_preview.c
source/blender/makesrna/intern/rna_object.c
2018-05-29 16:02:53 +02:00
Bastien Montagne
f7af08b5fe
Cleanup: Get rid of G.main in BKE_material.
...
Note that in some cases, this only moves the G.main case to somne other
places - in particular, RNA getters/setters are becoming annoying here...
2018-05-29 15:49:21 +02:00
Rohan Rathi
5d2d36b068
Applied soc-2017-normal-tools
2018-05-25 22:24:24 +05:30
Sybren A. Stüvel
a2438373b3
Modifiers: ported Collision DerivedMesh → Mesh
2018-05-17 15:28:51 +02:00
Sybren A. Stüvel
def1c3eb4b
Particle System: ported most DerivedMesh → Mesh
...
There are a few places where DerivedMesh is still used, most notably
when calling the (not yet ported) cloth simulation. There is also still
the use of Object.derivedDeform and Object.derivedFinal. Those places are
marked with a TODO.
Some functions in the editors module were copied to accept Mesh. Those
already had 'mesh' in the name; the copies are suffixed with '__real_mesh'
for easy renaming later when the DM-based functionality is removed.
2018-05-16 16:31:38 +02:00
Mai Lavelle
fee50f830d
Add BKE_mesh_is_valid
...
Non modifying version of `BKE_mesh_validate`, mirrors `DM_is_valid` more
closely. Will be used in port of `mesh_calc_modifiers`
from `DerivedMesh` to `Mesh`.
2018-05-16 06:07:50 -04:00
Germano
5503e2565b
Bmesh: Clear possible geometry saved at runtime when converting bmesh to mesh.
2018-05-11 15:48:14 -03:00
Dalai Felinto
828a3d89b3
Fix T55015: Crash on selection after recent BVH changes
...
Runtime data should always be initialized to NULL on read-time.
2018-05-09 15:53:16 +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
0012082c10
Cleanup: move mesh conversion into own function
2018-05-08 17:54:25 +02:00
Campbell Barton
03dd109a84
Cleanup: consistent BKE_mesh naming
2018-05-08 17:28:43 +02:00