Commit Graph

28 Commits

Author SHA1 Message Date
aafd71a8a1 Fix T81060: CustomData Correction sometimes breaks UVs and Vertex Colors
`CustomData_bmesh_interp` use the same CustomData decryptor (in this case, `bm->ldata`) in both blocks.

So make sure that all CustomData layers match.

This commit also removes redundant `BM_elem_attrs_copy_ex` calls.

Maniphest Tasks: T81060

Differential Revision: https://developer.blender.org/D9159
2020-10-12 08:57:43 -03:00
91694b9b58 Code Style: use "#pragma once" in source directory
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.

This patch has been generated by P1561 followed by `make format`.

Differential Revision: https://developer.blender.org/D8466
2020-08-07 09:50:34 +02:00
96e2bd8493 Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
7782936977 BMesh: support copying & freeing layers by type 2019-11-26 16:19:56 +11:00
e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
9a5df92c1b Fix T56872: Edge slide gives invalid normals
Add the ability to skip overwriting normals.
2018-11-27 11:40:32 +11:00
2a2ae9c3fa BMesh: remove BM_face_create_ngon_vcloud
Instead, add BM_verts_sort_radial_plane
and use regular creation API.
2017-01-20 06:09:37 +11:00
dc0a9e6535 BMesh: remove redundant argument 2016-11-15 02:44:57 +11:00
4a356d767b BMesh: BM_verts_from_edges utility function 2015-12-24 20:30:02 +11:00
a12fa185f8 BMesh: use typed filter callbacks (const args too) 2015-11-28 13:37:02 +11:00
3e0c6a8ca2 BMesh: util functions to get edge loops from verts 2015-05-28 11:46:58 +10:00
89f5a09ab4 Cleanup: use 8 space indent for multi-line args 2015-04-25 20:15:20 +10:00
e7a6efa2a7 Code Cleanup: move delete funcs out of bmesh_construct.c into own file 2014-01-17 09:21:30 +11:00
9470754fd3 bmesh api cleanup, face creation args now accept an example face (as with vertex and edge),
also replace BM_face_create_quad_tri_v with BM_face_create_verts
2013-08-21 07:51:47 +00:00
19d3e230e6 improved BM_face_copy_shared to copy from more possible connected loops and add filter function (not used yet). 2013-08-18 11:44:51 +00:00
fd14c344e0 switch arg order for BM_elem_select_copy(), would like to make this constant for all bmesh functions eventually. 2013-08-13 00:35:23 +00:00
19496ab62a internal bmesh api change: BM_elem_attrs_copy() no longer copies the selection flag.
this was slowing down modifiers since the selection flags would be copied and flushed to connected geometry.
2013-07-24 19:31:58 +00:00
48c8d99cd9 add BM_elem_attrs_copy_ex() which can take a flag arg to define which flags should be copied. (mainly to be able to avoid copying selection/hidden state) 2013-07-11 12:43:34 +00:00
7fec23ae0a fix for problem with edge slide where it would stop shapekey modifier from being applied (because of added vertices),
now, instead of making hidden copies of faces, the faces are copied into a temp bmesh.

also remove a hash that was being created and not used (old code).
2013-07-11 04:24:36 +00:00
29c8bd7b24 api cleanup: split part of BM_face_create_ngon_vcloud() into a new function BM_face_create_ngon_verts(),
a function to create a bmesh face from an ordered vertex array, optionally creating edges and calculating winding.
2013-03-27 05:52:28 +00:00
b27854bd47 use booleans for bmesh api. 2013-01-14 16:42:43 +00:00
07ccd3ee3f fix [#33029] Applying modifier leaks memory
Thanks for Sergey for finding the bug & patching, This fix works a bit differently.
Theres no need to allocate the customdata in the first place - since its written into. So add a flag for vert/edge/face/loop creation functions so they can skip customdata creation.
2012-11-29 16:26:39 +00:00
ea79c470d2 bmesh: Fkey now creates faces from 5 or more disconnected vertices.
Added function: BM_face_create_ngon_vcloud
creating quads and tris use this too since it finds the best face winding direction based on surrounding face (if any)
2012-03-14 22:57:15 +00:00
921a7556fb bmesh - changes to mempool allocations
* double default edge allocation size (double the number of verts/faces).
* CustomData_bmesh_init_pool was using allocsize & chunksize as the same variable. Now use type specific chunk size.
* bmesh copy and editmode conversion now allocate the BMesh mempool size needed for the entire vert/edge/loop/face arrays since its known already.
2012-03-01 22:17:04 +00:00
d1d11bbe9b more header re-arranging.
Some function comments were in headers, some in the C files, some in both.
Moved function comments from headers into the C files.
2012-02-28 18:28:30 +00:00