[Bf-blender-cvs] [bdbf4471a6c] blender2.8: TexFace removal part 3

Campbell Barton noreply at git.blender.org
Thu May 25 07:15:20 CEST 2017


Commit: bdbf4471a6c4ba2d444eea5e7f0e6984b3aaafc2
Author: Campbell Barton
Date:   Thu May 25 15:11:00 2017 +1000
Branches: blender2.8
https://developer.blender.org/rBbdbf4471a6c4ba2d444eea5e7f0e6984b3aaafc2

TexFace removal part 3

- MTexPoly structure & layer type.
- The 'Mesh.uv_textures' layers.
- DerivedMesh TexFace drawing.
- Scripts & UI.

===================================================================

M	intern/cycles/blender/blender_mesh.cpp
M	release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_static.py
M	release/scripts/startup/bl_operators/add_mesh_torus.py
M	release/scripts/startup/bl_operators/mesh.py
M	release/scripts/startup/bl_operators/object.py
M	release/scripts/startup/bl_operators/object_quick_effects.py
M	release/scripts/startup/bl_operators/uvcalc_follow_active.py
M	release/scripts/startup/bl_operators/uvcalc_lightmap.py
M	release/scripts/startup/bl_operators/uvcalc_smart_project.py
M	release/scripts/startup/bl_ui/properties_data_mesh.py
M	release/scripts/startup/bl_ui/properties_data_modifier.py
M	release/scripts/startup/bl_ui/properties_material.py
M	release/scripts/startup/bl_ui/properties_paint_common.py
M	release/scripts/startup/bl_ui/properties_particle.py
M	release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
M	release/scripts/startup/bl_ui/properties_physics_smoke.py
M	release/scripts/startup/bl_ui/properties_texture.py
M	release/scripts/startup/bl_ui/space_image.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py
M	source/blender/alembic/intern/abc_mesh.cc
M	source/blender/blenkernel/BKE_customdata.h
M	source/blender/blenkernel/BKE_editmesh.h
M	source/blender/blenkernel/BKE_mesh.h
M	source/blender/blenkernel/intern/DerivedMesh.c
M	source/blender/blenkernel/intern/cdderivedmesh.c
M	source/blender/blenkernel/intern/customdata.c
M	source/blender/blenkernel/intern/data_transfer.c
M	source/blender/blenkernel/intern/editderivedmesh.c
M	source/blender/blenkernel/intern/editmesh.c
M	source/blender/blenkernel/intern/mesh.c
M	source/blender/blenkernel/intern/mesh_evaluate.c
M	source/blender/blenkernel/intern/mesh_validate.c
M	source/blender/blenloader/intern/readfile.c
M	source/blender/bmesh/intern/bmesh_mesh_conv.c
M	source/blender/collada/MeshImporter.cpp
M	source/blender/editors/include/ED_mesh.h
M	source/blender/editors/mesh/editmesh_utils.c
M	source/blender/editors/mesh/mesh_data.c
M	source/blender/editors/object/object_bake.c
M	source/blender/editors/object/object_data_transfer.c
M	source/blender/editors/sculpt_paint/paint_image_proj.c
M	source/blender/editors/sculpt_paint/sculpt_uv.c
M	source/blender/editors/space_image/image_edit.c
M	source/blender/editors/space_image/space_image.c
M	source/blender/editors/space_node/drawnode.c
M	source/blender/editors/space_view3d/view3d_draw_legacy.c
M	source/blender/editors/uvedit/uvedit_draw.c
M	source/blender/editors/uvedit/uvedit_ops.c
M	source/blender/editors/uvedit/uvedit_unwrap_ops.c
M	source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
M	source/blender/makesdna/DNA_customdata_types.h
M	source/blender/makesdna/DNA_mesh_types.h
M	source/blender/makesdna/DNA_meshdata_types.h
M	source/blender/makesrna/intern/rna_mesh.c
M	source/blender/makesrna/intern/rna_mesh_utils.h
M	source/blender/makesrna/intern/rna_modifier.c
M	source/blender/makesrna/intern/rna_object.c
M	source/blender/makesrna/intern/rna_scene_api.c
M	source/blender/modifiers/intern/MOD_dynamicpaint.c
M	source/blender/modifiers/intern/MOD_ocean.c
M	source/blender/modifiers/intern/MOD_uvproject.c
M	source/blender/python/bmesh/bmesh_py_api.c
M	source/blender/python/bmesh/bmesh_py_types.c
M	source/blender/python/bmesh/bmesh_py_types_customdata.c
M	source/blender/python/bmesh/bmesh_py_types_meshdata.c
M	source/blender/python/bmesh/bmesh_py_types_meshdata.h
M	source/blender/render/intern/source/convertblender.c
M	source/blenderplayer/bad_level_call_stubs/stubs.c
M	tests/python/bl_mesh_modifiers.py

