svn merge ^/trunk/blender -r42095:42116
authorCampbell Barton <ideasman42@gmail.com>
Thu, 24 Nov 2011 05:33:22 +0000 (05:33 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 24 Nov 2011 05:33:22 +0000 (05:33 +0000)
23 files changed:
1  2 
release/scripts/startup/bl_operators/uvcalc_lightmap.py
release/scripts/startup/bl_ui/properties_data_modifier.py
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenlib/BLI_math_vector.h
source/blender/blenlib/intern/math_vector.c
source/blender/blenloader/intern/readfile.c
source/blender/collada/MeshImporter.cpp
source/blender/editors/mesh/mesh_data.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_scene.c
source/blender/modifiers/intern/MOD_uvproject.c
source/blender/render/intern/source/render_texture.c
source/creator/CMakeLists.txt
source/creator/creator.c

@@@ -1303,14 -2129,10 +1303,14 @@@ static void mesh_calc_modifiers(Scene *
                                        DM_add_edge_layer(dm, CD_ORIGINDEX, CD_CALLOC, NULL);
                                        DM_add_face_layer(dm, CD_ORIGINDEX, CD_CALLOC, NULL);
  
-                                       range_vni(DM_get_vert_data_layer(dm, CD_ORIGINDEX), dm->numVertData, 0);
-                                       range_vni(DM_get_edge_data_layer(dm, CD_ORIGINDEX), dm->numEdgeData, 0);
-                                       range_vni(DM_get_face_data_layer(dm, CD_ORIGINDEX), dm->numPolyData, 0);
+                                       range_vn_i(DM_get_vert_data_layer(dm, CD_ORIGINDEX), dm->numVertData, 0);
+                                       range_vn_i(DM_get_edge_data_layer(dm, CD_ORIGINDEX), dm->numEdgeData, 0);
 -                                      range_vn_i(DM_get_face_data_layer(dm, CD_ORIGINDEX), dm->numFaceData, 0);
++                                      range_vn_i(DM_get_face_data_layer(dm, CD_ORIGINDEX), dm->numPolyData, 0);
                                }
 +
 +                              if((dataMask & CD_MASK_WEIGHT_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT))
 +                                      add_weight_mcol_dm(ob, dm, draw_flag);
 +
                        }
  
                        
