BrowserLibraryPopup



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

    On 04/03/2009 at 09:42, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   11 
    Platform:   Windows  ; Mac  ;  Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    After a day or two I must admit that trying to figure it out by myself seems not to lead to a successful path:

    I'd like to use

    > void BrowserLibraryPopup(LONG mx, LONG my, LONG defw, LONG defh, LONG pluginwindowid, LONG presettypeid, void\* userdata, BrowserPopupCallback callback);

    to let the user choose an item from a list of default images.

    It works fine in regard that the popup is created and displayed but its empt and I am totally in the dark what values to use for:

    > LONG pluginwindowid

    and

    > LONG presettypeid

    I managed to assign a callback function but it doesn't get called. I suppose because the popup has no content yet.

    For the start maybe even just an example to open the Sky object's preset popup (as mentioned in the documentation) would be helpful.

    Best and thanks in advance
    Macm



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

    On 05/03/2009 at 07:27, xxxxxxxx wrote:

    'pluginwindowid' is just a unique ID of your choice. For 'presettypeid' you have to pass a valid browser preset plugin ID. It's the one returned in SDKBrowserPluginInterfaceInfo::GetPluginID(). So for instance if you have written your own preset plugin you would pass the ID of your preset plugin.

    Here is an example that displays all object presets

    > \> void BPop(void\* userdata, LONG cmd, SDKBrowserURL& url) \> { \>      GePrint(url.GetString()); \> } \> \> enum \> { \>      MYWINDOWID = 1000 \> }; \> \> Bool MenuTest::Execute(BaseDocument \*doc) \> { \>      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); \> \>      BrowserLibraryPopup(mx, my, 200, 200, MYWINDOWID, CBPluginTypeObjectPreset, NULL, BPop); \>       \>      return TRUE; \> } \>

    Do you need the ID of a specific preset category?

    cheers,
    Matthias



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

    On 05/03/2009 at 07:41, xxxxxxxx wrote:

    Thanks for clarification.

    >>> Do you need the ID of a specific preset category?

    No thanks, I'll write my own SDKBrowserPluginInterfaceInfo.
    Though I'll have to dig through the SDKBrowserPluginInterfaceInfo code first and hope I wont get stuck again. I set up a SDKBrowserPluginInterfaceInfo plugin yesterday and just wondered that none of its function were called when I initiated BrowserLibraryPopup.

    Well GetPluginID() in fact did get called but naturally because of registering the plugin;

    I'll get back to you if I get lost again.

    Best
    Macm



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

    On 16/03/2009 at 06:02, xxxxxxxx wrote:

    Ok, I tried hard to understand what to do next but got stuck again...

    When BrowserLibraryPopup() is called with the ID of my SDKBrowserPluginInterfaceInfo-plugin an empty window pops up.

    The only method of SDKBrowserPluginInterfaceInfo that gets called is "GetPluginID" where I return the PluginID I used for BrowserLibraryPopup();

    I'ts quite harde to understand what SDKBrowserPluginInterfaceInfo does at all and even harder when none of the functions get called...

    Best and thanks in advance
    Macm



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

    On 19/03/2009 at 03:37, xxxxxxxx wrote:

    I have to do some research here as well. I've never written a browser plugin. I'll let you know if I've figured things out.

    cheers,
    Matthias



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

    On 08/04/2009 at 03:21, xxxxxxxx wrote:

    Anything new on this topic?

    Cheers
    Macm


Log in to reply