diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-04 08:26:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-04 08:26:33 +0400 |
commit | b59b7bba820d1fed0fc250283821058831985ce2 (patch) | |
tree | 2ea1c98ef71a995ea84a9895a398a23740521186 | |
parent | 279933b83f0eeb77a1a32c8ddd6d58b4e36c8342 (diff) |
use sets for checking against multiple values.
-rw-r--r-- | io_scene_fbx/export_fbx.py | 2 | ||||
-rw-r--r-- | modules/cursor_utils.py | 3 | ||||
-rw-r--r-- | netrender/utils.py | 8 | ||||
-rw-r--r-- | render_renderfarmfi.py | 2 | ||||
-rw-r--r-- | rigify/ui.py | 4 | ||||
-rw-r--r-- | system_demo_mode/__init__.py | 4 |
6 files changed, 10 insertions, 13 deletions
diff --git a/io_scene_fbx/export_fbx.py b/io_scene_fbx/export_fbx.py index a310325a..8790e60d 100644 --- a/io_scene_fbx/export_fbx.py +++ b/io_scene_fbx/export_fbx.py @@ -1005,7 +1005,7 @@ def save_single(operator, scene, filepath="", do_shadow = False else: do_light = not (light.use_only_shadow or (not light.use_diffuse and not light.use_specular)) - do_shadow = (light.shadow_method in ('RAY_SHADOW', 'BUFFER_SHADOW')) + do_shadow = (light.shadow_method in {'RAY_SHADOW', 'BUFFER_SHADOW'}) # scale = abs(global_matrix.to_scale()[0]) # scale is always uniform in this case # UNUSED diff --git a/modules/cursor_utils.py b/modules/cursor_utils.py index 96262145..22aba71b 100644 --- a/modules/cursor_utils.py +++ b/modules/cursor_utils.py @@ -56,6 +56,3 @@ class CursorAccess: def getCursor(cls): spc = cls.findSpace() return spc.cursor_location - - - diff --git a/netrender/utils.py b/netrender/utils.py index fa10386e..da5b744c 100644 --- a/netrender/utils.py +++ b/netrender/utils.py @@ -88,7 +88,7 @@ else: def __exit__(self, exc_type, exc_value, traceback): pass -if system in ('Windows', 'win32') and platform.version() >= '5': # Error mode is only available on Win2k or higher, that's version 5 +if system in {'Windows', 'win32'} and platform.version() >= '5': # Error mode is only available on Win2k or higher, that's version 5 import ctypes class NoErrorDialogContext: def __init__(self): @@ -189,9 +189,9 @@ def clientScan(report = None): def clientConnection(address, port, report = None, scan = True, timeout = 5): if address == "[default]": # calling operator from python is fucked, scene isn't in context -# if bpy: -# bpy.ops.render.netclientscan() -# else: +# if bpy: +# bpy.ops.render.netclientscan() +# else: if not scan: return None diff --git a/render_renderfarmfi.py b/render_renderfarmfi.py index 3a75d26c..382dff1c 100644 --- a/render_renderfarmfi.py +++ b/render_renderfarmfi.py @@ -774,7 +774,7 @@ def xmlSessionsToOreSessions(sessions, stage=None): #, queue): s = s + ' (' + stage + ')' #t = session['timestamps'] sinfo = OreSession(session['sessionId'], s) - if stage in ('Completed', 'Active'): + if stage in {'Completed', 'Active'}: sinfo.frames = session['framesRendered'] sinfo.startframe = session['startFrame'] sinfo.endframe = session['endFrame'] diff --git a/rigify/ui.py b/rigify/ui.py index bc5c4d8f..d42c96da 100644 --- a/rigify/ui.py +++ b/rigify/ui.py @@ -38,7 +38,7 @@ class DATA_PT_rigify_buttons(bpy.types.Panel): return False #obj = context.object #if obj: - # return (obj.mode in ('POSE', 'OBJECT', 'EDIT')) + # return (obj.mode in {'POSE', 'OBJECT', 'EDIT'}) #return False return True @@ -133,7 +133,7 @@ class BONE_PT_rigify_buttons(bpy.types.Panel): return False obj = context.object if obj: - return (obj.mode in ('POSE')) + return obj.mode == 'POSE' return False def draw(self, context): diff --git a/system_demo_mode/__init__.py b/system_demo_mode/__init__.py index 250327a2..febbad2e 100644 --- a/system_demo_mode/__init__.py +++ b/system_demo_mode/__init__.py @@ -174,7 +174,7 @@ class DemoModeSetup(bpy.types.Operator): layout.separator() sub = layout.column() - sub.active = (mode in ('AUTO', 'PLAY')) + sub.active = (mode in {'AUTO', 'PLAY'}) sub.label("Animate Settings:") sub.prop(self, "anim_cycles") sub.prop(self, "anim_time_min") @@ -183,7 +183,7 @@ class DemoModeSetup(bpy.types.Operator): layout.separator() sub = layout.column() - sub.active = (mode in ('AUTO', 'RENDER')) + sub.active = (mode in {'AUTO', 'RENDER'}) sub.label("Render Settings:") sub.prop(self, "display_render") |