Skip to content

How to add a new asset

UuuNyaa edited this page May 28, 2021 · 12 revisions

Overview

You can register your models and other assets to be used by the Asset Search feature. The procedure is shown below.

If you want to get all the assets that have not been debugged, see All Assets Debugging.

YouTube video available

How to use Asset Search feature
How to use Asset Search feature / アセット検索機能の使い方

Create a issue

  1. Create a issue to https://github.com/UuuNyaa/blender_mmd_assets/issues
  2. Write first name on the issue title
  3. Fill in the following sections

thumbnail_url

You MUST write in the following format

![thumbnail_url](https://thumnail.url/here.jpg)

Images can be pasted using the clipboard.

source_url

You MUST write in the following format

https://model/source/url

download_action

You MUST write in the following format

```python
get('https://model.url/here.zip')
```

Available actions

Action Arguments Description
get url Specify the URL for download.
tstorage url Specify the tstorage URL for download
password Specify the password for download.
smutbase url Specify the SmutBase URL for download
bowlroll url Specify the BowlRoll URL for download
password Specify the password for download.
gdrive url Specify the Google Drive URL for download
uploader url Specify the uploader.jp URL for download
password Specify the password for download.

import_action

You MUST write in the following format

```python
unzip(arguments); import_pmx('path/to.pmx',scale=0.08)
```

Available actions

Action Arguments Description
link Specify the extract destination filename.
unzip encoding Specify the encoding of file names in the zip. Click here for Available encodings
password Specify the password for the zip.
un7zip password Specify the password for the 7-zip.
unrar password Specify the password for the RAR.
import_pmx Specify the path of the model file. Corresponding file formats are .pmd and .pmx .
scale Specify the import scale. If you are not sure, set it to 0.08.
import_vmd Specify the path of the model file. Corresponding file format is .vmd .
scale Specify the import scale. If you are not sure, set it to 0.08.
import_vpd Specify the path of the model file. Corresponding file format is .vpd .
scale Specify the import scale. If you are not sure, set it to 0.08.
import_collections Specify the path of the model file. Corresponding file format is .blend .
collection_names Specify the import collection names.
import_world Specify the path of the world file. Corresponding file format is .blend .
world_name Specify the import world name.
delete_objects prefix Specify the prefix of delete target object. If you want to target Rigify widget objects, specify 'WGT-'.
suffix Specify the suffix of delete target object.

aliases

You MUST write in the following format

| en | English name, alias1, alias2, ... |
|--|--|
| ja | Japanese name, alias1, alias2, ... |

Fill in English and Japanese as much as possible. Use the ISO 639-1 language code when appending in other languages.

note

You should write in the following format

Birthday: January 1, Age: 99, Height: 1.000 m
and your favorite information

Height is a particularly important piece of information. Use metric units for height.

Download the issue for debug

  1. Goto 3D Viewport > Sidebar > Assets > UuuNyaa Assets Operator Panel
  2. Specify issue #
  3. Press Update Debug Asset JSON
  4. Press Reload Asset JSONs

UuuNyaa Assets Operator panel

Debug the asset

  1. Goto 3D Viewport > Sidebar > Assets > UuuNyaa Asset Search Panel
  2. Search target asset
  3. Download target asset
  4. Import target asset

UuuNyaa Asset Search panel

If an error occurs, return to Create a issue.

Delete the asset for debug

  1. Goto 3D Viewport > Sidebar > Assets > UuuNyaa Assets Operator Panel
  2. Press Delete Debug Asset JSON

UuuNyaa Asset Search panel

Open to the public

  1. Make the issue belong to the Public Assets milestone
  2. Give the issue the "Official" label
    If the model is officially distributed

To retrieve assets that are not labeled "Official", see "All Assets Debugging".

All Assets Debugging

For debugging purposes, you can update with any filter condition in UuuNyaa Asset Operator panel.

  1. Goto 3D Viewport > Sidebar > Assets > UuuNyaa Assets Operator Panel
  2. Specify Query
  3. Press Update Assets JSON

UuuNyaa Asset Search panel

Query Examples

Query Assets to be retrieved
{'state': 'open', 'milestone': 1, 'labels': 'Official'} Default: Official debugged assets.
{'state': 'open', 'milestone': 1} Recommended: Debugged assets.
{'state': 'open'} May crash: Not debugged assets.
{} ALL assets.

Security considerations

As you can see, you can write code for a subset language of Python in download_action and import_action. I strictly limit the statements that can be executed. If you find a bug, please report it via the issues.