diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-05 00:10:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-05 00:10:51 +0300 |
commit | c79cf56b69ecf3f49c220ce6dea626caa48e089b (patch) | |
tree | 5155e9255aa4e4c2942849a8f86437825ccc7ae3 | |
parent | 2034a77a4574314cc1eff2193630b62ee239c194 (diff) |
dict.get() defaults to None as the second arg. no need to supply it.
-rw-r--r-- | release/scripts/io/import_scene_obj.py | 4 | ||||
-rw-r--r-- | release/scripts/io/netrender/master.py | 4 | ||||
-rw-r--r-- | release/scripts/io/netrender/ui.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/rigify_utils.py | 8 |
4 files changed, 9 insertions, 9 deletions
diff --git a/release/scripts/io/import_scene_obj.py b/release/scripts/io/import_scene_obj.py index 228084561b8..59fbef5b8ad 100644 --- a/release/scripts/io/import_scene_obj.py +++ b/release/scripts/io/import_scene_obj.py @@ -886,12 +886,12 @@ def create_nurbs(scn, context_nurbs, vert_loc, new_objects): Add nurbs object to blender, only support one type at the moment ''' deg = context_nurbs.get('deg', (3,)) - curv_range = context_nurbs.get('curv_range', None) + curv_range = context_nurbs.get('curv_range') curv_idx = context_nurbs.get('curv_idx', []) parm_u = context_nurbs.get('parm_u', []) parm_v = context_nurbs.get('parm_v', []) name = context_nurbs.get('name', 'ObjNurb') - cstype = context_nurbs.get('cstype', None) + cstype = context_nurbs.get('cstype') if cstype == None: print('\tWarning, cstype not found') diff --git a/release/scripts/io/netrender/master.py b/release/scripts/io/netrender/master.py index 00be3cf9bc9..00ea688a886 100644 --- a/release/scripts/io/netrender/master.py +++ b/release/scripts/io/netrender/master.py @@ -760,7 +760,7 @@ class RenderMasterServer(http.server.HTTPServer): self.slaves_map.pop(slave.id) def getSlave(self, slave_id): - return self.slaves_map.get(slave_id, None) + return self.slaves_map.get(slave_id) def getSeenSlave(self, slave_id): slave = self.getSlave(slave_id) @@ -842,7 +842,7 @@ class RenderMasterServer(http.server.HTTPServer): job.save() def getJobID(self, id): - return self.jobs_map.get(id, None) + return self.jobs_map.get(id) def __iter__(self): for job in self.jobs: diff --git a/release/scripts/io/netrender/ui.py b/release/scripts/io/netrender/ui.py index 0b8adc4e03d..ff35653829d 100644 --- a/release/scripts/io/netrender/ui.py +++ b/release/scripts/io/netrender/ui.py @@ -303,7 +303,7 @@ NetRenderSettings.BoolProperty( attr="server_broadcast", description="broadcast server address on local network", default = True) -default_path = os.environ.get("TEMP", None) +default_path = os.environ.get("TEMP") if not default_path: if os.name == 'nt': diff --git a/release/scripts/modules/rigify_utils.py b/release/scripts/modules/rigify_utils.py index 371792a3633..83b23b28869 100644 --- a/release/scripts/modules/rigify_utils.py +++ b/release/scripts/modules/rigify_utils.py @@ -129,7 +129,7 @@ def blend_bone_list(obj, apply_bones, from_bones, to_bones, target_bone=None, ta target_bone = apply_bones[-1] # default to the last bone prop_pbone = obj.pose.bones[target_bone] - if prop_pbone.get(target_bone, None) is None: + if prop_pbone.get(target_bone) is None: prop = rna_idprop_ui_prop_get(prop_pbone, target_prop, create=True) prop_pbone[target_prop] = blend_default prop["soft_min"] = 0.0 @@ -402,9 +402,9 @@ def _bone_class_instance_update(self): for member in self.attr_names: name = getattr(self, member, None) if name is not None: - setattr(self, member + "_b", bbones.get(name, None)) - setattr(self, member + "_p", pbones.get(name, None)) - setattr(self, member + "_e", ebones.get(name, None)) + setattr(self, member + "_b", bbones.get(name)) + setattr(self, member + "_p", pbones.get(name)) + setattr(self, member + "_e", ebones.get(name)) def _bone_class_instance_rename(self, attr, new_name): |