===================================================================

diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp
index f13b9db7013..280773c8aa9 100644
--- a/intern/cycles/blender/blender_mesh.cpp
+++ b/intern/cycles/blender/blender_mesh.cpp
@@ -418,7 +418,7 @@ static void attr_create_uv_map(Scene *scene,
 		int i = 0;
 
 		for(b_mesh.uv_layers.begin(l); l != b_mesh.uv_layers.end(); ++l, ++i) {
-			bool active_render = b_mesh.uv_textures[i].active_render();
+			bool active_render = b_mesh.uv_layers[i].active_render();
 			AttributeStandard std = (active_render)? ATTR_STD_UV: ATTR_STD_NONE;
 			ustring name = ustring(l->name().c_str());
 
diff --git a/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_static.py b/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_static.py
index 9e2efcaa727..a13ba5c4ccc 100644
--- a/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_static.py
+++ b/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_static.py
@@ -10,7 +10,6 @@ op.include_armatures = False
 op.include_shapekeys = False
 op.deform_bones_only = False
 op.active_uv_only = True
-op.include_uv_textures = True
 op.use_texture_copies = True
 op.triangulate = True
 op.use_object_instantiation = False
diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py
index 0e5acea94f9..c7152c8a22f 100644
--- a/release/scripts/startup/bl_operators/add_mesh_torus.py
+++ b/release/scripts/startup/bl_operators/add_mesh_torus.py
@@ -79,7 +79,7 @@ def add_torus(major_rad, minor_rad, major_seg, minor_seg):
 def add_uvs(mesh, minor_seg, major_seg):
     from math import fmod
 
-    mesh.uv_textures.new()
+    mesh.uv_layers.new()
     uv_data = mesh.uv_layers.active.data
     polygons = mesh.polygons
     u_step = 1.0 / major_seg
@@ -286,4 +286,4 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
 
 classes = (
     AddTorus,
-)
\ No newline at end of file
+)
diff --git a/release/scripts/startup/bl_operators/mesh.py b/release/scripts/startup/bl_operators/mesh.py
index 4edefd7bf9b..9151f800497 100644
--- a/release/scripts/startup/bl_operators/mesh.py
+++ b/release/scripts/startup/bl_operators/mesh.py
@@ -50,7 +50,7 @@ class MeshMirrorUV(Operator):
     @classmethod
     def poll(cls, context):
         obj = context.active_object
-        return (obj and obj.type == 'MESH' and obj.data.uv_textures.active)
+        return (obj and obj.type == 'MESH' and obj.data.uv_layers.active)
 
     def execute(self, context):
         DIR = (self.direction == 'NEGATIVE')
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index b730e866323..69649676666 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -515,7 +515,7 @@ class JoinUVs(Operator):
         if is_editmode:
             bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
 
-        if not mesh.uv_textures:
+        if not mesh.uv_layers:
             self.report({'WARNING'},
                         "Object: %s, Mesh: '%s' has no UVs"
                         % (obj.name, mesh.name))
@@ -553,7 +553,7 @@ class JoinUVs(Operator):
                             else:
                                 uv_other = mesh_other.uv_layers.active
                                 if not uv_other:
-                                    mesh_other.uv_textures.new()
+                                    mesh_other.uv_layers.new()
                                     uv_other = mesh_other.uv_layers.active
                                     if not uv_other:
                                         self.report({'ERROR'}, "Could not add "
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py
index 16f29c77bb9..39191a896c9 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -222,7 +222,7 @@ class QuickExplode(Operator):
 
             if self.fade:
                 explode.show_dead = False
-                uv = obj.data.uv_textures.new("Explode fade")
+                uv = obj.data.uv_layers.new("Explode fade")
                 explode.particle_uv = uv.name
 
                 mat = object_ensure_material(obj, "Explode Fade")
diff --git a/release/scripts/startup/bl_operators/uvcalc_follow_active.py b/release/scripts/startup/bl_operators/uvcalc_follow_active.py
index 25ee5cafe81..29cefd83328 100644
--- a/release/scripts/startup/bl_operators/uvcalc_follow_active.py
+++ b/release/scripts/startup/bl_operators/uvcalc_follow_active.py
@@ -30,8 +30,8 @@ def extend(obj, operator, EXTEND_MODE):
     import bmesh
     me = obj.data
     # script will fail without UVs
-    if not me.uv_textures:
-        me.uv_textures.new()
+    if not me.uv_layers:
+        me.uv_layers.new()
 
     bm = bmesh.from_edit_mesh(me)
 
@@ -252,4 +252,4 @@ class FollowActiveQuads(Operator):
 
 classes = (
     FollowActiveQuads,
-)
\ No newline at end of file
+)
diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
index 8ee29d15d1b..61ceb3c04c4 100644
--- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py
+++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
@@ -275,12 +275,12 @@ def lightmap_uvpack(meshes,
             face_groups.append(faces)
 
         if PREF_NEW_UVLAYER:
-            me.uv_textures.new()
+            me.uv_layers.new()
 
         # Add face UV if it does not exist.
         # All new faces are selected.
-        if not me.uv_textures:
-            me.uv_textures.new()
+        if not me.uv_layers:
+            me.uv_layers.new()
 
     for face_sel in face_groups:
         print("\nStarting unwrap")
@@ -538,6 +538,9 @@ def lightmap_uvpack(meshes,
         print("done")
 
         if PREF_APPLY_IMAGE:
+            pass
+            # removed with texface
+            '''
             if not PREF_PACK_IN_ONE:
                 image = bpy.data.images.new(name="lightmap",
                                             width=PREF_IMG_PX_SIZE,
@@ -545,8 +548,8 @@ def lightmap_uvpack(meshes,
                                             )
 
             for f in face_sel:
-                # f.image = image
-                f.id_data.uv_textures.active.data[f.index].image = image  # XXX25
+                f.image = image
+            '''
 
     for me in meshes:
         me.update()
@@ -672,4 +675,4 @@ class LightMapPack(Operator):
 
 classes = (
     LightMapPack,
-)
\ No newline at end of file
+)
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index 5581415c083..b7ef6856575 100644
--- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py
+++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
@@ -810,8 +810,8 @@ def main(context,
         # Tag as used
         me.tag = True
 
-        if not me.uv_textures: # Mesh has no UV Coords, don't bother.
-            me.uv_textures.new()
+        if not me.uv_layers: # Mesh has no UV Coords, don't bother.
+            me.uv_layers.new()
 
         uv_layer = me.uv_layers.active.data
         me_verts = list(me.vertices)
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index e7e7d87bf5b..4dc6b8ee6ce 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -332,7 +332,7 @@ class DATA_PT_uv_texture(MeshButtonsPanel, Panel):
         row = layout.row()
         col = row.column()
 
-        col.template_list("MESH_UL_uvmaps_vcols", "uvmaps", me, "uv_textures", me.uv_textures, "active_index", rows=1)
+        col.template_list("MESH_UL_uvmaps_vcols", "uvmaps", me, "uv_layers", me.uv_layers, "active_index", rows=1)
 
         col = row.column(align=True)
         col.operator("mesh.uv_texture_add", icon='ZOOMIN', text="")
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index e2c828e5469..05321ee4486 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -355,7 +355,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
             col.prop(md, "texture_coords_object", text="")
         elif md.texture_coords == 'UV' and ob.type == 'MESH':
             col.label(text="UV Map:")
-            col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="")
+            col.prop_search(md, "uv_layer", ob.data, "uv_layers", text="")
 
         layout.separator()
 
@@ -387,7 +387,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         sub.active = bool(md.vertex_group)
         sub.prop(md, "protect")
         col.label(text="Particle UV")
-        col.prop_search(md, "particle_uv", ob.data, "uv_textures", text="")
+        col.prop_search(md, "particle_uv", ob.data, "uv_layers", text="")
 
         col = split.column()
         col.prop(md, "use_edge_cut")
@@ -985,7 +985,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
         col = split.column()
         col.label(text="UV Map:")
-        col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="")
+        col.prop_search(md, "uv_layer", ob.data, "uv_layers", text="")
 
         split = layout.split()
         col = split.column()
@@ -1042,7 +1042,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         if md.texture_coords == 'OBJECT':
             layout.prop(md, "texture_coords_object", text="Object")
         elif md.texture_coords == 'UV' and ob.type == 'MESH':
-            layout.prop_search(md, "uv_layer", ob.data, "uv_textures")
+            layout.prop_search(md, "uv_layer", ob.data, "uv_layers")
 
     def WAVE(self, layout, ob, md):
         split = layout.split()
@@ -1088,7 +1088,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.template_ID(md, "texture", new="texture.new")
         layout.pr

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list