Esempio n. 1
0
        public override void usdiOnLoad()
        {
            base.usdiOnLoad();

            m_points = usdi.usdiAsPoints(m_schema);
            usdi.usdiPointsGetSummary(m_points, ref m_summary);
            m_attrRot = usdi.usdiPrimFindAttribute(m_points, "rotations");
        }
Esempio n. 2
0
        public override void usdiOnLoad(usdi.Schema schema)
        {
            base.usdiOnLoad(schema);

            m_points = usdi.usdiAsPoints(schema);
            if (!m_points)
            {
                Debug.LogWarning("schema is not Points!");
                return;
            }
            usdi.usdiPointsGetSummary(m_points, ref m_summary);
            m_attrRot = usdi.usdiFindAttribute(m_points, "rotations");
        }
Esempio n. 3
0
        public override void usdiOnUnload()
        {
            base.usdiOnUnload();

            m_asyncRead = null;

            m_points     = default(usdi.Points);
            m_summary    = default(usdi.PointsSummary);
            m_pointsData = default(usdi.PointsData);
            m_attrRot    = default(usdi.Attribute);
            m_rotData    = default(usdi.AttributeData);

            m_positions  = null;
            m_velocities = null;
            m_rotations  = null;
        }
Esempio n. 4
0
            public ParticleCapturer(usdiExporter 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 <usdiParticleExportConfig>();

                if (config != null)
                {
                    m_captureRotations = config.m_captureRotations;
                }
                if (m_captureRotations)
                {
                    m_attr_rotatrions = usdi.usdiPrimCreateAttribute(m_usd, "rotations", usdi.AttributeType.Float4Array);
                }
            }