Skip to content

Commit

Permalink
Merge branch 'vrm-c:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mewmew-tea authored Mar 5, 2024
2 parents 3ef6b0c + be13ead commit eb401ef
Show file tree
Hide file tree
Showing 414 changed files with 2,281 additions and 30,103 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/sphinx.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"visualstudiotoolsforunity.vstuc"
]
}
38 changes: 16 additions & 22 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Unity Editor",
"type": "unity",
"path": "${workspaceFolder}/Library/EditorInstance.json",
"request": "launch"
},
{
"name": "release_gen.py",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/docs/release_gen.py",
"console": "integratedTerminal",
"justMyCode": true
}
]
}
{
"version": "0.2.0",
"configurations": [
{
"name": "Unity Editor",
"type": "unity",
"path": "${workspaceFolder}/Library/EditorInstance.json",
"request": "launch"
},
{
"name": "Attach to Unity",
"type": "vstuc",
"request": "attach"
}
]
}
117 changes: 59 additions & 58 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,60 @@
{
"files.exclude":
{
"**/.DS_Store":true,
"**/.git":true,
"**/.gitmodules":true,
"**/*.booproj":true,
"**/*.pidb":true,
"**/*.suo":true,
"**/*.user":true,
"**/*.userprefs":true,
"**/*.unityproj":true,
"**/*.dll":true,
"**/*.exe":true,
"**/*.pdf":true,
"**/*.mid":true,
"**/*.midi":true,
"**/*.wav":true,
"**/*.gif":true,
"**/*.ico":true,
"**/*.jpg":true,
"**/*.jpeg":true,
"**/*.png":true,
"**/*.psd":true,
"**/*.tga":true,
"**/*.tif":true,
"**/*.tiff":true,
"**/*.3ds":true,
"**/*.3DS":true,
"**/*.fbx":true,
"**/*.FBX":true,
"**/*.lxo":true,
"**/*.LXO":true,
"**/*.ma":true,
"**/*.MA":true,
"**/*.obj":true,
"**/*.OBJ":true,
"**/*.asset":true,
"**/*.cubemap":true,
"**/*.flare":true,
"**/*.mat":true,
"**/*.meta":true,
"**/*.prefab":true,
"**/*.unity":true,
"build/":true,
"Build/":true,
"Library/":true,
"library/":true,
"obj/":true,
"Obj/":true,
"ProjectSettings/":true,
"temp/":true,
"Temp/":true
},
"cSpell.words": [
"GLTF",
"UNIVRM"
]
{
"files.exclude": {
"**/.DS_Store": true,
"**/.git": true,
"**/.gitmodules": true,
"**/*.booproj": true,
"**/*.pidb": true,
"**/*.suo": true,
"**/*.user": true,
"**/*.userprefs": true,
"**/*.unityproj": true,
"**/*.dll": true,
"**/*.exe": true,
"**/*.pdf": true,
"**/*.mid": true,
"**/*.midi": true,
"**/*.wav": true,
"**/*.gif": true,
"**/*.ico": true,
"**/*.jpg": true,
"**/*.jpeg": true,
"**/*.png": true,
"**/*.psd": true,
"**/*.tga": true,
"**/*.tif": true,
"**/*.tiff": true,
"**/*.3ds": true,
"**/*.3DS": true,
"**/*.fbx": true,
"**/*.FBX": true,
"**/*.lxo": true,
"**/*.LXO": true,
"**/*.ma": true,
"**/*.MA": true,
"**/*.obj": true,
"**/*.OBJ": true,
"**/*.asset": true,
"**/*.cubemap": true,
"**/*.flare": true,
"**/*.mat": true,
"**/*.meta": true,
"**/*.prefab": true,
"**/*.unity": true,
"build/": true,
"Build/": true,
"Library/": true,
"library/": true,
"obj/": true,
"Obj/": true,
"ProjectSettings/": true,
"temp/": true,
"Temp/": true
},
"cSpell.words": [
"GLTF",
"Scriptable",
"UNIVRM"
],
"dotnet.defaultSolution": "UniVRM.sln"
}
14 changes: 0 additions & 14 deletions .vscode/tasks.json

This file was deleted.

43 changes: 0 additions & 43 deletions Assets/UniGLTF/Editor/MeshUtility/BoneMeshEraserEditor.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,53 +1,62 @@
using System.Collections.Generic;
using UniGLTF.MeshUtility;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;

namespace UniVRM10
namespace UniGLTF.MeshUtility
{
class MeshIntegrationTab
public class MeshIntegrationTab
{
bool _modified = false;
Vrm10MeshUtility _meshUti;
protected GltfMeshUtility _meshUtil;

Splitter _splitter;
ReorderableList _groupList;
ReorderableList _rendererList;
public List<Renderer> _renderers = new List<Renderer>();
int _selected = -1;
int Selected
protected int _selected = -1;
protected int Selected
{
set
{
if (_selected == value)
{
return;
}
if (value < 0 || value >= _meshUti.MeshIntegrationGroups.Count)
if (value < 0 || value >= _meshUtil.MeshIntegrationGroups.Count)
{
return;
}
_selected = value;
_renderers.Clear();
_renderers.AddRange(_meshUti.MeshIntegrationGroups[_selected].Renderers);
_renderers.AddRange(_meshUtil.MeshIntegrationGroups[_selected].Renderers);
}
}

public MeshIntegrationTab(EditorWindow editor, Vrm10MeshUtility meshUtility)
public MeshIntegrationTab(EditorWindow editor, GltfMeshUtility meshUtility)
{
_meshUti = meshUtility;
_meshUtil = meshUtility;
_splitter = new VerticalSplitter(editor, 200, 50);

_groupList = new ReorderableList(_meshUti.MeshIntegrationGroups, typeof(MeshIntegrationGroup));
_groupList = new ReorderableList(_meshUtil.MeshIntegrationGroups, typeof(MeshIntegrationGroup));
_groupList.drawHeaderCallback = (Rect rect) =>
{
GUI.Label(rect, "Integration group");
};
_groupList.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) =>
{
var group = _meshUti.MeshIntegrationGroups[index];
EditorGUI.TextField(rect, group.Name);
// Flag / Name
var group = _meshUtil.MeshIntegrationGroups[index];

const float LEFT_WIDTH = 92.0f;
var left = rect;
left.width = LEFT_WIDTH;
var right = rect;
right.width -= LEFT_WIDTH;
right.x += LEFT_WIDTH;

group.IntegrationType = (MeshIntegrationGroup.MeshIntegrationTypes)EditorGUI.EnumPopup(left, group.IntegrationType);
group.Name = EditorGUI.TextField(right, group.Name);
};
_groupList.onSelectCallback = rl =>
{
Expand All @@ -64,13 +73,18 @@ public MeshIntegrationTab(EditorWindow editor, Vrm10MeshUtility meshUtility)
var r = _renderers[index];
EditorGUI.ObjectField(rect, r, typeof(Renderer), true);
};

// +ボタンが押された時のコールバック
_rendererList.onAddCallback = list => Debug.Log("+ clicked.");

// -ボタンが押された時のコールバック
_rendererList.onRemoveCallback = list => Debug.Log("- clicked : " + list.index + ".");
}

public void UpdateMeshIntegrationList(GameObject root)
{
_selected = -1;
_meshUti.MeshIntegrationGroups.Clear();
_meshUti.IntegrateFirstPerson(root);
_meshUtil.UpdateMeshIntegrationGroups(root);
Selected = 0;
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit eb401ef

Please sign in to comment.