optparse module is deprecated, use new argparse module in background job template.

correction to example in doc too.
This commit is contained in:
Campbell Barton
2011-03-26 03:42:59 +00:00
parent bc88e61efa
commit 04e32be958
2 changed files with 10 additions and 8 deletions

View File

@@ -14,7 +14,7 @@ print(bpy.data.scenes.keys())
if "Cube" in bpy.data.meshes:
mesh = bpy.data.meshes["Cube"]
print("removing mesh", mesh)
bpy.data.meshes.unlink(mesh)
bpy.data.meshes.remove(mesh)
# write images into a file next to the blend
@@ -22,6 +22,6 @@ import os
file = open(os.path.splitext(bpy.data.filepath)[0] + ".txt", 'w')
for image in bpy.data.images:
file.write("%s %dx%d\n" % (image.filepath, image.size[0], image.size[1]))
file.write("%s %d x %d\n" % (image.filepath, image.size[0], image.size[1]))
file.close()