Exemplo n.º 1
0
            public SkinnedMeshCapturer(UsdExporter exporter, ComponentCapturer parent, SkinnedMeshRenderer target)
                : base(exporter, parent, target.GetComponent <Transform>(), false)
            {
                m_usd    = usdi.usdiCreateMesh(ctx, parent.usd, CreateName(target));
                m_target = target;
                m_buffer = new MeshBuffer();

                if (m_target.GetComponent <Cloth>() != null)
                {
                    base.scale = false;
                }

                m_captureNormals    = exporter.m_meshNormals;
                m_captureTangents   = exporter.m_meshTangents;
                m_captureUVs        = exporter.m_meshUVs;
                m_captureBones      = exporter.m_skinnedMeshFormat == SkinnedMeshFormat.BoneAndWeights;
                m_captureEveryFrame = !m_captureBones;

                var conf = target.GetComponent <UsdMeshExportSettings>();

                if (conf != null)
                {
                    m_captureNormals           = conf.m_captureNormals;
                    m_captureTangents          = conf.m_captureTangents;
                    m_captureUVs               = conf.m_captureUVs;
                    m_captureEveryFrame        = conf.m_captureEveryFrame;
                    m_captureEveryFrameUV      = conf.m_captureEveryFrameUV;
                    m_captureEveryFrameIndices = conf.m_captureEveryFrameIndices;
                }
            }
Exemplo n.º 2
0
 public CameraCapturer(UsdExporter exporter, ComponentCapturer parent, Camera target)
     : base(exporter, parent, target.GetComponent <Transform>(), false)
 {
     m_usd    = usdi.usdiCreateCamera(ctx, parent.usd, CreateName(target));
     m_target = target;
     //target.GetComponent<usdiCameraExportConfig>();
 }
Exemplo n.º 3
0
            public ParticleCapturer(UsdExporter exporter, ComponentCapturer parent, ParticleSystem target)
                : base(exporter, parent, target.GetComponent <Transform>(), false)
            {
                m_usd    = usdi.usdiCreatePoints(ctx, parent.usd, CreateName(target));
                m_target = target;

                var config = target.GetComponent <UsdParticleExportSettings>();

                if (config != null)
                {
                    m_captureRotations = config.m_captureRotations;
                }
                if (m_captureRotations)
                {
                    m_attr_rotatrions = usdi.usdiPrimCreateAttribute(m_usd, "rotations", usdi.AttributeType.Float4Array);
                }
            }
Exemplo n.º 4
0
            public TransformCapturer(UsdExporter exporter, ComponentCapturer parent, Transform target, bool create_usd_node = true)
                : base(exporter, parent)
            {
                m_target = target;
                if (create_usd_node)
                {
                    m_usd = usdi.usdiCreateXform(ctx, parent.usd, CreateName(target));
                }

                if (m_target.gameObject.isStatic)
                {
                    m_captureEveryFrame = false;
                }

                var config = target.GetComponent <UsdTransformExportSettings>();

                if (config)
                {
                    m_captureEveryFrame = config.m_captureEveryFrame;
                }
            }
Exemplo n.º 5
0
            public MeshCapturer(UsdExporter exporter, ComponentCapturer parent, MeshRenderer target)
                : base(exporter, parent, target.GetComponent <Transform>(), false)
            {
                m_usd    = usdi.usdiCreateMesh(ctx, parent.usd, CreateName(target));
                m_target = target;
                m_buffer = new MeshBuffer();

                m_captureNormals  = exporter.m_meshNormals;
                m_captureTangents = exporter.m_meshTangents;
                m_captureUVs      = exporter.m_meshUVs;

                var conf = target.GetComponent <UsdMeshExportSettings>();

                if (conf != null)
                {
                    m_captureNormals           = conf.m_captureNormals;
                    m_captureTangents          = conf.m_captureTangents;
                    m_captureUVs               = conf.m_captureUVs;
                    m_captureEveryFrame        = conf.m_captureEveryFrame;
                    m_captureEveryFrameUV      = conf.m_captureEveryFrameUV;
                    m_captureEveryFrameIndices = conf.m_captureEveryFrameIndices;
                }
            }
Exemplo n.º 6
0
 public CustomCapturerHandler(UsdExporter exporter, ComponentCapturer parent, UsdCustomComponentCapturer target)
     : base(exporter, parent, target.GetComponent <Transform>(), false)
 {
     m_target = target;
 }
Exemplo n.º 7
0
 public RootCapturer(UsdExporter exporter, usdi.Schema usd)
     : base(exporter, null)
 {
     m_usd = usd;
 }
Exemplo n.º 8
0
            public abstract void Flush(double t);   // called from worker thread

            protected ComponentCapturer(UsdExporter exporter, ComponentCapturer parent)
            {
                m_exporter = exporter;
                m_parent   = parent;
            }