Use Material File Browser via C++ SDK

I want to open the Rhino material file browser in a specific comand. I know the CRhinoGetFileDialog. There I can specifiy different file types (defined in CRhinoGetFileDialog::file_dialog_type), but material (*.rmtl) seems not to be available there. Ideally I also want to have a preview of the material thumbnails.

At the moment I’m using the standard MFC file browser.

@johnc, is this something you can help with?

Peter

You can just use CFileDialog for this.

Andy

Hi Andy,
yes, that’s what I’m doing right now (using CFileDialog).
I was hoping there is a special customized material file browser in the SDK including material bitmap preview etc. I noticed there is an embedded preview bitmap in the .rmtl files…

Thanks

Peter

Peter

You should be seeing previous for RMTL files if you have Rhino installed - if you change the view mode to icons.

If not, can you attach a screen capture?

  • Andy

Hi Andy,
you are right - if I change the view mode toicons I see the previews! See image below.

They are not displayed in the preview area:

But I will try to configure the CFileDialog that it shows up in the way I want.

Many thanks

Peter

Interesting - in Rhino 5 the preview area works:

Peter

The V5 preview dialog was custom built. It doesn’t work properly in Vista+, so we changed it to the standard dialog.

There are a few tweaks through - including forcing the view to icons when we start. I will try to dig out the code for you.

As for the preview on the side - I will look into that to see what can be done.

  • Andy

https://mcneel.myjetbrains.com/youtrack/issue/RH-53983