Skip to content

Commit

Permalink
Merge pull request #396 from vrm-c/add/editor-importer
Browse files Browse the repository at this point in the history
Add/editor importer
  • Loading branch information
ousttrue authored May 10, 2024
2 parents fc2d2c2 + 5287090 commit 66fb9f1
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 9 deletions.
20 changes: 20 additions & 0 deletions docs/api/editor-import/vrm0x.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# VRM-0.x の EidtorImport 動作

[vrmAssetPostprocessor](https://github.com/vrm-c/UniVRM/blob/master/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs) を起点に、
vrm の prefab を生成します。

:::info
`alicia.vrm` から `alicia.prefab` を生成します。
:::

## step1

[TextureExtractor](https://github.com/vrm-c/UniVRM/blob/master/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs) で texture の画像ファイルを書き出します。

## step2

prefab を構築します。

:::info 調査中
[\[URP\] UrpでVrm0のEditorImportがエラーになる · Issue #2286 · vrm-c/UniVRM · GitHub](https://github.com/vrm-c/UniVRM/issues/2286)
:::
1 change: 1 addition & 0 deletions docs/api/editor-import/vrm10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# GLTF / VRM-1.0 の EidtorImport 動作
6 changes: 5 additions & 1 deletion docs/release/112/v0.122.0.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v0.122.0 🚧WIP🚧
# v0.122.0 ktx2 y-flip

https://github.com/vrm-c/UniVRM/milestone/85

:::tip (experimental) basisu 向けに import 時にtexture をY-Flip する機能
[v0.122 KHR_texture_basisu 拡張対応](/api/runtime-import/import_basisu/)
:::
Empty file added docs/release/112/v0.123.0.md
Empty file.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "VRM",
"name": "vrm.dev",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"dev": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
Expand Down
22 changes: 15 additions & 7 deletions release_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@
import pathlib
import sys
import re
import git.repo
import re
import pathlib
import io
from functools import cmp_to_key


try:
import git.repo
import pyperclip
except:
print("import error. require")
print("pip install GitPython pyperclip")
sys.exit()


HERE = pathlib.Path(__file__).absolute().parent
UNIVRM_VERSION = HERE.parent / "Assets/VRM/Runtime/Format/VRMVersion.cs"
MERGE_PATTERN = re.compile(r"Merge pull request #(\d+)")
Expand Down Expand Up @@ -62,7 +69,6 @@ def get_hash(repo, tag_name) -> str:


def copy_release_md(version: str, hash: str):
import pyperclip

text = gen(TEMPLATE.read_text(encoding="utf-8"), version, hash)
pyperclip.copy(text)
Expand Down Expand Up @@ -140,7 +146,9 @@ def cmp_tag(l, r):


if __name__ == "__main__":
repo = HERE
if len(sys.argv) > 1:
repo = pathlib.Path(sys.argv[1])
if len(sys.argv) < 2:
print("usage: py release_gen.py {UNIVRM_REPO_DIR}")
sys.exit()

repo = pathlib.Path(sys.argv[1])
main(str(repo.absolute()))
8 changes: 8 additions & 0 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,14 @@ const sidebars: SidebarsConfig = {
},
],
},
{
type: "category",
label: "EditorImport",
items: [
'api/editor-import/vrm0x',
'api/editor-import/vrm10',
]
},
{
type: "category",
label: "Material/Texture",
Expand Down

0 comments on commit 66fb9f1

Please sign in to comment.