[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25339] trunk/blender/release/scripts: use python3 syntax for defining a set.

Campbell Barton ideasman42 at gmail.com
Sun Dec 13 17:20:18 CET 2009


Revision: 25339
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25339
Author:   campbellbarton
Date:     2009-12-13 17:20:18 +0100 (Sun, 13 Dec 2009)

Log Message:
-----------
use python3 syntax for defining a set.

Modified Paths:
--------------
    trunk/blender/release/scripts/io/engine_render_pov.py
    trunk/blender/release/scripts/io/netrender/ui.py
    trunk/blender/release/scripts/modules/retopo.py
    trunk/blender/release/scripts/modules/rigify/__init__.py
    trunk/blender/release/scripts/ui/properties_material.py
    trunk/blender/release/scripts/ui/properties_render.py
    trunk/blender/release/scripts/ui/properties_scene.py
    trunk/blender/release/scripts/ui/properties_world.py

Modified: trunk/blender/release/scripts/io/engine_render_pov.py
===================================================================
--- trunk/blender/release/scripts/io/engine_render_pov.py	2009-12-13 15:48:57 UTC (rev 25338)
+++ trunk/blender/release/scripts/io/engine_render_pov.py	2009-12-13 16:20:18 UTC (rev 25339)
@@ -868,7 +868,7 @@
 
 class RENDER_PT_povray_radiosity(RenderButtonsPanel):
     bl_label = "Radiosity"
-    COMPAT_ENGINES = set(['POVRAY_RENDER'])
+    COMPAT_ENGINES = {'POVRAY_RENDER'}
 
     def draw_header(self, context):
         scene = context.scene

Modified: trunk/blender/release/scripts/io/netrender/ui.py
===================================================================
--- trunk/blender/release/scripts/io/netrender/ui.py	2009-12-13 15:48:57 UTC (rev 25338)
+++ trunk/blender/release/scripts/io/netrender/ui.py	2009-12-13 16:20:18 UTC (rev 25339)
@@ -50,7 +50,7 @@
 @rnaType
 class RENDER_PT_network_settings(RenderButtonsPanel):
 	bl_label = "Network Settings"
-	COMPAT_ENGINES = set(['NET_RENDER'])
+	COMPAT_ENGINES = {'NET_RENDER'}
 
 	def draw(self, context):
 		layout = self.layout
@@ -76,7 +76,7 @@
 @rnaType
 class RENDER_PT_network_job(RenderButtonsPanel):
 	bl_label = "Job Settings"
-	COMPAT_ENGINES = set(['NET_RENDER'])
+	COMPAT_ENGINES = {'NET_RENDER'}
 	
 	def poll(self, context):
 		scene = context.scene
@@ -105,7 +105,7 @@
 @rnaType
 class RENDER_PT_network_slaves(RenderButtonsPanel):
 	bl_label = "Slaves Status"
-	COMPAT_ENGINES = set(['NET_RENDER'])
+	COMPAT_ENGINES = {'NET_RENDER'}
 	
 	def poll(self, context):
 		scene = context.scene
@@ -141,7 +141,7 @@
 @rnaType
 class RENDER_PT_network_slaves_blacklist(RenderButtonsPanel):
 	bl_label = "Slaves Blacklist"
-	COMPAT_ENGINES = set(['NET_RENDER'])
+	COMPAT_ENGINES = {'NET_RENDER'}
 	
 	def poll(self, context):
 		scene = context.scene
@@ -176,7 +176,7 @@
 @rnaType
 class RENDER_PT_network_jobs(RenderButtonsPanel):
 	bl_label = "Jobs"
-	COMPAT_ENGINES = set(['NET_RENDER'])
+	COMPAT_ENGINES = {'NET_RENDER'}
 	
 	def poll(self, context):
 		scene = context.scene

