# SavableContent

> Human Generator for Blender documentation. Web version: https://humgen3d.com/docs/api/savablecontent

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/common_baseclasses/savable_content.py#L17

Class used as baseclass for all content that can be saved to the library.

It mainly contains common methods for saving Blender content to .blend files in
an optimized way.

## Methods

### save_objects_optimized()

```python
SavableContent.save_objects_optimized(context: bpy.types.Context, objs: Iterable[bpy.types.Object], folder: str, filename: str, clear_sk: bool = True, clear_materials: bool = True, clear_vg: bool = True, clear_ps: bool = True, run_in_background: bool = True, clear_drivers: bool = True)
```

*static method*

Saves the passed objects as a new blend file.

opening the file in the background to make it as small as possible

Parameters:
- `context` (bpy.types.Context): Blender context.
- `objs` (Iterable[bpy.types.Object]): List of objects to save
- `folder` (str): Folder to save the file in
- `filename` (str): Name to save the file as
- `clear_sk` (bool, default True): Remove all shapekeys from objs. Defaults to True.
- `clear_materials` (bool, default True): Remove all materials from objs. Defaults to True.
- `clear_vg` (bool, default True): Remove all vertex groups from objs. Defaults to True.
- `clear_ps` (bool, default True): Remove all particle systems from objs. Defaults to True.
- `run_in_background` (bool, default True): Open the new subprocess in the background. Defaults to True.
- `clear_drivers` (bool, default True): Remove all drivers from objs. Defaults to True.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/common_baseclasses/savable_content.py#L24

### remove_number_suffix()

```python
SavableContent.remove_number_suffix(name: str) -> str
```

*static method*

Remove the number suffix from the passed name (i.e. Box.004 becomes Box).

Parameters:
- `name` (str): name to remove suffix from

Returns: str — name without suffix

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/common_baseclasses/savable_content.py#L152

### save_to_library()

```python
SavableContent.save_to_library()
```

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/common_baseclasses/savable_content.py#L168
