TextureSettings
human/skin/skin.pyInherits from PreviewCollectionContent
Class for changing the skin texture of the human.
| Methods | ||
|---|---|---|
| set() | Set the skin texture from a textureset from the HumGen library. | |
| set_resolution() | Set the skin texture resolution. | |
| save_to_library() | — | |
| save_thumb() | — | |
| set_random() | Set this content type to a random content item.from PreviewCollectionContent | |
| get_options() | List[str] | Get a list of options you can use for the set() method of this content.from PreviewCollectionContent |
| get_categories() | list[str] | Get a list of categoris this content type is organized in.from PreviewCollectionContent |
| refresh_pcoll() | Refresh the items of this preview collection.from PreviewCollectionContent | |
Methods
Set the skin texture from a textureset from the HumGen library.
| Parameter | Type | Description |
|---|---|---|
| textureset_path | str | Relative path to the textureset. Can be found from the `get_options` method. |
human.skin.texture.set_resolution(resolution: Literal['high', 'medium', 'low'])
sourceSet the skin texture resolution.
| Parameter | Type | Description |
|---|---|---|
| resolution | Literal['high', 'medium', 'low'] | Resolution to set. Can be found from the `get_options` method. |
human.skin.texture.save_to_library(save_name: str, category = 'Default', thumbnail: Optional[bpy.types.Image] = None)
sourceNo description yet.
| Parameter | Type | Description |
|---|---|---|
| save_name | str | — |
| category | default 'Default' | — |
| thumbnail | Optional[bpy.types.Image] default None | — |
human.skin.texture.save_thumb(save_name, thumbnail, texture_folder, categ_folder)
sourceNo description yet.
| Parameter | Type | Description |
|---|---|---|
| save_name | — | |
| thumbnail | — | |
| texture_folder | — | |
| categ_folder | — |
human.skin.texture.set_random(context: C = None, update_ui: bool = False)from PreviewCollectionContent
sourceSet this content type to a random content item.
This will use random.choice to select a random item from the output of get_options().
| Parameter | Type | Description |
|---|---|---|
| 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. |
human.skin.texture.get_options(context: C = None, category: str = 'All') → List[str]from PreviewCollectionContent
sourceGet 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.
| Parameter | Type | Description |
|---|---|---|
| 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.
human.skin.texture.get_categories() → list[str]from PreviewCollectionContent
sourceGet 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.
human.skin.texture.refresh_pcoll(context: C = None, override_category: Optional[str] = None, ignore_searchterm: bool = False)from PreviewCollectionContent
sourceRefresh 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.
| Parameter | Type | Description |
|---|---|---|
| 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. |