Modified: trunk/blender/release/scripts/modules/retopo.py
===================================================================
--- trunk/blender/release/scripts/modules/retopo.py	2009-12-13 15:48:57 UTC (rev 25338)
+++ trunk/blender/release/scripts/modules/retopo.py	2009-12-13 16:20:18 UTC (rev 25339)
@@ -99,11 +99,11 @@
             return True
 
         for i, l_a in enumerate(self.links):
-            links_a = set([l.index for l in l_a.links])
+            links_a = {l.index for l in l_a.links}
             for j in range(i):
                 l_b = self.links[j]
 
-                links_b = set([l.index for l in l_b.links])
+                links_b = {l.index for l in l_b.links}
 
                 isect = links_a.intersection(links_b)
                 if len(isect) == 2:

Modified: trunk/blender/release/scripts/modules/rigify/__init__.py
===================================================================
--- trunk/blender/release/scripts/modules/rigify/__init__.py	2009-12-13 15:48:57 UTC (rev 25338)
+++ trunk/blender/release/scripts/modules/rigify/__init__.py	2009-12-13 16:20:18 UTC (rev 25339)
@@ -233,7 +233,7 @@
         #    leg.ik and arm.fk could not be blended.
         results = OrderedDict()
 
-        bone_names_pre = set([bone.name for bone in arm.bones])
+        bone_names_pre = {bone.name for bone in arm.bones}
 
         for type_name, type_func in bone_typeinfos[bone_name]:
             # this bones definition of the current typeinfo
@@ -260,7 +260,7 @@
                 blend_bone_list(obj, definition, result_submod[0], result_submod[1], target_bone=bone_name)
 
 
-        bone_names_post = set([bone.name for bone in arm.bones])
+        bone_names_post = {bone.name for bone in arm.bones}
 
         # Store which bones were created from this one
         bone_genesis[bone_name] = list(bone_names_post - bone_names_pre)

Modified: trunk/blender/release/scripts/ui/properties_material.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_material.py	2009-12-13 15:48:57 UTC (rev 25338)
+++ trunk/blender/release/scripts/ui/properties_material.py	2009-12-13 16:20:18 UTC (rev 25339)
@@ -56,7 +56,7 @@
 
 class MATERIAL_PT_preview(MaterialButtonsPanel):
     bl_label = "Preview"
-    COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
         self.layout.template_preview(context.material)
@@ -65,7 +65,7 @@
 class MATERIAL_PT_context_material(MaterialButtonsPanel):
     bl_label = ""
     bl_show_header = False
-    COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def poll(self, context):
         # An exception, dont call the parent poll func because
@@ -127,7 +127,7 @@
 
 class MATERIAL_PT_shading(MaterialButtonsPanel):
     bl_label = "Shading"
-    COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def poll(self, context):
         mat = active_node_mat(context.material)
@@ -166,7 +166,7 @@
 class MATERIAL_PT_strand(MaterialButtonsPanel):
     bl_label = "Strand"
     bl_default_closed = True
-    COMPAT_ENGINES = set(['BLENDER_RENDER'])
+    COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def poll(self, context):
         mat = context.material
@@ -214,7 +214,7 @@
 
 class MATERIAL_PT_physics(MaterialButtonsPanel):
     bl_label = "Physics"
-    COMPAT_ENGINES = set(['BLENDER_GAME'])
+    COMPAT_ENGINES = {'BLENDER_GAME'}
 
     def draw(self, context):
         layout = self.layout
@@ -238,7 +238,7 @@
 
 class MATERIAL_PT_options(MaterialButtonsPanel):
     bl_label = "Options"
-    COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def poll(self, context):
         mat = active_node_mat(context.material)
@@ -284,7 +284,7 @@
 class MATERIAL_PT_shadow(MaterialButtonsPanel):
     bl_label = "Shadow"
     bl_default_closed = True
-    COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def poll(self, context):
         mat = active_node_mat(context.material)
@@ -320,7 +320,7 @@
 
 class MATERIAL_PT_diffuse(MaterialButtonsPanel):
     bl_label = "Diffuse"
