From 39de0b79fd635ed67e8b1816c32199177d7f9f07 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Thu, 9 Apr 2020 18:49:40 +0200 Subject: 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 --- source/blender/blenkernel/BKE_material.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenkernel/BKE_material.h') diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h index a30d7d55985..a6d8d2d2d8b 100644 --- a/source/blender/blenkernel/BKE_material.h +++ b/source/blender/blenkernel/BKE_material.h @@ -99,6 +99,7 @@ void BKE_texpaint_slots_refresh_object(struct Scene *scene, struct Object *ob); struct bNode *BKE_texpaint_slot_material_find_node(struct Material *ma, short texpaint_slot); /* rna api */ +void BKE_id_materials_copy(struct Main *bmain, struct ID *id_src, struct ID *id_dst); void BKE_id_material_resize(struct Main *bmain, struct ID *id, short totcol, bool do_id_user); void BKE_id_material_append(struct Main *bmain, struct ID *id, struct Material *ma); struct Material *BKE_id_material_pop(struct Main *bmain, -- cgit v1.2.3