diff options
Diffstat (limited to 'source/blender/editors/object/object_add.cc')
-rw-r--r-- | source/blender/editors/object/object_add.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_add.cc b/source/blender/editors/object/object_add.cc index 5e09948e192..041a1383b28 100644 --- a/source/blender/editors/object/object_add.cc +++ b/source/blender/editors/object/object_add.cc @@ -2086,6 +2086,12 @@ static int object_curves_empty_hair_add_exec(bContext *C, wmOperator *op) Curves *curves_id = static_cast<Curves *>(object->data); curves_id->surface = surface_ob; id_us_plus(&surface_ob->id); + + Mesh *surface_mesh = static_cast<Mesh *>(surface_ob->data); + const char *uv_name = CustomData_get_active_layer_name(&surface_mesh->ldata, CD_MLOOPUV); + if (uv_name != nullptr) { + curves_id->surface_uv_map = BLI_strdup(uv_name); + } } return OPERATOR_FINISHED; |