{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://schema.stfform.at/stf.instance.mesh.schema.json",
	"title": "STF Mesh Instance",
	"description": "Represents an instance of a mesh.",
	"stfImplementations": {
		"blender": {
			"representingType": "bpy.types.Object with bpy.types.Mesh",
			"link": "https://codeberg.org/stf_format/stf_blender/src/branch/master/stfblender/stf_resources/stf/stf_instance_mesh/stf_instance_mesh.py"
		},
		"godot": {
			"representingType": "MeshInstance3D",
			"link": "https://codeberg.org/stf_format/stf_godot/src/branch/master/addons/stf_godot/resources/stf/STF_Instance_Mesh.gd"
		},
		"unity": {
			"representingType": "MeshRenderer / SkinnedMeshRenderer",
			"link": "https://codeberg.org/stf_format/stf_unity/src/branch/master/Runtime/Resources/Resources_STF/STF_Instance_Mesh.cs",
			"extra_links": {
				"Default Processor": "https://codeberg.org/stf_format/stf_unity/src/branch/master/Runtime/Processors/Processors_STF/STF_Instance_Mesh_Processor.cs"
			}
		},
		"three.js": {
			"representingType": "Mesh / SkinnedMesh",
			"link": "https://codeberg.org/stf_format/stf_js/src/branch/master/stf_threejs/src/stf_resources/stf_instance_mesh.ts"
		}
	},
	"allOf": [{ "$ref": "https://schema.stfform.at/stf.schema.json#/$defs/stf_instance_resource" }],
	"properties": {
		"type": {
			"const": "stf.instance.mesh"
		},
		"mesh": {
			"$ref": "https://schema.stfform.at/stf.schema.json#resource_ref",
			"description": "Resource reference. The referenced resource represent a mesh.",
			"stfDescription": "The resource must represent a mesh."
		},
		"armature_instance": {
			"$ref": "https://schema.stfform.at/stf.schema.json#resource_ref",
			"description": "Resource reference. The referenced resource represent an armature instance.",
			"stfDescription": "The resource must represent an armature instance."
		},
		"blendshape_values": {
			"type": "array",
			"items": {
				"type": ["number", "null"]
			},
			"description": "The values for each blendshape. If a value is supposed to remain default, it will be `null`."
		},
		"materials": {
			"type": "array",
			"items": {
				"$ref": "https://schema.stfform.at/stf.schema.json#resource_ref",
				"type": ["integer", "null"],
				"stfType": "Resource-Ref | null"
			},
			"description": "Resource references. The material for each material slot, or null if the meshes default material should not be overridden."
		}
	},
	"required": [
		"type",
		"mesh"
	],
	"additionalProperties": false,
	"examples": [{
			"type": "stf.instance.mesh",
			"name": "",
			"referenced_resources": [
				"8dedc60f-91cd-4e5e-a032-07dc82358519",
				"e6ae2ed1-fc53-43ee-ac53-05bf296d5fc1",
				"92133d53-1868-4666-943f-427e44b0e432"
			],
			"mesh": 0,
			"armature_instance": 1,
			"materials": [
				null,
				3
			],
			"blendshape_values": [
				null,
				null,
				0.0,
				0.2,
				1.0,
				0.375,
				null,
				null,
				null
			]
		}
	]
}