@@@ -1047,17 -828,17 +1047,17 @@@ static const LayerTypeInfo LAYERTYPEINF
        {sizeof(int), "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
        /* 8: CD_NORMAL */
        /* 3 floats per normal vector */
 -      {sizeof(float)*3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
 -      /* 9: CD_FLAGS */
 -      {sizeof(int), "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
 +      {sizeof(float)*3, "vec3f", 1, NULL, NULL, NULL, NULL, NULL, NULL},
 +      /* 9: CD_POLYINDEX */
 +      {sizeof(int), "MIntProperty", 1, NULL, NULL, NULL, NULL, NULL, NULL},
        /* 10: CD_PROP_FLT */
 -      {sizeof(MFloatProperty), "MFloatProperty",1,"Float",NULL,NULL,NULL,NULL},
 +      {sizeof(MFloatProperty), "MFloatProperty",1,"Float", layerCopy_propFloat,NULL,NULL,NULL},
        /* 11: CD_PROP_INT */
 -      {sizeof(MIntProperty), "MIntProperty",1,"Int",NULL,NULL,NULL,NULL},
 +      {sizeof(MIntProperty), "MIntProperty",1,"Int",layerCopy_propInt,NULL,NULL,NULL},
        /* 12: CD_PROP_STR */
 -      {sizeof(MStringProperty), "MStringProperty",1,"String",NULL,NULL,NULL,NULL},
 +      {sizeof(MStringProperty), "MStringProperty",1,"String",layerCopy_propString,NULL,NULL,NULL},
        /* 13: CD_ORIGSPACE */
-       {sizeof(OrigSpaceFace), "OrigSpaceFace", 1, "UVTex", layerCopy_origspace_face, NULL,
+       {sizeof(OrigSpaceFace), "OrigSpaceFace", 1, "UVMap", layerCopy_origspace_face, NULL,
         layerInterp_origspace_face, layerSwap_origspace_face, layerDefault_origspace_face},
        /* 14: CD_ORCO */
        {sizeof(float)*3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
@@@ -2092,9 -2092,9 +2092,9 @@@ int dynamicPaint_createUVSurface(Dynami
        if (surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ) return setError(canvas, "Can't bake non-\"image sequence\" formats.");
  
        numOfFaces = dm->getNumFaces(dm);
 -      mface = dm->getFaceArray(dm);
 +      mface = dm->getTessFaceArray(dm);
  
-       /* get uv layer */
+       /* get uv map */
        CustomData_validate_layer_name(&dm->faceData, CD_MTFACE, surface->uvlayer_name, uvname);
        tface = CustomData_get_layer_named(&dm->faceData, CD_MTFACE, uvname);
  
@@@ -513,10 -337,9 +513,10 @@@ static int uv_texture_add_exec(bContex
  void MESH_OT_uv_texture_add(wmOperatorType *ot)
  {
        /* identifiers */
-       ot->name= "Add UV Texture";
-       ot->description= "Add UV texture layer";
+       ot->name= "Add UV Map";
+       ot->description= "Add UV Map";
        ot->idname= "MESH_OT_uv_texture_add";
 +
        
        /* api callbacks */
        ot->poll= layers_poll;
@@@ -601,10 -417,9 +601,10 @@@ static int drop_named_image_invoke(bCon
  void MESH_OT_drop_named_image(wmOperatorType *ot)
  {
        /* identifiers */
-       ot->name= "Assign Image to UV Texture";
-       ot->description= "Assigns Image to active UV layer, or creates a UV layer";
+       ot->name= "Assign Image to UV Map";
+       ot->description= "Assigns Image to active UV Map, or creates a UV Map";
        ot->idname= "MESH_OT_drop_named_image";
 +
        
        /* api callbacks */
        ot->poll= layers_poll;
@@@ -634,10 -447,9 +634,10 @@@ static int uv_texture_remove_exec(bCont
  void MESH_OT_uv_texture_remove(wmOperatorType *ot)
  {
        /* identifiers */
-       ot->name= "Remove UV Texture";
-       ot->description= "Remove UV texture layer";
+       ot->name= "Remove UV Map";
+       ot->description= "Remove UV Map";
        ot->idname= "MESH_OT_uv_texture_remove";
 +
        
        /* api callbacks */
        ot->poll= layers_poll;
@@@ -1824,90 -1815,94 +1824,90 @@@ void flushTransParticles(TransInfo *t
  /* proportional distance based on connectivity  */
  #define THRESHOLDFACTOR (1.0f-0.0001f)
  
 -static int connectivity_edge(float mtx[][3], EditVert *v1, EditVert *v2)
 +/*I did this wrong, it should be a breadth-first search
 +  but instead it's a depth-first search, fudged
 +  to report shortest distances.  I have no idea how fast
 +  or slow this is.*/
 +static void editmesh_set_connectivity_distance(BMEditMesh *em, float mtx[][3], float *dists)
  {
 -      float edge_vec[3];
 -      float edge_len;
 -      int done = 0;
 -
 -      /* note: hidden verts are not being checked for, this assumes
 -       * flushing of hidden faces & edges is working right */
 -      
 -      if (v1->f2 + v2->f2 == 4)
 -              return 0;
 +      BMVert **queue = NULL;
 +      float *dqueue = NULL;
 +      int *tots = MEM_callocN(sizeof(int)*em->bm->totvert, "tots editmesh_set_connectivity_distance");
 +      BLI_array_declare(queue);
 +      BLI_array_declare(dqueue);
 +      SmallHash svisit, *visit=&svisit;
 +      BMVert *v;
 +      BMIter viter;
 +      int i, start;
        
-       fill_vn(dists, em->bm->totvert, FLT_MAX);
 -      sub_v3_v3v3(edge_vec, v1->co, v2->co);
 -      mul_m3_v3(mtx, edge_vec);
 -
 -      edge_len = len_v3(edge_vec);
 -
 -      if (v1->f2) {
 -              if (v2->f2) {
 -                      if (v2->tmp.fp + edge_len < THRESHOLDFACTOR * v1->tmp.fp) {
 -                              v1->tmp.fp = v2->tmp.fp + edge_len;
 -                              done = 1;
 -                      } else if (v1->tmp.fp + edge_len < THRESHOLDFACTOR * v2->tmp.fp) {
 -                              v2->tmp.fp = v1->tmp.fp + edge_len;
 -                              done = 1;
 -                      }
 -              }
 -              else {
 -                      v2->f2 = 1;
 -                      v2->tmp.fp = v1->tmp.fp + edge_len;
 -                      done = 1;
 -              }
 -      }
 -      else if (v2->f2) {
 -              v1->f2 = 1;
 -              v1->tmp.fp = v2->tmp.fp + edge_len;
 -              done = 1;
 -      }
++      fill_vn_fl(dists, em->bm->totvert, FLT_MAX);
  
 -      return done;
 -}
 +      BM_ElemIndex_Ensure(em->bm, BM_VERT);
  
 -static void editmesh_set_connectivity_distance(EditMesh *em, float mtx[][3])
 -{
 -      EditVert *eve;
 -      EditEdge *eed;
 -      EditFace *efa;
 -      int done= 1;
 -
 -      /* f2 flag is used for 'selection' */
 -      /* tmp.l is offset on scratch array   */
 -      for(eve= em->verts.first; eve; eve= eve->next) {
 -              if(eve->h==0) {
 -                      eve->tmp.fp = 0;
 -
 -                      if(eve->f & SELECT) {
 -                              eve->f2= 2;
 -                      }
 -                      else {
 -                              eve->f2 = 0;
 -                      }
 -              }
 -      }
 +      BLI_smallhash_init(visit);
  
 +      BM_ITER(v, &viter, em->bm, BM_VERTS_OF_MESH, NULL) {
 +              if (BM_TestHFlag(v, BM_SELECT)==0 || BM_TestHFlag(v, BM_HIDDEN))
 +                      continue;
 +                      
 +              
 +              BLI_smallhash_insert(visit, (uintptr_t)v, NULL);
 +              BLI_array_append(queue, v);
 +              BLI_array_append(dqueue, 0.0f);
 +              dists[BM_GetIndex(v)] = 0.0f;
 +      }
 +      
 +      start = 0;
 +      while (start < BLI_array_count(queue)) {
 +              BMIter eiter;
 +              BMEdge *e;
 +              BMVert *v3, *v2;
 +              float d, vec[3];
 +              
 +              v2 = queue[start];
 +              d = dqueue[start];
 +              
 +              BM_ITER(e, &eiter, em->bm, BM_EDGES_OF_VERT, v2) {
 +                      float d2;
 +                      v3 = BM_OtherEdgeVert(e, v2);
 +                      
 +                      if (BM_TestHFlag(v3, BM_SELECT) || BM_TestHFlag(v3, BM_HIDDEN))
 +                              continue;
 +                      
 +                      sub_v3_v3v3(vec, v2->co, v3->co);
 +                      mul_m3_v3(mtx, vec);
 +                      
 +                      d2 = d + len_v3(vec);
 +                      
 +                      if (dists[BM_GetIndex(v3)] != FLT_MAX)
 +                              dists[BM_GetIndex(v3)] = MIN2(d2, dists[BM_GetIndex(v3)]);
 +                      else
 +                              dists[BM_GetIndex(v3)] = d2;
 +                      
 +                      tots[BM_GetIndex(v3)] = 1;
  
 -      /* Floodfill routine */
 -      /*
 -      At worst this is n*n of complexity where n is number of edges
 -      Best case would be n if the list is ordered perfectly.
 -      Estimate is n log n in average (so not too bad)
 -      */
 -      while(done) {
 -              done= 0;
 -
 -              for(eed= em->edges.first; eed; eed= eed->next) {
 -                      if(eed->h==0) {
 -                              done |= connectivity_edge(mtx, eed->v1, eed->v2);
 -                      }
 +                      if (BLI_smallhash_haskey(visit, (uintptr_t)v3))
 +                              continue;
 +                      
 +                      BLI_smallhash_insert(visit, (uintptr_t)v3, NULL);
 +                      
 +                      BLI_array_append(queue, v3);
 +                      BLI_array_append(dqueue, d2);
                }
 +              
 +              start++;
 +      }
  
 -              /* do internal edges for quads */
 -              for(efa= em->faces.first; efa; efa= efa->next) {
 -                      if (efa->v4 && efa->h==0) {
 -                              done |= connectivity_edge(mtx, efa->v1, efa->v3);
 -                              done |= connectivity_edge(mtx, efa->v2, efa->v4);
 -                      }
 -              }
 +      BLI_smallhash_release(visit);
 +      
 +      for (i=0; i<em->bm->totvert; i++) {
 +              if (tots[i])
 +                      dists[i] /= (float)tots[i];
        }
 +      
 +      BLI_array_free(queue);
 +      BLI_array_free(dqueue);
 +      MEM_freeN(tots);
  }
  
  /* loop-in-a-loop I know, but we need it! (ton) */
@@@ -174,10 -165,9 +174,10 @@@ void ED_uvedit_assign_image(Main *bmain
        else {
                /* old shading system, assign image to selected faces */
                
-               /* ensure we have a uv layer */
+               /* ensure we have a uv map */
 -              if(!CustomData_has_layer(&em->fdata, CD_MTFACE)) {
 -                      EM_add_data_layer(em, &em->fdata, CD_MTFACE, NULL);
 +              if(!CustomData_has_layer(&em->bm->pdata, CD_MTEXPOLY)) {
 +                      BM_add_data_layer(em->bm, &em->bm->pdata, CD_MTEXPOLY);
 +                      BM_add_data_layer(em->bm, &em->bm->ldata, CD_MLOOPUV);
                        update= 1;
                }
  
@@@ -928,10 -896,10 +928,10 @@@ static void uv_map_clip_correct(BMEditM
  
  /* ******************** Unwrap operator **************** */
  
- /* assumes UV layer is checked, doesn't run update funcs */
+ /* assumes UV Map is checked, doesn't run update funcs */
  void ED_unwrap_lscm(Scene *scene, Object *obedit, const short sel)
  {
 -      EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data);
 +      BMEditMesh *em= ((Mesh*)obedit->data)->edit_btmesh;
        ParamHandle *handle;
  
        const short fill_holes= scene->toolsettings->uvcalc_flag & UVCALC_FILLHOLES;
@@@ -1528,126 -1404,10 +1528,126 @@@ static void rna_def_mloop(BlenderRNA *b
  {
        StructRNA *srna;
        PropertyRNA *prop;
 -      const int uv_dim[]= {4, 2};
 +
 +      srna= RNA_def_struct(brna, "MeshLoop", NULL);
 +      RNA_def_struct_sdna(srna, "MLoop");
 +      RNA_def_struct_ui_text(srna, "Mesh Loop", "Loop in a Mesh datablock");
 +      RNA_def_struct_path_func(srna, "rna_MeshLoop_path");
 +      RNA_def_struct_ui_icon(srna, ICON_EDGESEL);
 +
 +      prop= RNA_def_property(srna, "vertex_index", PROP_INT, PROP_UNSIGNED);
 +      RNA_def_property_int_sdna(prop, NULL, "v");
 +      RNA_def_property_ui_text(prop, "Vertex", "Vertex index");
 +
 +      prop= RNA_def_property(srna, "edge_index", PROP_INT, PROP_UNSIGNED);
 +      RNA_def_property_int_sdna(prop, NULL, "e");
 +      RNA_def_property_ui_text(prop, "Edge", "Edge index");
 +}
 +
 +static void rna_def_mpolygon(BlenderRNA *brna)
 +{
 +      StructRNA *srna;
 +      PropertyRNA *prop;
 +
 +      srna= RNA_def_struct(brna, "MeshPolygon", NULL);
 +      RNA_def_struct_sdna(srna, "MPoly");
 +      RNA_def_struct_ui_text(srna, "Mesh Polygon", "Polygon in a Mesh datablock");
 +      RNA_def_struct_path_func(srna, "rna_MeshPolygon_path");
 +      RNA_def_struct_ui_icon(srna, ICON_FACESEL);
 +
 +      /* faked, actually access to loop vertex values, dont this way because manually setting up vertex/edge per loop is very low level
 +       * instead we setup poly sizes, assign indicies, then calc edges automatic when creating meshes from rna/py */
 +      prop= RNA_def_property(srna, "vertices", PROP_INT, PROP_UNSIGNED);
 +      RNA_def_property_array(prop, 3); // eek, this is still used in some cases but infact we dont want to use it at all here.
 +      RNA_def_property_flag(prop, PROP_DYNAMIC);
 +      RNA_def_property_dynamic_array_funcs(prop, "rna_MeshPoly_vertices_get_length");
 +      RNA_def_property_int_funcs(prop, "rna_MeshPoly_vertices_get", "rna_MeshPoly_vertices_set", NULL);
 +      RNA_def_property_ui_text(prop, "Vertices", "Vertex indices");
 +
 +      /* these are both very low level access */
 +      prop= RNA_def_property(srna, "loop_start", PROP_INT, PROP_UNSIGNED);
 +      RNA_def_property_int_sdna(prop, NULL, "loopstart");
 +      RNA_def_property_ui_text(prop, "Loop Start", "");
 +      /* also low level */
 +      prop= RNA_def_property(srna, "loop_total", PROP_INT, PROP_UNSIGNED);
 +      RNA_def_property_int_sdna(prop, NULL, "totloop");
 +      RNA_def_property_ui_text(prop, "Loop Total", "");
 +
 +      prop= RNA_def_property(srna, "material_index", PROP_INT, PROP_UNSIGNED);
 +      RNA_def_property_int_sdna(prop, NULL, "mat_nr");
 +      RNA_def_property_ui_text(prop, "Material Index", "");
 +      RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MeshFace_material_index_range");
 +      RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
 +
 +      prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_FACE_SEL);
 +      RNA_def_property_ui_text(prop, "Select", "");
 +      RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
 +
 +      prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE);
 +      RNA_def_property_ui_text(prop, "Hide", "");
 +      RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
 +
 +      prop= RNA_def_property(srna, "use_smooth", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SMOOTH);
 +      RNA_def_property_ui_text(prop, "Smooth", "");
 +      RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
 +
 +      prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_DIRECTION);
 +      RNA_def_property_array(prop, 3);
 +      RNA_def_property_range(prop, -1.0f, 1.0f);
 +      RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 +      RNA_def_property_float_funcs(prop, "rna_MeshPolygon_normal_get", NULL, NULL);
 +      RNA_def_property_ui_text(prop, "face normal", "local space unit length normal vector for this polygon");
 +
 +      prop= RNA_def_property(srna, "area", PROP_FLOAT, PROP_UNSIGNED);
 +      RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 +      RNA_def_property_float_funcs(prop, "rna_MeshPolygon_area_get", NULL, NULL);
 +      RNA_def_property_ui_text(prop, "face area", "read only area of the face");
 +
 +      prop= RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
 +      RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 +      RNA_def_property_int_funcs(prop, "rna_MeshPolygon_index_get", NULL, NULL);
 +      RNA_def_property_ui_text(prop, "Index", "Index number of the vertex");
 +}
 +
 +/* mesh.loop_uvs */
 +static void rna_def_mloopuv(BlenderRNA *brna)
 +{
 +      StructRNA *srna;
 +      PropertyRNA *prop;
 +
 +      srna= RNA_def_struct(brna, "MeshUVLoopLayer", NULL);
 +      RNA_def_struct_sdna(srna, "CustomDataLayer");
 +      RNA_def_struct_path_func(srna, "rna_MeshUVLoopLayer_path");
 +
 +      prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
 +      RNA_def_property_struct_type(prop, "MeshUVLoop");
 +      RNA_def_property_collection_funcs(prop, "rna_MeshUVLoopLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshUVLoopLayer_data_length", NULL, NULL, NULL);
 +
 +      /* BMESH_TODO: add active/clone/render properties */
 +
 +      srna= RNA_def_struct(brna, "MeshUVLoop", NULL);
 +      RNA_def_struct_sdna(srna, "MLoopUV");
 +      RNA_def_struct_path_func(srna, "rna_MeshUVLoop_path");
 +
 +      prop= RNA_def_property(srna, "uv", PROP_FLOAT, PROP_XYZ);
 +      RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
 +
 +      /* BMESH_TODO: add props for each MLoopUV flag */
 +}
 +
 +static void rna_def_mtexpoly(BlenderRNA *brna)
 +{
 +      StructRNA *srna;
 +      PropertyRNA *prop;
 +#if 0  /* BMESH_TODO: needed later when do another todo */
 +      int uv_dim[]= {4, 2};
 +#endif
  
        srna= RNA_def_struct(brna, "MeshTextureFaceLayer", NULL);
-       RNA_def_struct_ui_text(srna, "Mesh Texture Face Layer", "Layer of texture faces in a Mesh datablock");
+       RNA_def_struct_ui_text(srna, "Mesh UV Map", "UV map with assigned image textures in a Mesh datablock");
        RNA_def_struct_sdna(srna, "CustomDataLayer");
        RNA_def_struct_path_func(srna, "rna_MeshTextureFaceLayer_path");
        RNA_def_struct_ui_icon(srna, ICON_GROUP_UVS);
  
        prop= RNA_def_property(srna, "active_render", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0);
 -      RNA_def_property_boolean_funcs(prop, "rna_MeshTextureFaceLayer_active_render_get",
 -                                     "rna_MeshTextureFaceLayer_active_render_set");
 +      RNA_def_property_boolean_funcs(prop, "rna_MeshTextureFaceLayer_active_render_get", "rna_MeshTextureFaceLayer_active_render_set");
-       RNA_def_property_ui_text(prop, "Active Render", "Set the layer as active for rendering");
+       RNA_def_property_ui_text(prop, "Active Render", "Set the map as active for rendering");
        RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
  
        prop= RNA_def_property(srna, "active_clone", PROP_BOOLEAN, PROP_NONE);
        prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_struct_type(prop, "MeshTextureFace");
        RNA_def_property_ui_text(prop, "Data", "");
 -      RNA_def_property_collection_funcs(prop, "rna_MeshTextureFaceLayer_data_begin", "rna_iterator_array_next",
 -                                              "rna_iterator_array_end", "rna_iterator_array_get",
 -                                              "rna_MeshTextureFaceLayer_data_length", NULL, NULL, NULL);
 +      RNA_def_property_collection_funcs(prop, "rna_MeshTextureFaceLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshTextureFaceLayer_data_length", NULL, NULL, NULL);
  
        srna= RNA_def_struct(brna, "MeshTextureFace", NULL);
 -      RNA_def_struct_sdna(srna, "MTFace");
 +      RNA_def_struct_sdna(srna, "MTexPoly");
-       RNA_def_struct_ui_text(srna, "Mesh Texture Face", "UV mapping, texturing and game engine data for a face");
+       RNA_def_struct_ui_text(srna, "Mesh UV Map Face", "UV map and image texture for a face");
        RNA_def_struct_path_func(srna, "rna_MeshTextureFace_path");
        RNA_def_struct_ui_icon(srna, ICON_FACESEL_HLT);
  
@@@ -2171,8 -1889,9 +2171,8 @@@ static void rna_def_uv_textures(Blender
        RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
  
        prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
 -      RNA_def_property_int_funcs(prop, "rna_Mesh_active_uv_texture_index_get",
 -                                 "rna_Mesh_active_uv_texture_index_set", "rna_Mesh_active_uv_texture_index_range");
 +      RNA_def_property_int_funcs(prop, "rna_Mesh_active_uv_texture_index_get", "rna_Mesh_active_uv_texture_index_set", "rna_Mesh_active_uv_texture_index_range");
-       RNA_def_property_ui_text(prop, "Active UV Texture Index", "Active UV texture index");
+       RNA_def_property_ui_text(prop, "Active UV Map Index", "Active UV Map index");
        RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
  }
  
@@@ -2261,18 -1939,19 +2261,18 @@@ static void rna_def_mesh(BlenderRNA *br
        RNA_def_property_collection_funcs(prop, "rna_Mesh_uv_textures_begin", NULL, NULL, NULL,
                                          "rna_Mesh_uv_textures_length", NULL, NULL, NULL);
        RNA_def_property_struct_type(prop, "MeshTextureFaceLayer");
-       RNA_def_property_ui_text(prop, "UV Textures", "All UV texture layers");
 -      RNA_def_property_ui_text(prop, "UV Maps", "");
++      RNA_def_property_ui_text(prop, "Clone UV Map", "UV map to be used as cloning source");
        rna_def_uv_textures(brna, prop);
  
        prop= RNA_def_property(srna, "uv_texture_clone", PROP_POINTER, PROP_UNSIGNED);
        RNA_def_property_struct_type(prop, "MeshTextureFaceLayer");
        RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_texture_clone_get", "rna_Mesh_uv_texture_clone_set", NULL, NULL);
        RNA_def_property_flag(prop, PROP_EDITABLE);
-       RNA_def_property_ui_text(prop, "Clone UV Texture", "UV texture layer to be used as cloning source");
+       RNA_def_property_ui_text(prop, "Clone UV Map", "UV map to be used as cloning source");
  
        prop= RNA_def_property(srna, "uv_texture_clone_index", PROP_INT, PROP_UNSIGNED);
 -      RNA_def_property_int_funcs(prop, "rna_Mesh_uv_texture_clone_index_get",
 -                                 "rna_Mesh_uv_texture_clone_index_set", "rna_Mesh_active_uv_texture_index_range");
 +      RNA_def_property_int_funcs(prop, "rna_Mesh_uv_texture_clone_index_get", "rna_Mesh_uv_texture_clone_index_set", "rna_Mesh_active_uv_texture_index_range");
-       RNA_def_property_ui_text(prop, "Clone UV Texture Index", "Clone UV texture layer index");
+       RNA_def_property_ui_text(prop, "Clone UV Map Index", "Clone UV texture index");
  
        prop= RNA_def_property(srna, "uv_texture_stencil", PROP_POINTER, PROP_UNSIGNED);
        RNA_def_property_struct_type(prop, "MeshTextureFaceLayer");
Simple merge
Simple merge