Exemplo n.º 1
0
        bool usdiLoad(DataPath path)
        {
            usdiUnload();

            m_path          = path;
            m_path.readOnly = true;
            m_ctx           = usdi.usdiCreateContext();

            var fullpath = m_path.GetFullPath();

            if (!usdi.usdiOpen(m_ctx, fullpath))
            {
                usdi.usdiDestroyContext(m_ctx);
                m_ctx = default(usdi.Context);
                usdiLog("usdiStream: failed to load " + fullpath);
                return(false);
            }

            // apply variant selections
            if (usdiApplyVarianceSelections())
            {
                usdi.usdiRebuildSchemaTree(m_ctx);
            }
            usdiApplyImportConfig(true);

            usdiConstructTrees();

            // fill sample data with initial time
            m_requestForceUpdate = true;
            usdiAsyncUpdate(m_time);
            usdiUpdate(m_time);

            usdiLog("usdiStream: loaded " + fullpath);
            return(true);
        }
Exemplo n.º 2
0
        public void usdiReload()
        {
            if (!m_ctx)
            {
                return;
            }

            usdiWaitAsyncUpdateTask();

            usdiApplyImportConfig();
            usdiApplyVarianceSelections();
            usdi.usdiRebuildSchemaTree(m_ctx);

            usdiConstructTrees();

            // fill sample data with initial time
            usdiAsyncUpdate(m_time);
            usdiUpdate(m_time);

            var fullpath = m_path.GetFullPath();

            usdiLog("usdiStream: reloaded " + fullpath);
        }