mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-14 23:10:46 -05:00
add attribute check
This commit is contained in:
@@ -53,7 +53,19 @@ namespace UniGLTF
|
||||
{"gltf/animations[]/channels[]/target", "if(value!=null)" },
|
||||
{"gltf/accessors[]/sparse", "if(value.sparse!=null && value.sparse.count>0)"},
|
||||
{"gltf/meshes[]/primitives[]/targets", "if(value.targets.Count>0)" },
|
||||
|
||||
{"gltf/meshes[]/primitives[]/targets[]/POSITION", "if(value.POSITION!=-1)" },
|
||||
{"gltf/meshes[]/primitives[]/targets[]/NORMAL", "if(value.NORMAL!=-1)" },
|
||||
{"gltf/meshes[]/primitives[]/targets[]/TANGENT", "if(value.TANGENT!=-1)" },
|
||||
|
||||
{"gltf/meshes[]/primitives[]/attributes/POSITION", "if(value.POSITION!=-1)"},
|
||||
{"gltf/meshes[]/primitives[]/attributes/NORMAL", "if(value.NORMAL!=-1)"},
|
||||
{"gltf/meshes[]/primitives[]/attributes/TANGENT", "if(value.TANGENT!=-1)"},
|
||||
{"gltf/meshes[]/primitives[]/attributes/TEXCOORD_0", "if(value.TEXCOORD_0!=-1)"},
|
||||
{"gltf/meshes[]/primitives[]/attributes/COLOR_0", "if(value.COLOR_0!=-1)"},
|
||||
{"gltf/meshes[]/primitives[]/attributes/JOINTS_0", "if(value.JOINTS_0!=-1)"},
|
||||
{"gltf/meshes[]/primitives[]/attributes/WEIGHTS_0", "if(value.WEIGHTS_0!=-1)"},
|
||||
|
||||
{"gltf/meshes[]/primitives[]/extras", "if(value.extras!=null && value.extras.targetNames!=null && value.extras.targetNames.Count>0)"},
|
||||
{"gltf/materials[]/alphaCutoff", "if(!string.IsNullOrEmpty(value.alphaMode))" },
|
||||
{"gltf/nodes[]/camera", "if(value.camera!=-1)"},
|
||||
|
||||
@@ -827,22 +827,22 @@ namespace UniGLTF {
|
||||
{
|
||||
f.BeginMap(0); // dummy
|
||||
|
||||
|
||||
if(value.POSITION!=-1)
|
||||
{
|
||||
f.Key("POSITION"); f.GenSerialize(value.POSITION);
|
||||
}
|
||||
|
||||
|
||||
if(value.NORMAL!=-1)
|
||||
{
|
||||
f.Key("NORMAL"); f.GenSerialize(value.NORMAL);
|
||||
}
|
||||
|
||||
|
||||
if(value.TANGENT!=-1)
|
||||
{
|
||||
f.Key("TANGENT"); f.GenSerialize(value.TANGENT);
|
||||
}
|
||||
|
||||
|
||||
if(value.TEXCOORD_0!=-1)
|
||||
{
|
||||
f.Key("TEXCOORD_0"); f.GenSerialize(value.TEXCOORD_0);
|
||||
}
|
||||
@@ -852,12 +852,12 @@ namespace UniGLTF {
|
||||
f.Key("COLOR_0"); f.GenSerialize(value.COLOR_0);
|
||||
}
|
||||
|
||||
|
||||
if(value.JOINTS_0!=-1)
|
||||
{
|
||||
f.Key("JOINTS_0"); f.GenSerialize(value.JOINTS_0);
|
||||
}
|
||||
|
||||
|
||||
if(value.WEIGHTS_0!=-1)
|
||||
{
|
||||
f.Key("WEIGHTS_0"); f.GenSerialize(value.WEIGHTS_0);
|
||||
}
|
||||
@@ -881,17 +881,17 @@ namespace UniGLTF {
|
||||
{
|
||||
f.BeginMap(0); // dummy
|
||||
|
||||
|
||||
if(value.POSITION!=-1)
|
||||
{
|
||||
f.Key("POSITION"); f.GenSerialize(value.POSITION);
|
||||
}
|
||||
|
||||
|
||||
if(value.NORMAL!=-1)
|
||||
{
|
||||
f.Key("NORMAL"); f.GenSerialize(value.NORMAL);
|
||||
}
|
||||
|
||||
|
||||
if(value.TANGENT!=-1)
|
||||
{
|
||||
f.Key("TANGENT"); f.GenSerialize(value.TANGENT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user