-    COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def poll(self, context):
         mat = active_node_mat(context.material)
@@ -391,7 +391,7 @@
 
 class MATERIAL_PT_specular(MaterialButtonsPanel):
     bl_label = "Specular"
-    COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def poll(self, context):
         mat = active_node_mat(context.material)
@@ -461,7 +461,7 @@
 class MATERIAL_PT_sss(MaterialButtonsPanel):
     bl_label = "Subsurface Scattering"
     bl_default_closed = True
-    COMPAT_ENGINES = set(['BLENDER_RENDER'])
+    COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def poll(self, context):
         mat = active_node_mat(context.material)
@@ -513,7 +513,7 @@
 class MATERIAL_PT_mirror(MaterialButtonsPanel):
     bl_label = "Mirror"
     bl_default_closed = True
-    COMPAT_ENGINES = set(['BLENDER_RENDER'])
+    COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def poll(self, context):
         mat = active_node_mat(context.material)
@@ -572,7 +572,7 @@
 class MATERIAL_PT_transp(MaterialButtonsPanel):
     bl_label = "Transparency"
     bl_default_closed = True
-    COMPAT_ENGINES = set(['BLENDER_RENDER'])
+    COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def poll(self, context):
         mat = active_node_mat(context.material)
@@ -638,7 +638,7 @@
 
 class MATERIAL_PT_halo(MaterialButtonsPanel):
     bl_label = "Halo"
-    COMPAT_ENGINES = set(['BLENDER_RENDER'])
+    COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def poll(self, context):
         mat = context.material
@@ -688,7 +688,7 @@
 
 class MATERIAL_PT_flare(MaterialButtonsPanel):
     bl_label = "Flare"
-    COMPAT_ENGINES = set(['BLENDER_RENDER'])
+    COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def poll(self, context):
         mat = context.material
@@ -750,7 +750,7 @@
 class MATERIAL_PT_volume_density(VolumeButtonsPanel):
     bl_label = "Density"
     bl_default_closed = False
-    COMPAT_ENGINES = set(['BLENDER_RENDER'])
+    COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
         layout = self.layout
@@ -770,7 +770,7 @@
 class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
     bl_label = "Shading"
     bl_default_closed = False
-    COMPAT_ENGINES = set(['BLENDER_RENDER'])
+    COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
         layout = self.layout
@@ -798,7 +798,7 @@
 class MATERIAL_PT_volume_lighting(VolumeButtonsPanel):
     bl_label = "Lighting"
     bl_default_closed = False
-    COMPAT_ENGINES = set(['BLENDER_RENDER'])
+    COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
         layout = self.layout
@@ -835,7 +835,7 @@
 
 class MATERIAL_PT_volume_transp(VolumeButtonsPanel):
     bl_label = "Transparency"
-    COMPAT_ENGINES = set(['BLENDER_RENDER'])
+    COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
         layout = self.layout
@@ -852,7 +852,7 @@
 class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
     bl_label = "Integration"
     bl_default_closed = False
-    COMPAT_ENGINES = set(['BLENDER_RENDER'])
+    COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
         layout = self.layout

Modified: trunk/blender/release/scripts/ui/properties_render.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_render.py	2009-12-13 15:48:57 UTC (rev 25338)
+++ trunk/blender/release/scripts/ui/properties_render.py	2009-12-13 16:20:18 UTC (rev 25339)
@@ -42,7 +42,7 @@
 
 class RENDER_PT_render(RenderButtonsPanel):
     bl_label = "Render"
-    COMPAT_ENGINES = set(['BLENDER_RENDER'])
+    COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
         layout = self.layout
@@ -65,7 +65,7 @@
 class RENDER_PT_layers(RenderButtonsPanel):
     bl_label = "Layers"
     bl_default_closed = True
-    COMPAT_ENGINES = set(['BLENDER_RENDER'])
+    COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list