How do I get the name of the current scene property “primary_location_method”? (i.e. “Smart”)
Also, it would be helpful to be able to get the current description and icon as well…
So, for example… if I were to do something like this:
myProperty = context.scene.neltulzSmartObject.primary_location_method
property_name = myProperty.get_name_somehow
property_description = myProperty.get_description_somehow
property_icon = myProperty.get_icon_somehow
My property setup:
#from properties.py...
class NeltulzSmartObject_IgnitProperties(PropertyGroup):
primary_location_method_list = [
("SMART", "Smart", "Automatically create object based on context", "FAKE_USER_ON", 0),
("WORLD_ORIGIN", "World Origin", "Create object at World Origin", "WORLD", 1),
("CURSOR", "3D Cursor", "Create object at 3D Cursor Location", "CURSOR", 2),
("VIEWPORT", "Viewport", "Create object at Viewport Location", "RESTRICT_VIEW_ON", 3),
("CUSTOM", "Custom", "Create object at a custom location", "TOOL_SETTINGS", 4),
]
primary_location_method : EnumProperty(
items = primary_location_method_list,
description = "Which to use (Default: Smart)",
default = "SMART",
update = misc_functions.prop_store,
)
#from __init__.py...
#properties
from . properties import NeltulzSmartObject_IgnitProperties
classes = (
# properties
NeltulzSmartObject_IgnitProperties
)
def register():
from bpy.utils import register_class
for cls in classes:
register_class(cls)
#add property group to the scene
bpy.types.Scene.neltulzSmartObject = bpy.props.PointerProperty(type=NeltulzSmartObject_IgnitProperties)
Any help would be greatly appreciated!