Esempio n. 1
0
        void addUI()
        {
            string hint        = "Uploads the model to Sketchfab";
            string callback    = "PublishCmd_Callback";
            string enable_mthd = "Publish_Enable";
            int    position    = 16; // Before 'Publish to 3DVia.com...'

            int[] showInDocumentTypes = new int[2] {
                (int)swDocumentTypes_e.swDocPART, (int)swDocumentTypes_e.swDocASSEMBLY
            };

            string file_path = bitmapHandler.CreateFileFromResourceBitmap("SketchfabExporterforSW.sketchfab.bmp", this.GetType().Assembly);


            foreach (var type in showInDocumentTypes)
            {
                SwApp.AddMenuItem4(
                    type,
                    Cookie,
                    PublishMenuTitle,
                    position,
                    callback,
                    enable_mthd,
                    hint,
                    file_path);
            }
        }