diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-04-09 19:49:40 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-09-17 23:39:57 +0300 |
commit | 39de0b79fd635ed67e8b1816c32199177d7f9f07 (patch) | |
tree | b2838abd1c39d3c17e08438740c40c95c33a94f1 /source/blender/blenkernel/BKE_mesh.h | |
parent | 9ee588cd4af881f3432fddce3044e90bad4e30f6 (diff) |
Pointclouds: support mesh <-> pointcloud in convert operator
Just converts verts to points and vice versa.
Materials and Attribute layers are preserved (so for example if you set
custom radii on the pointcloud, convert to mesh, then convert back to
pointcloud, this will be preserved).
Also not add a Radius layer by default (it is still added and
filled when adding a pointcloud object from the menu), a global Radius
property that will be used if there is no radius attribute can be added
later. A Radius attribute can also be added in the pointcloud data
properties (and filled via python).
This will also add a new utility function that copies materials between
datablocks: BKE_id_materials_copy
ref T75717
Differential Revision: https://developer.blender.org/D7391
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 6e8c67dde5f..39b15bdd48d 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -54,6 +54,7 @@ struct MemArena; struct Mesh; struct ModifierData; struct Object; +struct PointCloud; struct Scene; #ifdef __cplusplus @@ -172,6 +173,16 @@ void BKE_mesh_to_curve(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob); +void BKE_pointcloud_from_mesh(struct Mesh *me, struct PointCloud *pointcloud); +void BKE_mesh_to_pointcloud(struct Main *bmain, + struct Depsgraph *depsgraph, + struct Scene *scene, + struct Object *ob); +void BKE_mesh_from_pointcloud(struct PointCloud *pointcloud, struct Mesh *me); +void BKE_pointcloud_to_mesh(struct Main *bmain, + struct Depsgraph *depsgraph, + struct Scene *scene, + struct Object *ob); void BKE_mesh_material_index_remove(struct Mesh *me, short index); bool BKE_mesh_material_index_used(struct Mesh *me, short index); void BKE_mesh_material_index_clear(struct Mesh *me); |