Creating a custom Browser
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/12/2012 at 06:56, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R14
Platform:
Language(s) :---------
Hi people,
I am trying to implement a Browser Plugin to support browsing of files of my own file format (showing a thumbnail and a label).
I've created a subclass of SDKBrowserPluginInterfaceInfo as in this example, but failed to make use of it by calling BrowserLibraryPopup. While the registration returns TRUE, I can't trigger the overriden functions (except GetPluginID nothing gets called) . A similar issue was posted here, but remained unanswered.
Independent of this problem I think that BrowserLibraryPopup won't satisfy my requirements. It should be possible to display a label, and drag and drop with the viewport would be really cool. I've already implemented a browser in 3ds Max which looks like this:
The user selects a path on the hard disc and the browser shows the identified files (and takes a png with the same name as the files as thumbnail).
Could this be achieved using SDKBrowserPluginInterfaceInfo maybe in combination with SDKBrowser::LoadPreset/SavePreset (could not find any example for these) or do I have to write my own browser. If so, which GUI Element would you recommend? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/12/2012 at 07:13, xxxxxxxx wrote:
If you do have to write your own, the most likely GUI element would be either a TreeView or a GeUserArea. A GeUserArea will allow you to tile (not sure this is possible with a TreeView) but you will need to control the 'interface' within the GeUserArea on your own. That is, you'll have to check for mouse and keyboard entry and display all graphics accordingly. A TreeView has a helper class call TreeViewFunctions which lets you control the interface.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/12/2012 at 07:21, xxxxxxxx wrote:
I would write my own in this case. I did the same thing when I wrote my sIBL Loader plugin, to let the user browse the sIBL sets they had. It was pretty simple to get it working.
In my case I created a GeDialog with a scrollgroup, with another group inside it with 4 columns. Then to display the presets I create as many BitmapButtons as required - one for each preset. That has to be done in code using AddCustomGui(). All that remains is to load the preview bitmap into its corresponding BitmapButton.
The user can then select the required preset by clicking the relevant BitmapButton.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/12/2012 at 00:59, xxxxxxxx wrote:
Thanks for the replies!
I've decided to work with the GeUserArea-class as it provides more flexibility.
Any advice on how to use the in-built Browser is still welcome!