diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-03-05 23:34:48 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-03-05 23:34:48 +0300 |
commit | dbdd79fabe2934de6184c0230f91b2e8af716a7b (patch) | |
tree | 1a9ea8439a6330f6bda57a5488056ce78bf6bc1d /source/blender/editors/uvedit | |
parent | 4326f8af08c845eeb4eb45800ca047f690044007 (diff) |
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.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 1dc681e8ec1..19925c2fcd7 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -111,7 +111,7 @@ static bool ED_uvedit_ensure_uvs(bContext *C, Scene *UNUSED(scene), Object *obed return 1; if (em && em->bm->totface && !CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV)) - ED_mesh_uv_texture_add(obedit->data, NULL, true); + ED_mesh_uv_texture_add(obedit->data, NULL, true, true); if (!ED_uvedit_test(obedit)) return 0; |