ddg.visualization.blender.clear module
- ddg.visualization.blender.clear.clear_scene(scene=None, deep=False, remove_collections=False)[source]
Unlink all the objects contained in the given scene, clears scene.collection.
- Parameters:
- scenebpy.types.Scene (default=None)
Scene to clear. If the argument is not provided or None bpy.context.scene will be set to scene.
- deepbool (default=False)
Delete the data corresponding to the objects.
- remove_collectionsbool (default=False)
Remove the collections (and its children) from the scene.
- Returns:
- None
- ddg.visualization.blender.clear.clear_collections(collections=None, deep=False, remove_collections=False)[source]
Unlink all the objects contained in the given collection.
- Parameters:
- collectionslist of bpy.types.Collection (default=None)
Collection(s) to clear. If the argument is not provided or None bpy.context.scene will be set to scene.
- deepbool (default=False)
Delete the data corresponding to the objects.
- remove_collections: bool (default=False)
Deletes the given collections and children. If bpy.context.scene.collection was given it deletes all children of this collection (bpy.context.scene.collection can’t be removed).
- Returns:
- None
- ddg.visualization.blender.clear.clear_objects(objects=None, do_unlink=True, deep=True)[source]
Delete all given objects.
- Parameters:
- objectsiterable of bpy.type.Object (default=None)
Objects to be deleted. If the argument is not provided or None all objects will be deleted.
- do_unlinkbool (default=True)
Unlink objects from their collections, if needed, before deleting them.
- deepbool (default=True)
Delete the data corresponding to the object
- Returns:
- None
- ddg.visualization.blender.clear.clear_meshes(meshes=None, do_unlink=True, only_unused=False)[source]
Delete all given meshes.
- Parameters:
- meshesiterable of bpy.type.Mesh (default=None)
Meshes to be deleted. If the argument is not provided or None all meshes will be deleted.
- do_unlinkbool (default=True)
Unlink meshes from their objects and scenes, if needed, before deleting them.
- only_unusedbool (default=True)
Removes all unused meshes. If an iterable of meshes is given as first parameter only those are effected, otherwise all meshes.
- Returns:
- None
- ddg.visualization.blender.clear.clear_lights(lights=None, do_unlink=True)[source]
Delete all given lights.
- Parameters:
- lightsiterable of bpy.type.Light (default=None)
Lights to be deleted. If the argument is not provided or None all lights will be deleted.
- do_unlinkbool (default=True)
Unlink lights from their scenes, if needed, before deleting them.
- Returns:
- None
- ddg.visualization.blender.clear.clear_lattices(lattices=None, do_unlink=True)[source]
Delete all given lattices.
- Parameters:
- latticesiterable of bpy.type.Lattice (default=None)
Lattices to be deleted. If the argument is not provided or None all lattices will be deleted.
- do_unlinkbool (default=True)
Unlink lattices from their scenes, if needed, before deleting them.
- Returns:
- None
- ddg.visualization.blender.clear.clear_curves(curves=None, do_unlink=True)[source]
Delete all given curves.
- Parameters:
- curvesiterable of bpy.type.Curve (default=True)
Curves to be deleted. If argument is not provided or None all curves will be deleted.
- do_unlinkbool (default=True)
Unlink curves from their scenes, if needed, before deleting them.
- Returns:
- None
- ddg.visualization.blender.clear.clear_cameras(cameras=None, do_unlink=True)[source]
Delete all given cameras.
- Parameters:
- camerasiterable of bpy.type.Camera (default=None)
Cameras to be deleted. If the argument is not provided or None all cameras will be deleted.
- do_unlinkbool (default=True)
Unlink cameras from their scenes, if needed, before deleting them.
- Returns:
- None
- ddg.visualization.blender.clear.clear_material(materials=None, only_unused=False)[source]
Delete all given materials.
- Parameters:
- materialsiterable of bpy.types.Material (default=None)
Materials to be deleted. If argument is not provided or None all materials will be deleted.
- only_unusedbool (default=False)
Removes all unused material. If an iterable of materials is given as first parameter only those are effected, otherwise all materials.
- Returns:
- None
- ddg.visualization.blender.clear.clear_empty_objects(do_unlink=True, deep=True)[source]
Delete all empty objects.
- Parameters:
- do_unlinkbool (default=True)
Unlink objects from their collections, if needed, before deleting them.
- deepbool (default=True)
Delete the data corresponding to the object.
- Returns
- ——-
- None
- ddg.visualization.blender.clear.clear_all(do_unlink=True, remove_collections=True)[source]
Delete all instances in blender data blocks.
- Parameters:
- do_unlinkbool (default=True)
Unlink instances from their scenes, if needed, before deleting them.
- remove_collections: bool (default=True)
Deletes all collections.
- Returns:
- None