Add Chromium-only Blender WebEngine parity work
This commit is contained in:
24
blender-5.2.0/doc/python_api/examples/bpy.data.0.py
Normal file
24
blender-5.2.0/doc/python_api/examples/bpy.data.0.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import bpy
|
||||
|
||||
|
||||
# Print all objects.
|
||||
for obj in bpy.data.objects:
|
||||
print(obj.name)
|
||||
|
||||
|
||||
# Print all scene names in a list.
|
||||
print(bpy.data.scenes.keys())
|
||||
|
||||
|
||||
# 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.
|
||||
import os
|
||||
with open(os.path.splitext(bpy.data.filepath)[0] + ".txt", 'w') as fs:
|
||||
for image in bpy.data.images:
|
||||
fs.write("{:s} {:d} x {:d}\n".format(image.filepath, image.size[0], image.size[1]))
|
||||
Reference in New Issue
Block a user