Post #2849: ![](https://blenderartists.org/user_avatar/blenderartists.org/z01ks/48/564304_2.

📋 Metadata

  • Author: roaoao
  • Date: 2019-10-26 00:48:01
  • Type: answer
  • Quality Score: 8/10
  • Reply to: post_02847

🏷️ Tags

pie-menu popup-dialog custom-menus intermediate solved

  • Regular Menu
  • Custom Tab
  • Python Scripting
  • Popup Dialog Editor

💬 Content

z01ks:

I tried a few things but couldn’t get it to work.

You can use Regular Menu to select a collection for the tool.
This code generates a list of available collections (Custom tab):

[(globals().update(row=L.row()), row.context_pointer_set("collection", collection), operator(row, "object.instance_offset_from_cursor", text=collection.name)) for collection in C.object.users_collection]

❤️ 3 likes


🔗 View on Blender Artists