[Bf-extensions-cvs] [6edc78c] master: [UVUtilities] fix for Campbell's suggestions

mifth noreply at git.blender.org
Tue Dec 17 11:17:58 CET 2013


Commit: 6edc78cab0f944eabcaad8028d2bdf8e9aa12f05
Author: mifth
Date:   Tue Dec 17 14:17:55 2013 +0400
http://developer.blender.org/rBAC6edc78cab0f944eabcaad8028d2bdf8e9aa12f05

[UVUtilities] fix for Campbell's suggestions

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

M	uv_utility.py

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

diff --git a/uv_utility.py b/uv_utility.py
index 8d47efb..6f5f3b9 100644
--- a/uv_utility.py
+++ b/uv_utility.py
@@ -34,7 +34,10 @@ from bpy.types import (Operator,
                        Panel,
                        PropertyGroup,
                        )
-from bpy.props import *
+from bpy.props import (IntProperty,
+                       StringProperty,
+                       BoolProperty,
+                       )
 
 
 class UV_IC_Panel():
@@ -48,7 +51,7 @@ class UV_IC_TexIndex(PropertyGroup):
         description="get UVIndex of selected objects",
         min=1,
         max=8,
-             default=1)
+        default=1)
 
     bpy.types.Scene.UVTexGetName = StringProperty(
         name="UVNameToGet",
@@ -62,7 +65,7 @@ class UV_IC_TexIndex(PropertyGroup):
     )
 
 
-class UV_IC_Main(UV_IC_Panel, Panel):
+class UV_IC_panel(UV_IC_Panel, Panel):
     bl_context = "objectmode"
     bl_label = "UV Utility"
     bl_options = {"DEFAULT_CLOSED"}
@@ -108,7 +111,7 @@ class UV_IC_ChangeIndex(UV_IC_Panel, Operator):
             meshData = theObj.data
 
             if theObj.type == 'MESH':
-                if len(meshData.uv_textures) > meshData.uv_textures.active_index and len(meshData.uv_textures) > 0:
+                if len(meshData.uv_textures) > meshData.uv_textures.active_index and meshData.uv_textures:
                     # meshData.uv_textures.active_index = 0
                     tmpuvmap = meshData.uv_textures.active
                     tmpuvmap_name = tmpuvmap.name



More information about the Bf-extensions-cvs mailing list