Skip to main content

Timeline for Blender Python: Custom Enum Flags

Current License: CC BY-SA 4.0

13 events
when toggle format what by license comment
Feb 7, 2021 at 18:05 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Oct 10, 2020 at 15:03 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Jun 11, 2020 at 1:00 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Feb 9, 2020 at 18:01 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Oct 10, 2019 at 19:01 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Sep 8, 2019 at 17:14 answer added Robert timeline score: -1
Sep 8, 2019 at 17:01 comment added Robert After messing around some more, it looks like my problem has nothing to do with enums. All of my properties that relate to the scene or objects are not drawing, but also not showing any errors. Apparently, something I did recently caused this. If anyone has a good guess as to what it might be, I appreciate it. EDIT: I figured it out 5 seconds after posting this. It is because I used ':' operator instead of '=' when defining the properties. Weird. I read that Blender 2.8+ should use ':'.
Sep 8, 2019 at 15:03 comment added Robert Unfortunately, the docs didn't help much even after finally finding the description of the numbers attribute. I don't understand why I would need a unique identifier for a variable that already has one? I tried setting the number attribute of both EnumProperty entries. I tried 7 (bit 1, 2, and 3 all turned on), 8 (the next available bit), and 16 (for kicks). Nothing seems to change. My properties are still invisible with no errors. I appreciate your extreme efforts, though
Sep 8, 2019 at 14:44 comment added Robert Wow, I didn't notice the little scrollbars for each entry until just now. All this time, I assumed the docs only explained the first few elements and moved on.
Sep 8, 2019 at 3:41 comment added batFINGER Consult the docs docs.blender.org/api/blender2.8/… items = [(identifier, name, description, icon, number ), ...].
Sep 8, 2019 at 3:14 comment added Robert Yes, they are intended to allow toggling all three states independently. For example, an object can be exported as both an asset and low poly for baking. I'm having trouble understanding your advice. I'm also not clear on what the item "number" would represent? The number of enum entries? I'm very new to python, so its likely my lack of knowledge. My goal here is to just have the two variables have interchangeable flags. So, for example, I can use a flag I detected enabled for collection-spawners in a function that activates object-blockers, without having to manually translate.
Sep 8, 2019 at 2:49 comment added batFINGER Consult the docs docs.blender.org/api/blender2.8/… Using ENUM_FLAG allows multi-select of enum items and requires the item number to be set. Is this what you want? to for example have ability to mark item as both low and high poly? (Probably not). Appears there is no need for the dynamic items method here either, could define the items list items = [(a, b, c), ..] then in defining prop items=items
Sep 8, 2019 at 1:25 history asked Robert CC BY-SA 4.0