diff options
Diffstat (limited to 'release/scripts/startup/bl_operators')
7 files changed, 20 insertions, 17 deletions
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) |