Esempio n. 1
0
        // Manager integrity and reset
        private void checkValidity()
        {
            SketchfabPlugin.checkValidity();
            if (_api == null)
            {
                _api = SketchfabPlugin.getAPI();
            }

            if (_resultUids == null)
            {
                _resultUids = new List <string>();
            }

            if (_sketchfabModels == null)
            {
                _sketchfabModels = new Dictionary <string, SketchfabModel>();
            }

            if (_categories == null)
            {
                fetchCategories();
            }

            if (_importer == null)
            {
                _importer = new SketchfabImporter(ImportProgress, ImportFinish);
            }
        }
Esempio n. 2
0
 private void checkValidity()
 {
     SketchfabPlugin.checkValidity();
     if (_ui == null)
     {
         _ui = new SketchfabUI();
     }
     if (_importer == null)
     {
         Initialize();
     }
 }
Esempio n. 3
0
        private void checkValidity()
        {
            if (_browserManager == null)
            {
                _browserManager = new SketchfabBrowserManager(OnRefreshUpdate, true);
                resetFilters();
                _currentUid      = "";
                _categoryName    = "";
                _categoriesNames = new string[0];

                // Setup sortBy
                _sortBy    = new string[] { "Relevance", "Likes", "Views", "Recent" };
                _polyCount = new string[] { "Any", "Up to 10k", "10k to 50k", "50k to 100k", "100k to 250k", "250k +" };
                this.Repaint();
                GL.sRGBWrite = true;
            }

            SketchfabPlugin.checkValidity();
            _ui     = SketchfabPlugin.getUI();
            _logger = SketchfabPlugin.getLogger();
        }
        // Manager integrity and reset
        private void checkValidity()
        {
            SketchfabPlugin.checkValidity();
            if (_api == null)
            {
                _api = SketchfabPlugin.getAPI();
            }

            if (_sketchfabModels == null)
            {
                _sketchfabModels = new OrderedDictionary();
            }

            if (_categories == null)
            {
                fetchCategories();
            }

            if (_importer == null)
            {
                _importer = new SketchfabImporter(ImportProgress, ImportFinish);
            }
        }
        private void checkValidity()
        {
            if (_browserManager == null)
            {
                _browserManager = new SketchfabBrowserManager(OnRefreshUpdate, true);
                resetFilters();
                _currentUid      = "";
                _categoryName    = "";
                _categoriesNames = new string[0];

                // Setup sortBy
                _sortBy    = new string[] { "Relevance", "Likes", "Views", "Recent" };
                _polyCount = new string[] { "Any", "Up to 10k", "10k to 50k", "50k to 100k", "100k to 250k", "250k +" };
                _searchIn  = new string[] { "free downloadable", "my models", "store purchases" };
                _license   = new string[] { "any", "CC BY", "CC BY SA", "CC BY-ND", "CC BY-NC", "CC BY-NC-SA", "CC BY-NC-ND", "CC0" };               // No search for store models so only CC licenses here
                this.Repaint();
                GL.sRGBWrite = true;
            }

            SketchfabPlugin.checkValidity();
            _ui     = SketchfabPlugin.getUI();
            _logger = SketchfabPlugin.getLogger();
        }