Skip to main content
14 events
when toggle format what by license comment
Apr 5, 2022 at 4:45 vote accept Tyler
Apr 4, 2022 at 21:49 answer added scurest timeline score: 1
Apr 4, 2022 at 18:48 comment added Marty Fouts @Tyler all you have to do is leave out the code that supports adding and users can't change the list.
Apr 4, 2022 at 17:12 history edited Tyler CC BY-SA 4.0
added 16 characters in body
Apr 4, 2022 at 17:11 comment added Tyler @Ratt Thanks for that advice! I have updated my post to explain my overall goal. I would love to try using your obj_key definition above (and would have preferred to use a list from the start) but I don't see a way to simply display a dropdown of a list of items in the blender 3.1 API. I'm sure it's there and I'm missing it, but I'll say this API reads very differently than others I'm accustomed to so I'm struggling a bit on the front end of the learning curve. Thanks so much for your effort to explain despite my obliviousness.
Apr 4, 2022 at 17:07 history edited Tyler CC BY-SA 4.0
Expanded on what my goal is so those trying to help me can give better advice.
Apr 4, 2022 at 16:59 comment added Ratt @Tyler If you don't want to modify (add/remove/re-order) the shape keys you really don't need to use an enum property at all since you can list all the keys of a given object obj_key = [k for k in bpy.data.shape_keys if k.user.name == obj.name][0] furthermore if you use an enum property you'll still want to use a dynamic enum with several potential updates in the event someone modifies the keys outside your panel. I think a more robust description of your overall goal may be useful for people to offer aid.
Apr 4, 2022 at 16:04 history edited Tyler CC BY-SA 4.0
added a GIF example of what I'd like to accomplish
Apr 4, 2022 at 15:54 history edited Tyler CC BY-SA 4.0
deleted 4 characters in body
Apr 4, 2022 at 15:48 comment added Tyler @MartyFouts thanks for sharing that tutorial. I have seen some tutorials on UILists and I don't want the user to be able to add or delete shapekeys via my panel. I simply want to list the existing shapekeys, allow the user to select one, and then do something in Python based on that selection.
Apr 4, 2022 at 15:46 comment added Tyler @scurest my goal is to list all the shapekeys for the active object, allow a user to select one from the list, and then use that selection to do other things via Python. But interestingly enough my panel does show props for bpy.context.active_object.active_shape_key.
Apr 4, 2022 at 15:11 comment added Marty Fouts This sort of thing is most easily done with a UIList. See this tutorial for an introduction.
Apr 4, 2022 at 5:04 comment added scurest I don't think panels can have props. What is your goal with shapekey_enum? Is there one for the whole scene, or is there one per mesh?
Apr 4, 2022 at 4:28 history asked Tyler CC BY-SA 4.0