I'm working on an addon where I'd like to be able to select a collection from a drop down list.
The Freestyle options have a way to do it, and it looks like this:
I used the developer tools to look and see what the Python code is like for the UI there, and it's something like this:
layout.row().prop(lineset, "collection", text="Line Set Collection")
I'm pretty new to building UI in Blender/Python, but obviously copying and pasting this into the draw function of the Panel in my addon didn't do what it needed to do (the lineset of course is not defined for my addon). But what do I need to do to be able to get a similar drop down box where I can select a collection?
Thanks!



properties_freestyle.pyin 3.1.2 – Marty Fouts Apr 06 '22 at 23:39