mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-28 05:44:48 -05:00
fix primitive.material
This commit is contained in:
@@ -316,7 +316,7 @@ namespace UniVRM10
|
||||
var prim = new glTFPrimitives
|
||||
{
|
||||
mode = (int)mesh.Topology,
|
||||
material = materials.IndexOf(y.Material),
|
||||
material = y.Material,
|
||||
indices = indicesAccessorIndex,
|
||||
attributes = new glTFAttributes(),
|
||||
};
|
||||
|
||||
@@ -162,12 +162,6 @@ namespace UniVRM10
|
||||
Reserve(reserveBytes);
|
||||
}
|
||||
|
||||
// mesh
|
||||
ExportMeshes(model.MeshGroups, model.Materials, option);
|
||||
|
||||
// node
|
||||
ExportNodes(model.Root, model.Nodes, model.MeshGroups, option);
|
||||
|
||||
// material
|
||||
var materialExporter = new Vrm10MaterialExporter();
|
||||
foreach (Material material in model.Materials)
|
||||
@@ -176,6 +170,12 @@ namespace UniVRM10
|
||||
Storage.Gltf.materials.Add(glTFMaterial);
|
||||
}
|
||||
|
||||
// mesh
|
||||
ExportMeshes(model.MeshGroups, model.Materials, option);
|
||||
|
||||
// node
|
||||
ExportNodes(model.Root, model.Nodes, model.MeshGroups, option);
|
||||
|
||||
var (vrm, vrmSpringBone, thumbnailTextureIndex) = ExportVrm(root, model, converter, metaObject);
|
||||
|
||||
// Extension で Texture が増える場合があるので最後に呼ぶ
|
||||
|
||||
Reference in New Issue
Block a user