Wish: option to show only certain categories/types in ShowContentChooser

Pretty simple, I’d like to be able to tell ShowContentChooser to show only certain types of content.

I suppose the simplest form of this would be to accept a single category name and preset that in the dialog. More powerful would be to provide overloads accepting a list of categories, and a list of content type IDs.

Hi @jdhill,

We should be able to add this to Rhino 7. I have filed a bug to make sure it gets done.

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

Regards,

John

Thanks!

Hi @jdhill,

This is now done and will be available in Rhino 7.6. Sorry it took so long!

There is a new version of ShowContentChooser which allows you to:

  • Preset a single category name in the drop-down list.
  • Specify a list of categories to display. No other categories are displayed.
  • Specify a list of content type IDs to display. No other types are displayed.

If these items are empty string/arrays, then the function assumes the old behavior.

There is example code here: https://mcneel.myjetbrains.com/youtrack/issue/RH-58381

Regards,

John

1 Like

That sounds great, thanks!

Hi @jdhill,

Have you had a chance to test this yet? I’m wondering if it does what you need?

Regards,

John

I target v6 so had not yet written the reflection to make use of this, but I just did, and it seems to work perfectly – thanks again! :slight_smile:

@jdhill,

Great! Thanks for the confirmation.

John