Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c13
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c6
2 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index c8dbee65f6a..0930edbe46d 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -98,19 +98,14 @@ static int ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit)
SpaceLink *slink;
SpaceImage *sima;
- if (ED_uvedit_test(obedit)) {
+ if (ED_uvedit_test(obedit))
return 1;
- }
- if (em && em->bm->totface && !CustomData_has_layer(&em->bm->pdata, CD_MTEXPOLY)) {
- BM_data_layer_add(em->bm, &em->bm->pdata, CD_MTEXPOLY);
- BM_data_layer_add(em->bm, &em->bm->ldata, CD_MLOOPUV);
- ED_mesh_uv_loop_reset_ex(C, obedit->data, 0);
- }
+ if (em && em->bm->totface && !CustomData_has_layer(&em->bm->pdata, CD_MTEXPOLY))
+ ED_mesh_uv_texture_add(C, obedit->data, NULL, TRUE);
- if (!ED_uvedit_test(obedit)) {
+ if (!ED_uvedit_test(obedit))
return 0;
- }
ima = CTX_data_edit_image(C);
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 3a4ce0f596e..7daa0d97834 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -1703,6 +1703,12 @@ static void rna_def_mloopuv(BlenderRNA *brna)
"rna_iterator_array_end", "rna_iterator_array_get",
"rna_MeshUVLoopLayer_data_length", NULL, NULL, NULL);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_struct_name_property(srna, prop);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Name", "Name of UV map");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
srna = RNA_def_struct(brna, "MeshUVLoop", NULL);
RNA_def_struct_sdna(srna, "MLoopUV");
RNA_def_struct_path_func(srna, "rna_MeshUVLoop_path");