fix for crash with GLSL material when image couldn't be loaded.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 10 Feb 2011 14:59:17 +0000 (14:59 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 10 Feb 2011 14:59:17 +0000 (14:59 +0000)
also quiet pep8 warnings.

release/scripts/ui/properties_data_mesh.py
release/scripts/ui/properties_game.py
release/scripts/ui/properties_particle.py
release/scripts/ui/properties_physics_fluid.py
release/scripts/ui/properties_texture.py
release/scripts/ui/space_node.py
release/scripts/ui/space_userpref.py
source/blender/gpu/intern/gpu_material.c

index 79e1ba2c6c1fee78171c5bdae31fe5723f7b407f..44080b1ffe5f60b987f3b6e97263d74a60ee29fd 100644 (file)
@@ -33,7 +33,7 @@ class MESH_MT_vertex_group_specials(bpy.types.Menu):
         layout.operator("object.vertex_group_copy_to_linked", icon='LINK_AREA')
         layout.operator("object.vertex_group_copy_to_selected", icon='LINK_AREA')
         layout.operator("object.vertex_group_mirror", icon='ARROW_LEFTRIGHT')
-        layout.operator("object.vertex_group_remove", icon='X', text="Delete All").all=True
+        layout.operator("object.vertex_group_remove", icon='X', text="Delete All").all = True
 
 
 class MESH_MT_shape_key_specials(bpy.types.Menu):
index 183ad7ea79444ab9a48211d6040962395c704708..77f4da5d405282f88285123ecde9418629dbe429 100644 (file)
@@ -163,7 +163,6 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
             subsub.active = game.use_anisotropic_friction
             subsub.prop(game, "friction_coefficients", text="", slider=True)
 
-
         elif game.physics_type in ('SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'):
             layout.prop(ob, "hide_render", text="Invisible")
 
@@ -347,7 +346,7 @@ class RENDER_PT_game_performance(RenderButtonsPanel, bpy.types.Panel):
         row.prop(gs, "use_frame_rate")
         row.prop(gs, "use_display_lists")
 
-        
+
 class RENDER_PT_game_display(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Display"
     COMPAT_ENGINES = {'BLENDER_GAME'}
index ae39de3996b300cf8ef6e06e480f20e95a347eaf..27a9a972154e3bbfc6349dd00f261863de1c9f19 100644 (file)
@@ -177,7 +177,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel):
         if part.type == 'HAIR' and not part.use_advanced_hair:
             row.prop(part, "hair_length")
             return
-            
+
         if part.type != 'HAIR':
             split = layout.split()
 
@@ -1034,7 +1034,7 @@ class PARTICLE_PT_field_weights(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Field Weights"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
-    
+
     @classmethod
     def poll(cls, context):
         return particle_panel_poll(cls, context)
@@ -1083,7 +1083,7 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Vertexgroups"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
-    
+
     @classmethod
     def poll(cls, context):
         return particle_panel_poll(cls, context)
index 88eb926dfa0663a46481d5b2e167cfbb63341e88..5cc94c24c80ce8c549a20a3af4f07b2ce38bccc7 100644 (file)
@@ -42,7 +42,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
 
         if md:
             fluid = md.settings
-            
+
             row = layout.row()
             if fluid is None:
                 row.label("built without fluids")
index 1e786394ae0870e70c3fd4c5505caef215c4d631..8063dc92166e2c21bd4a681e1e9fcf9cc0098c7f 100644 (file)
@@ -1007,7 +1007,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel):
 
             row = layout.row()
             # only show bump settings if activated but not for normalmap images
-            row.active = tex.use_map_normal and not( tex.texture.type == 'IMAGE' and tex.texture.use_normal_map )
+            row.active = tex.use_map_normal and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map)
 
             col = row.column()
             col.prop(tex, "bump_method", text="Method")
index 98c24d407de0b9b21611e25e5ddca1b85c457204..64d833434e5b8d3d5a123bffe4618a28b7ff2d7f 100644 (file)
@@ -166,7 +166,7 @@ class NODE_MT_node(bpy.types.Menu):
         layout.operator("node.read_fullsamplelayers")
 
 
-# Node Backdrop options 
+# Node Backdrop options
 class NODE_PT_properties(bpy.types.Panel):
     bl_space_type = 'NODE_EDITOR'
     bl_region_type = 'UI'
index af3b5a5dc9d26980fa00a0a5c1954e111f2bb59f..ff88ed4008c6e6a4be12227a4ac96715073273a6 100644 (file)
@@ -1169,7 +1169,6 @@ class WM_OT_addon_install(bpy.types.Operator):
                 else:
                     os.remove(f_full)
 
-
     def execute(self, context):
         import traceback
         import zipfile
@@ -1216,7 +1215,6 @@ class WM_OT_addon_install(bpy.types.Operator):
             elif os.path.exists(path_dest):
                 self.report({'WARNING'}, "File already installed to %r\n" % path_dest)
                 return {'CANCELLED'}
-                
 
             #if not compressed file just copy into the addon path
             try:
index d1424dcabcd35069c6f3a4770209650e0fcc290e..310e2ec722cf98510c19be26d09c04aeef100c21 100644 (file)
@@ -1130,8 +1130,10 @@ static void do_material_tex(GPUShadeInput *shi)
                                                if( mtex->texflag & MTEX_BUMP_TEXTURESPACE ) {
                                                        float ima_x= 512.0f, ima_y= 512.f;              // prevent calling textureSize, glsl 1.3 only
                                                        ImBuf *ibuf= BKE_image_get_ibuf(tex->ima, &tex->iuser);
-                                                       if(ibuf) 
-                                                               ima_x= ibuf->x; ima_y= ibuf->y;
+                                                       if(ibuf) {
+                                                               ima_x= ibuf->x;
+                                                               ima_y= ibuf->y;
+                                                       }
                                                        
                                                        GPU_link( mat, "mtex_bump_apply_texspace",
                                                                  fDet, dBs, dBt, vR1, vR2,