public SkinnedMeshCapturer CreateComponentCapturer(ComponentCapturer parent, SkinnedMeshRenderer target) { if (m_detailedLog) { Debug.Log("AlembicExporter: new SkinnedMeshCapturer(\"" + target.name + "\""); } var cap = new SkinnedMeshCapturer(parent, target); m_capturers.Add(cap); return(cap); }
SkinnedMeshCapturer CreateComponentCapturer(ComponentCapturer parent, SkinnedMeshRenderer target) { if (m_settings.debugLog) { Debug.Log("AlembicRecorder: new SkinnedMeshCapturer(\"" + target.name + "\")"); } var cap = new SkinnedMeshCapturer(this, parent, target); m_capturers.Add(cap); return(cap); }
public SkinnedMeshCapturer CreateComponentCapturer(SkinnedMeshRenderer target, AbcAPI.aeObject parent) { if (m_detailedLog) { Debug.Log("AlembicExporter: new SkinnedMeshCapturer(\"" + target.name + "\""); } var abc = AbcAPI.aeNewPolyMesh(parent, target.name); var cap = new SkinnedMeshCapturer(target, abc); m_capturers.Add(cap); return(cap); }
void SetupComponentCapturer(CaptureNode parent, CaptureNode node) { usdiLog("SetupComponentCapturer() " + node.trans.name); node.parent = parent; var parent_capturer = parent == null ? m_root : parent.capturer; bool fallback = false; if (node.componentType == typeof(Camera)) { node.capturer = new CameraCapturer(this, parent_capturer, node.trans.GetComponent <Camera>()); } else if (node.componentType == typeof(MeshRenderer)) { var renderer = node.trans.GetComponent <MeshRenderer>(); if (MeshCapturer.canCapture(renderer)) { node.capturer = new MeshCapturer(this, parent_capturer, renderer); } else { Debug.LogWarning("Mesh \"" + renderer.name + "\" is not readable and be skipped"); fallback = true; } } else if (node.componentType == typeof(SkinnedMeshRenderer)) { var renderer = node.trans.GetComponent <SkinnedMeshRenderer>(); if (SkinnedMeshCapturer.canCapture(renderer)) { node.capturer = new SkinnedMeshCapturer(this, parent_capturer, renderer); } else { Debug.LogWarning("SkinnedMesh \"" + renderer.name + "\" is not readable and be skipped"); fallback = true; } } else if (node.componentType == typeof(ParticleSystem)) { node.capturer = new ParticleCapturer(this, parent_capturer, node.trans.GetComponent <ParticleSystem>()); } else if (node.componentType == typeof(UsdCustomComponentCapturer)) { node.capturer = new CustomCapturerHandler(this, parent_capturer, node.trans.GetComponent <UsdCustomComponentCapturer>()); } else { fallback = true; } if (fallback) { node.capturer = new TransformCapturer(this, parent_capturer, node.trans.GetComponent <Transform>()); } if (node.capturer != null) { m_capturers.Add(node.capturer); } foreach (var c in node.children) { SetupComponentCapturer(node, c); } }