PyDoc: use complete sentences in comments for templates & examples

This commit is contained in:
Campbell Barton
2025-04-02 23:46:58 +00:00
parent d001e143a9
commit b2c57fd877
58 changed files with 181 additions and 179 deletions

View File

@@ -1,23 +1,23 @@
import bpy
# print all objects
# Print all objects.
for obj in bpy.data.objects:
print(obj.name)
# print all scene names in a list
# Print all scene names in a list.
print(bpy.data.scenes.keys())
# remove mesh Cube
# Remove mesh Cube.
if "Cube" in bpy.data.meshes:
mesh = bpy.data.meshes["Cube"]
print("removing mesh", mesh)
bpy.data.meshes.remove(mesh)
# write images into a file next to the blend
# Write images into a file next to the blend.
import os
with open(os.path.splitext(bpy.data.filepath)[0] + ".txt", 'w') as fs:
for image in bpy.data.images: