# PoseSettings

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

Reached as: `human.pose`

Inherits from: [PreviewCollectionContent](https://humgen3d.com/docs/api/previewcollectioncontent), [SavableContent](https://humgen3d.com/docs/api/savablecontent)

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/pose/pose.py#L34

Class for manipulating pose of human.

## Attributes

### rigify

```python
human.pose.rigify: RigifySettings
```

*read-only*

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/pose/pose.py#L43

## Methods

### set()

```python
human.pose.set(preset: str, context: C = None)
```

Set a pose from the Human Generator pose library.

Parameters:
- `preset` (str): Name of the pose to set, you can get options from the `get_options` method.
- `context` (C, default None): Context to use. Defaults to None.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/pose/pose.py#L46

### get_posebone_by_original_name()

```python
human.pose.get_posebone_by_original_name(original_name: str) -> bpy.types.PoseBone
```

Parameters:
- `original_name` (str)

Returns: bpy.types.PoseBone

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/pose/pose.py#L92

### save_to_library()

```python
human.pose.save_to_library(name: str, category: str = 'Custom', thumbnail: Optional[Image] = None, context: C = None)
```

Save current pose to the Human Generator pose library.

Parameters:
- `name` (str): Name to save the pose as.
- `category` (str, default 'Custom'): Category to save the pose in. If the category does not exist, a new folder is created. Defaults to "Custom".
- `thumbnail` (Optional[Image], default None): Thumbnail to use for the pose. If None, no thumbnail is saved. Defaults to None.
- `context` (C, default None): Context to use. Defaults to None.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/pose/pose.py#L106

### as_dict()

```python
human.pose.as_dict() -> dict[str, Any]
```

Pose settings as dict.

Returns: dict[str, Any] — dict[str, Any]: Pose settings as dict.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/pose/pose.py#L146

### reset()

```python
human.pose.reset()
```

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/pose/pose.py#L154

### set_random()

```python
human.pose.set_random(context: C = None, update_ui: bool = False)
```

*inherited from PreviewCollectionContent*

Set this content type to a random content item.

This will use random.choice to select a random item from the output of
get_options().

Parameters:
- `context` (C, default None): Blender context. bpy.context if not provided.
- `update_ui` (bool, default False): Will also show the chosen item as the active thumbnail in the template_icon_view. Defaults to False.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/common_baseclasses/pcoll_content.py#L68

### get_options()

```python
human.pose.get_options(context: C = None, category: str = 'All') -> List[str]
```

*inherited from PreviewCollectionContent*

Get a list of options you can use for the set() method of this content.

These represent the choises the user sees in the UI. The output is a list of
relative paths to the content files, starting from the Human Generator folder.

Parameters:
- `context` (C, default None): Blender context. bpy.context if not provided.
- `category` (str, default 'All'): Category to filter the content by. Defaults to "All". You can get a list of categories from the get_categories() method.

Returns: List[str] — List[str]: List of relative paths to content files. You can pick one of these and pass it to the set() method.

Raises: ValueError — If the passed category is not present in the list of categories.

Raises: HumGenException — If no options can be found, this can be caused by the content pack for this type of content not being installed.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/common_baseclasses/pcoll_content.py#L98

### get_categories()

```python
human.pose.get_categories() -> list[str]
```

*inherited from PreviewCollectionContent*

Get a list of categoris this content type is organized in.

You can choose one of these categories to filter the content retreived from
get_options().

Returns: list[str] — list[str]: List of categories. These are the names of the folders the content is saved in.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/common_baseclasses/pcoll_content.py#L148

### refresh_pcoll()

```python
human.pose.refresh_pcoll(context: C = None, override_category: Optional[str] = None, ignore_searchterm: bool = False)
```

*inherited from PreviewCollectionContent*

Refresh the items of this preview collection.

This is low level functionality, you should not need to use this. It is used
to refresh the list of possible content for this human. If you use get_options()
this is automatically done for you.

Parameters:
- `context` (C, default None): Blender context. bpy.context if not provided.
- `override_category` (Optional[str], default None): Override the category to use, if not provided all items regardless of category will be shown.
- `ignore_searchterm` (bool, default False): If True, the searchterm set by the user will be ignored. Defaults to False.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/common_baseclasses/pcoll_content.py#L180

### save_objects_optimized()

```python
PoseSettings.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, inherited from SavableContent*

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
PoseSettings.remove_number_suffix(name: str) -> str
```

*static method, inherited from SavableContent*

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
