Dialog Question
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/01/2011 at 06:40, xxxxxxxx wrote:
The AR Sky is using the BrowserLibraryPopup function to display the popup. This invlolves some knowledge about Content Browser programming though.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/01/2011 at 06:57, xxxxxxxx wrote:
Thanks Matthias, I will check out the SDK for that function when I get home. Is there literature on Content Browser programming at all anywhere?
~Shawn
EDIT: Nevermind. I got around my work computer's block for downloading the SDK here at work by downloading it on my phone and pulling it off of there. I can now look through the Browser related functions. Thanks again Matthias.
~Shawn -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/01/2011 at 12:52, xxxxxxxx wrote:
Okay so I am trying to use : BrowserLibraryPopup
but am running in to some trouble. I saw an earlier post by Matthias HERE.
Here is the code I am messing with so far.
//MESSAGE //====================================================// Bool PlanetXObject::Message(GeListNode *node, LONG type, void *t_data){ BaseContainer state; GetInputState(BFM_INPUT_MOUSE, 0/*BFM_INPUT_MOUSELEFT*/, state); LONG mx = state.GetReal(BFM_INPUT_X); LONG my = state.GetReal(BFM_INPUT_Y); switch (type){ case MSG_DESCRIPTION_COMMAND: BrowserLibraryPopup(mx, my, 200, 200, MYWINDOWID, CBPluginTypeObjectPreset, NULL, BPop); } return TRUE; }
my problem is, that Bpop is supposed to be a
BrowserPopupCallback_<_h4_>_
and I have no idea how to use that. Could someone explain that better to me?
Thanks,
~Shawn
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/01/2011 at 17:11, xxxxxxxx wrote:
So if I want to create a Browser Plugin , Do I have my class inherit from
**SDKBrowser** or should it inherit from **SDKBrowserPluginInterfaceInfo ? Thanks, Shawn **
-
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
-
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
-
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 -
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 -
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 ?
-
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 -
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
-
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); }
-
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 -
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
-
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 -
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