diff --git a/release/scripts/ui/properties_data_armature.py b/release/scripts/ui/properties_data_armature.py index a5db2bbd1a3..b0d2873fb8f 100644 --- a/release/scripts/ui/properties_data_armature.py +++ b/release/scripts/ui/properties_data_armature.py @@ -127,18 +127,18 @@ class DATA_PT_bone_groups(DataButtonsPanel): row.template_list(pose, "bone_groups", pose, "active_bone_group_index", rows=2) col = row.column(align=True) - col.active = (ob.proxy == None) + col.active = (ob.proxy is None) col.itemO("pose.group_add", icon='ICON_ZOOMIN', text="") col.itemO("pose.group_remove", icon='ICON_ZOOMOUT', text="") group = pose.active_bone_group if group: col = layout.column() - col.active = (ob.proxy == None) + col.active = (ob.proxy is None) col.itemR(group, "name") split = layout.split() - split.active = (ob.proxy == None) + split.active = (ob.proxy is None) col = split.column() col.itemR(group, "color_set") @@ -148,7 +148,7 @@ class DATA_PT_bone_groups(DataButtonsPanel): col.template_triColorSet(group, "colors") row = layout.row(align=True) - row.active = (ob.proxy == None) + row.active = (ob.proxy is None) row.itemO("pose.group_assign", text="Assign") row.itemO("pose.group_remove", text="Remove") #row.itemO("pose.bone_group_remove_from", text="Remove") diff --git a/release/scripts/ui/properties_data_bone.py b/release/scripts/ui/properties_data_bone.py index 0770942a6ea..a102c2c4db6 100644 --- a/release/scripts/ui/properties_data_bone.py +++ b/release/scripts/ui/properties_data_bone.py @@ -185,7 +185,7 @@ class BONE_PT_relations(BoneButtonsPanel): col.item_pointerR(bone, "parent", arm, "edit_bones", text="") sub = col.column() - sub.active = bone.parent != None + sub.active = (bone.parent is not None) sub.itemR(bone, "connected") sub.itemR(bone, "hinge", text="Inherit Rotation") sub.itemR(bone, "inherit_scale", text="Inherit Scale") diff --git a/release/scripts/ui/properties_data_mesh.py b/release/scripts/ui/properties_data_mesh.py index acbeb3552de..fb00ff49700 100644 --- a/release/scripts/ui/properties_data_mesh.py +++ b/release/scripts/ui/properties_data_mesh.py @@ -156,7 +156,7 @@ class DATA_PT_shape_keys(DataButtonsPanel): enable_edit = ob.mode != 'EDIT' enable_edit_value = False - if ob.shape_key_lock == False: + if ob.shape_key_lock is False: if enable_edit or (ob.type == 'MESH' and ob.shape_key_edit_mode): enable_edit_value = True diff --git a/release/scripts/ui/properties_object.py b/release/scripts/ui/properties_object.py index a1e3edba8ee..e124d654b53 100644 --- a/release/scripts/ui/properties_object.py +++ b/release/scripts/ui/properties_object.py @@ -135,7 +135,7 @@ class OBJECT_PT_relations(ObjectButtonsPanel): parent = ob.parent if parent and ob.parent_type == 'BONE' and parent.type == 'ARMATURE': sub.item_pointerR(ob, "parent_bone", parent.data, "bones", text="") - sub.active = parent != None + sub.active = (parent is not None) class OBJECT_PT_groups(ObjectButtonsPanel): @@ -276,10 +276,10 @@ class OBJECT_PT_animation(ObjectButtonsPanel): row.active = len(ob.particle_systems) != 0 row = col.row() row.itemR(ob, "time_offset_parent", text="Parent") - row.active = ob.parent != None + row.active = (ob.parent is not None) row = col.row() row.itemR(ob, "slow_parent") - row.active = ob.parent != None + row.active = (ob.parent is not None) col.itemR(ob, "time_offset", text="Offset") if wide_ui: @@ -290,7 +290,7 @@ class OBJECT_PT_animation(ObjectButtonsPanel): col.itemR(ob, "up_axis", text="Up Axis") row = col.row() row.itemR(ob, "track_override_parent", text="Override Parent") - row.active = ob.parent != None + row.active = (ob.parent is not None) class OBJECT_PT_properties(ObjectButtonsPanel): diff --git a/release/scripts/ui/properties_particle.py b/release/scripts/ui/properties_particle.py index 840ba549d87..276643b32ff 100644 --- a/release/scripts/ui/properties_particle.py +++ b/release/scripts/ui/properties_particle.py @@ -26,14 +26,14 @@ from properties_physics_common import basic_force_field_falloff_ui def particle_panel_enabled(context, psys): - return psys.point_cache.baked == False and psys.edited == False and (not context.particle_system_editable) + return (psys.point_cache.baked is False) and (not psys.edited) and (not context.particle_system_editable) def particle_panel_poll(context): psys = context.particle_system - if psys == None: + if psys is None: return False - if psys.settings == None: + if psys.settings is None: return False return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR') @@ -110,14 +110,14 @@ class PARTICLE_PT_particles(ParticleButtonsPanel): split = layout.split(percentage=0.65) if part.type == 'HAIR': - if psys.edited == True: + if psys.edited: split.itemO("particle.edited_clear", text="Free Edit") else: split.itemL(text="") row = split.row() row.enabled = particle_panel_enabled(context, psys) row.itemR(part, "hair_step") - if psys.edited == True: + if psys.edited: if psys.global_hair: layout.itemO("particle.connect_hair") layout.itemL(text="Hair is disconnected.") @@ -190,9 +190,9 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel): def poll(self, context): psys = context.particle_system - if psys == None: + if psys is None: return False - if psys.settings == None: + if psys.settings is None: return False return psys.settings.type == 'HAIR' @@ -240,9 +240,9 @@ class PARTICLE_PT_cache(ParticleButtonsPanel): def poll(self, context): psys = context.particle_system - if psys == None: + if psys is None: return False - if psys.settings == None: + if psys.settings is None: return False phystype = psys.settings.physics_type if phystype == 'NO' or phystype == 'KEYED': @@ -488,9 +488,9 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel): def poll(self, context): psys = context.particle_system - if psys == None: + if psys is None: return False - if psys.settings == None: + if psys.settings is None: return False if psys.point_cache.external: return False @@ -586,9 +586,9 @@ class PARTICLE_PT_render(ParticleButtonsPanel): def poll(self, context): psys = context.particle_system - if psys == None: + if psys is None: return False - if psys.settings == None: + if psys.settings is None: return False return True @@ -625,20 +625,20 @@ class PARTICLE_PT_render(ParticleButtonsPanel): sub.itemR(part, "velocity_length") elif part.ren_as == 'PATH': - if part.type != 'HAIR' and part.physics_type != 'KEYED' and psys.point_cache.baked == False: + if part.type != 'HAIR' and part.physics_type != 'KEYED' and (psys.point_cache.baked is False): box = layout.box() box.itemL(text="Baked or keyed particles needed for correct rendering.") return sub.itemR(part, "render_strand") subsub = sub.column() - subsub.active = part.render_strand == False + subsub.active = (part.render_strand is False) subsub.itemR(part, "render_adaptive") subsub = sub.column() subsub.active = part.render_adaptive or part.render_strand == True subsub.itemR(part, "adaptive_angle") subsub = sub.column() - subsub.active = part.render_adaptive == True and part.render_strand == False + subsub.active = (part.render_adaptive is True and part.render_strand is False) subsub.itemR(part, "adaptive_pix") sub.itemR(part, "hair_bspline") sub.itemR(part, "render_step", text="Steps") @@ -675,12 +675,12 @@ class PARTICLE_PT_render(ParticleButtonsPanel): sub = split.column() sub.itemR(part, "whole_group") subsub = sub.column() - subsub.active = part.whole_group == False + subsub.active = (part.whole_group is False) subsub.itemR(part, "use_group_count") sub = split.column() subsub = sub.column() - subsub.active = part.whole_group == False + subsub.active = (part.whole_group is False) subsub.itemR(part, "use_global_dupli") subsub.itemR(part, "rand_group") @@ -754,9 +754,9 @@ class PARTICLE_PT_draw(ParticleButtonsPanel): def poll(self, context): psys = context.particle_system - if psys == None: + if psys is None: return False - if psys.settings == None: + if psys.settings is None: return False return True @@ -774,7 +774,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel): path = (part.ren_as == 'PATH' and part.draw_as == 'RENDER') or part.draw_as == 'PATH' - if path and part.type != 'HAIR' and part.physics_type != 'KEYED' and psys.point_cache.baked == False: + if path and part.type != 'HAIR' and part.physics_type != 'KEYED' and psys.point_cache.baked is False: box = layout.box() box.itemL(text="Baked or keyed particles needed for correct drawing.") return @@ -801,7 +801,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel): col.itemR(part, "draw_step") else: sub = col.column() - sub.active = part.material_color == False + sub.active = (part.material_color is False) #sub.itemL(text="color") #sub.itemL(text="Override material color") diff --git a/release/scripts/ui/properties_physics_cloth.py b/release/scripts/ui/properties_physics_cloth.py index 5421180134c..07c12057398 100644 --- a/release/scripts/ui/properties_physics_cloth.py +++ b/release/scripts/ui/properties_physics_cloth.py @@ -27,7 +27,7 @@ from properties_physics_common import effector_weights_ui def cloth_panel_enabled(md): - return md.point_cache.baked == False + return md.point_cache.baked is False class CLOTH_MT_presets(bpy.types.Menu): diff --git a/release/scripts/ui/properties_physics_smoke.py b/release/scripts/ui/properties_physics_smoke.py index 631c91a5487..326b9085109 100644 --- a/release/scripts/ui/properties_physics_smoke.py +++ b/release/scripts/ui/properties_physics_smoke.py @@ -158,7 +158,7 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel): md = context.smoke.domain_settings cache = md.point_cache_low - point_cache_ui(self, context, cache, cache.baked == False, 0, 1) + point_cache_ui(self, context, cache, (cache.baked is False), 0, 1) class PHYSICS_PT_smoke_highres(PhysicButtonsPanel): @@ -206,7 +206,7 @@ class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel): md = context.smoke.domain_settings cache = md.point_cache_high - point_cache_ui(self, context, cache, cache.baked == False, 0, 1) + point_cache_ui(self, context, cache, (cache.baked is False), 0, 1) class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel): diff --git a/release/scripts/ui/properties_physics_softbody.py b/release/scripts/ui/properties_physics_softbody.py index 02244ef71ab..c22f81cfa32 100644 --- a/release/scripts/ui/properties_physics_softbody.py +++ b/release/scripts/ui/properties_physics_softbody.py @@ -27,7 +27,7 @@ from properties_physics_common import effector_weights_ui def softbody_panel_enabled(md): - return md.point_cache.baked == False + return (md.point_cache.baked is False) class PhysicButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_render.py b/release/scripts/ui/properties_render.py index 4894dfafe4a..06acf581429 100644 --- a/release/scripts/ui/properties_render.py +++ b/release/scripts/ui/properties_render.py @@ -37,7 +37,7 @@ class RenderButtonsPanel(bpy.types.Panel): def poll(self, context): rd = context.scene.render_data - return (context.scene and rd.use_game_engine == False) and (rd.engine in self.COMPAT_ENGINES) + return (context.scene and rd.use_game_engine is False) and (rd.engine in self.COMPAT_ENGINES) class RENDER_PT_render(RenderButtonsPanel): diff --git a/release/scripts/ui/properties_scene.py b/release/scripts/ui/properties_scene.py index 3c1fbf01ad6..5082dfaab36 100644 --- a/release/scripts/ui/properties_scene.py +++ b/release/scripts/ui/properties_scene.py @@ -107,7 +107,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel): bl_label = "Active Keying Set" def poll(self, context): - return (context.scene != None) and (context.scene.active_keying_set != None) + return (context.scene.active_keying_set is not None) def draw(self, context): layout = self.layout @@ -141,7 +141,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel): col = row.column() col.itemL(text="Array Target:") col.itemR(ksp, "entire_array") - if ksp.entire_array == False: + if ksp.entire_array is False: col.itemR(ksp, "array_index") if wide_ui: diff --git a/release/scripts/ui/space_sequencer.py b/release/scripts/ui/space_sequencer.py index 06b6569b572..7895d40de6a 100644 --- a/release/scripts/ui/space_sequencer.py +++ b/release/scripts/ui/space_sequencer.py @@ -277,7 +277,7 @@ class SequencerButtonsPanel(bpy.types.Panel): bl_region_type = 'UI' def poll(self, context): - return context.space_data.display_mode == 'SEQUENCER' and act_strip(context) != None + return (context.space_data.display_mode == 'SEQUENCER') and (act_strip(context) is not None) class SequencerButtonsPanel_Output(bpy.types.Panel): @@ -311,7 +311,7 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel): row = layout.row() if strip.mute == True: row.itemR(strip, "mute", toggle=True, icon='ICON_RESTRICT_VIEW_ON', text="") - elif strip.mute == False: + elif strip.mute is False: row.itemR(strip, "mute", toggle=True, icon='ICON_RESTRICT_VIEW_OFF', text="") sub = row.row() diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index ef1d829e69c..c12a62e6136 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -1248,7 +1248,7 @@ class USERPREF_PT_input(bpy.types.Panel): flow = itemcol.column_flow(columns=2) props = kmi.properties - if props != None: + if props is not None: for pname in dir(props): if not props.is_property_hidden(pname): flow.itemR(props, pname) @@ -1351,7 +1351,7 @@ class WM_OT_keyconfig_export(bpy.types.Operator): props = kmi.properties - if props != None: + if props is not None: for pname in dir(props): if props.is_property_set(pname) and not props.is_property_hidden(pname): value = eval("props.%s" % pname)