From dbdd79fabe2934de6184c0230f91b2e8af716a7b Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 5 Mar 2019 21:34:48 +0100 Subject: UV/VCol layers creation: add option to not init those new data. `ED_mesh_uv_texture_add()`/`ED_mesh_color_add()` would always either copy data from current active one, or (for UVs), generate default 'valid' UVs for every face. This commit adds an option to not do that, just keeping default values from raw CDLayer creation. It is only used/exposed from RNA API currently. This is especially useful for importer add-ons, since some formats support multiple layers of those kind, as well as 'partial' dataset not explicitely defining values for all mesh items. Preliminary step to fix T62224. --- source/blender/editors/physics/dynamicpaint_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/physics/dynamicpaint_ops.c') diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c index a4ea8df1d4f..a88d2089ea1 100644 --- a/source/blender/editors/physics/dynamicpaint_ops.c +++ b/source/blender/editors/physics/dynamicpaint_ops.c @@ -230,7 +230,7 @@ static int output_toggle_exec(bContext *C, wmOperator *op) /* Vertex Color Layer */ if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) { if (!exists) - ED_mesh_color_add(ob->data, name, true); + ED_mesh_color_add(ob->data, name, true, true); else ED_mesh_color_remove_named(ob->data, name); } -- cgit v1.2.3