Fix #31631: keyframe insert on uv layer element not working.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user