Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Dialog Question

    SDK Help
    0
    19
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 17/01/2011 at 05:41, xxxxxxxx wrote:

      okay so I am able to get the dialog to open like this.

        
            case MSG_DESCRIPTION_COMMAND:{  
                  
                DescriptionCommand *dc = (DescriptionCommand* ) t_data;  
                if(!dc)return FALSE;  
              
                //LOAD PRESET  
                if (dc->id==(DescID)PLANETX_SURFACE_LOAD_PRESET)  
                {  
                    BrowserLibraryPopup(mx, my, width, height,ID_SURFACEPRESETS_WINDOW, CBPluginTypeDefaults, NULL, NULL);  
                }  
        
                //SAVE PRESET  
                if (dc->id==(DescID)PLANETX_SURFACE_SAVE_PRESET)  
                {  
                    GePrint("Save Preset");  
                }  
            }  
      

      Now my question is, how do I get a specific .lib4d file to load in to the dialog ?

      ~Shawn

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 17/01/2011 at 13:45, xxxxxxxx wrote:

        Anyone know anything about calling in files from the content browser?  🙂

        ~Shawn

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 18/01/2011 at 06:56, xxxxxxxx wrote:

          In order to show your own presets you need to program your own content browser plugin. I will try to put an example together.

          cheers,
          Matthias

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 18/01/2011 at 09:42, xxxxxxxx wrote:

            Thanks Matthias,   that would be extremely helpful.   I appreciate you taking the time to do it. 
             
            🙂
             
            ~Shawn

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 25/01/2011 at 19:47, xxxxxxxx wrote:

              Is a broswer plugin made with SDKBrowser or SDKBrowserPluginInterfaceInfo ?

              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 26/01/2011 at 01:35, xxxxxxxx wrote:

                The plugin is derived from SDKBrowserPluginInterfaceInfo and registered with SDKBrowser::RegisterBrowserPlugin().

                I have never written a browser plugin myself so currently I can't tell you much about it. I am still waiting for an answer from our developers.

                cheers,
                Matthias

                1 Reply Last reply Reply Quote 0
                • H
                  Helper
                  last edited by

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 26/01/2011 at 03:13, xxxxxxxx wrote:

                  Thanks Matthias,

                  I'm gonna have a play with it to see if I can piece one together until you hear back from them.

                  ~Shawn

                  1 Reply Last reply Reply Quote 0
                  • H
                    Helper
                    last edited by

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 30/01/2011 at 15:27, xxxxxxxx wrote:

                    Okay so here is my first attempt at writing a browser plugin.

                    Everything works except the registration function.  Does anyone see what I am doing wrong with the registration function for this plugin?

                    I am using the class as the SDKBrowserPluginInterfaceInfo that is required in the registration.

                    Here's the code:

                      
                      
                    //BROWSER INTERFACE PLUGIN  
                      
                    #include "c4d.h"  
                    #include "c4d_symbols.h"  
                    #include "lib_browser.h"  
                      
                    //PLUGIN ID  
                    #define PXG_BROWSER_PLUGIN 1026577   
                      
                    class PXGBrowserPlugin : public SDKBrowserPluginInterfaceInfo{  
                      
                    public:  
                      
                      virtual LONG GetPluginID(String* plugin_name);  
                      virtual Bool Identify(const SDKBrowserURL& url, UCHAR* probe, LONG size, ULONG flags);  
                      virtual String GetTypeName(const SDKBrowserContentNodeRef node, const SDKBrowserURL* url, LONG mode);  
                     // virtual String* GetTypeNames(LONG mode, LONG* no_strings);  
                      
                      virtual SDKBrowserPreviewData* OpenPreviewBitmap(BaseThread* thread, const SDKBrowserContentNodeRef node, const SDKBrowserURL* url, SDKBrowserPreviewInfo* info);  
                      virtual void ClosePreviewBitmap(SDKBrowserPreviewData* data);  
                      virtual BaseBitmap* GetPreviewBitmap(SDKBrowserPreviewData* data, LONG w, LONG h, LONG quality);  
                      
                      virtual SDKBrowserIcon* GetIcon(const SDKBrowserURL& url, LONG pref_wh);  
                      
                      virtual SubDialog* OpenPreviewDialog(SDKBrowserContentNodeRef node, LONG tab_id);  
                      virtual LONG ClosePreviewDialog(SDKBrowserContentNodeRef node, SubDialog* s);  
                      virtual Bool Open(SDKBrowserContentNodeRef node, const SDKBrowserURL* url, LONG flags);  
                    };  
                      
                      
                    LONG PXGBrowserPlugin::GetPluginID(String* plugin_name){  
                        
                      return NULL;  
                    }  
                      
                    Bool PXGBrowserPlugin::Identify(const SDKBrowserURL& url, UCHAR* probe, LONG size, ULONG flags){  
                      
                      return TRUE;  
                    }  
                      
                    String PXGBrowserPlugin::GetTypeName(const SDKBrowserContentNodeRef node, const SDKBrowserURL* url, LONG mode){  
                      
                      String test = "Test";  
                      return test;  
                    }  
                    /*  
                    String* PXGBrowserPlugin::GetTypeNames(LONG mode, LONG* no_strings){  
                      
                      String *test = "Test";  
                      return test;  
                      
                    }*/  
                      
                    SDKBrowserPreviewData* PXGBrowserPlugin::OpenPreviewBitmap(BaseThread* thread, const SDKBrowserContentNodeRef node, const SDKBrowserURL* url, SDKBrowserPreviewInfo* info){  
                      
                      
                    }  
                      
                    void PXGBrowserPlugin::ClosePreviewBitmap(SDKBrowserPreviewData* data){  
                      
                    }  
                      
                    BaseBitmap* PXGBrowserPlugin::GetPreviewBitmap(SDKBrowserPreviewData* data, LONG w, LONG h, LONG quality){  
                      
                      AutoAlloc<BaseBitmap> bmap;  
                      return bmap;  
                    }  
                      
                    SDKBrowserIcon* PXGBrowserPlugin::GetIcon(const SDKBrowserURL& url, LONG pref_wh){  
                      
                      SDKBrowserIcon *ico;  
                      return ico;  
                    }  
                      
                    SubDialog* PXGBrowserPlugin::OpenPreviewDialog(SDKBrowserContentNodeRef node, LONG tab_id){  
                        
                      SubDialog* sd;  
                      return sd;  
                    }  
                      
                    LONG PXGBrowserPlugin::ClosePreviewDialog(SDKBrowserContentNodeRef node, SubDialog* s){  
                      
                      return NULL;  
                    }  
                      
                    Bool PXGBrowserPlugin::Open(SDKBrowserContentNodeRef node, const SDKBrowserURL* url, LONG flags){  
                      
                      return TRUE;  
                    }  
                      
                    Bool RegisterPXGBrowserPlugin(void){  
                        
                      SDKBrowser *browser;   
                      return browser->RegisterBrowserPlugin(PXGBrowserPlugin, 0);  
                    }  
                      
                    
                    1 Reply Last reply Reply Quote 0
                    • H
                      Helper
                      last edited by

                      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                      On 31/01/2011 at 02:44, xxxxxxxx wrote:

                      RegisterBrowserPlugin is a static method. You call it like this:

                      EDIT: wrong code

                      cheers,
                      Matthias

                      1 Reply Last reply Reply Quote 0
                      • H
                        Helper
                        last edited by

                        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                        On 31/01/2011 at 03:11, xxxxxxxx wrote:

                        Thanks matthias.   I still get this error:

                          
                        1>pxgbrowserplugin.cpp  
                        1>c:\program files\maxon\cinema 4d r12 demo\plugins\planet x generator 2.0\source\object\pxgbrowserplugin.cpp(86) : error C2275: 'PXGBrowserPlugin' : illegal use of this type as an expression  
                        

                        Am I not allowed to use the class for the first argument for RegisterBrowserPlugin()?

                        ~Shawn

                        1 Reply Last reply Reply Quote 0
                        • H
                          Helper
                          last edited by

                          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                          On 31/01/2011 at 03:20, xxxxxxxx wrote:

                          Sorry I had an error in my code. You have to pass the allocted class.

                            
                          Bool RegisterPXGBrowserPlugin(void)  
                          {  
                            return SDKBrowser::RegisterBrowserPlugin(gNew PXGBrowserPlugin, 0);  
                          }  
                          

                          cheers,
                          Matthias

                          1 Reply Last reply Reply Quote 0
                          • H
                            Helper
                            last edited by

                            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                            On 31/01/2011 at 03:36, xxxxxxxx wrote:

                            Thanks Matthias.  It works now.  Just have to make sure I override all methods because it's abstract.  🙂

                            LOL

                            ~Shawn

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post