diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-14 16:17:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-14 16:17:05 +0400 |
commit | e86e443caf949b6060196fe066756af866617620 (patch) | |
tree | f2c855934a0bff630baa14a841269dd67b9f0393 | |
parent | 81ef518e009705d1cfbf4843e06c74553fd26f92 (diff) |
use alternate syntax to clear lists
-rw-r--r-- | io_mesh_pdb/import_pdb.py | 2 | ||||
-rw-r--r-- | io_scene_3ds/export_3ds.py | 2 | ||||
-rw-r--r-- | io_scene_3ds/import_3ds.py | 2 | ||||
-rw-r--r-- | io_scene_fbx/export_fbx.py | 12 | ||||
-rw-r--r-- | modules/selection_utils.py | 2 | ||||
-rw-r--r-- | object_fracture_cell/fracture_cell_calc.py | 2 | ||||
-rw-r--r-- | system_demo_mode/demo_mode.py | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/io_mesh_pdb/import_pdb.py b/io_mesh_pdb/import_pdb.py index 95a83ae3..54639805 100644 --- a/io_mesh_pdb/import_pdb.py +++ b/io_mesh_pdb/import_pdb.py @@ -190,7 +190,7 @@ class StickProp(object): def read_elements(): - ELEMENTS[:] = [] + del ELEMENTS[:] for item in ELEMENTS_DEFAULT: diff --git a/io_scene_3ds/export_3ds.py b/io_scene_3ds/export_3ds.py index f7ecf216..e7f624ac 100644 --- a/io_scene_3ds/export_3ds.py +++ b/io_scene_3ds/export_3ds.py @@ -1156,7 +1156,7 @@ def save(operator, file.close() # Clear name mapping vars, could make locals too - name_unique[:] = [] + del name_unique[:] name_mapping.clear() # Debugging only: report the exporting time: diff --git a/io_scene_3ds/import_3ds.py b/io_scene_3ds/import_3ds.py index 0da6822b..c400bbd9 100644 --- a/io_scene_3ds/import_3ds.py +++ b/io_scene_3ds/import_3ds.py @@ -859,7 +859,7 @@ def load_3ds(filepath, if IMPORT_CONSTRAIN_BOUNDS: BOUNDS_3DS[:] = [1 << 30, 1 << 30, 1 << 30, -1 << 30, -1 << 30, -1 << 30] else: - BOUNDS_3DS[:] = [] + del BOUNDS_3DS[:] ##IMAGE_SEARCH diff --git a/io_scene_fbx/export_fbx.py b/io_scene_fbx/export_fbx.py index ce1de53e..1c35fe88 100644 --- a/io_scene_fbx/export_fbx.py +++ b/io_scene_fbx/export_fbx.py @@ -2928,12 +2928,12 @@ Takes: {''') mapping.clear() del mapping - ob_arms[:] = [] - ob_bones[:] = [] - ob_cameras[:] = [] - ob_lights[:] = [] - ob_meshes[:] = [] - ob_null[:] = [] + del ob_arms[:] + del ob_bones[:] + del ob_cameras[:] + del ob_lights[:] + del ob_meshes[:] + del ob_null[:] file.close() diff --git a/modules/selection_utils.py b/modules/selection_utils.py index 3bf89816..eb85e869 100644 --- a/modules/selection_utils.py +++ b/modules/selection_utils.py @@ -46,7 +46,7 @@ class SelectionOrder(bpy.types.Operator): if num == 0: # Reset the list - selected[:] = [] + del selected[:] elif num > self.num_selected: # Get all the newly selected objects and add new = [ob.name for ob in sel if ob.name not in selected] diff --git a/object_fracture_cell/fracture_cell_calc.py b/object_fracture_cell/fracture_cell_calc.py index 03d27df8..9e6f0de5 100644 --- a/object_fracture_cell/fracture_cell_calc.py +++ b/object_fracture_cell/fracture_cell_calc.py @@ -115,6 +115,6 @@ def points_as_bmesh_cells(verts, continue cells.append((point_cell_current, vertices[:])) - vertices[:] = [] + del vertices[:] return cells diff --git a/system_demo_mode/demo_mode.py b/system_demo_mode/demo_mode.py index 3cce16eb..740dc50a 100644 --- a/system_demo_mode/demo_mode.py +++ b/system_demo_mode/demo_mode.py @@ -468,7 +468,7 @@ def unregister(): def load_config(cfg_name=DEMO_CFG): namespace = {} - global_config_files[:] = [] + del global_config_files[:] basedir = os.path.dirname(bpy.data.filepath) text = bpy.data.texts.get(cfg_name) |