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!