Let's say I have this custom property fu3dm_model_gender
: bpy.props.EnumProperty(name="Gender", description="Choose model's gender", items= [('OP1', "Male", ""), ('OP2', "Female", "")], default='OP1')
and I want to print the string of name parameter. How can I do this?
UPDATE
Actually, my property is part of an operator. In the following example I'd like to get the string of name
parameter and display it where the three X's (XXX) are:
class fu3dm_WM_OT_Model_Prefs_Operator(bpy.types.Operator):
bl_idname = "wm.fu3dm_model_prefs"
bl_label = "Model Preferences"
bl_description = "..."
fu3dm_model_gender : bpy.props.EnumProperty(name="Gender", description="Choose model's gender", items= [('OP1', "Male", ""), ('OP2', "Female", "")], default='OP1')
def invoke(self, context, event):
return context.window_manager.invoke_props_dialog(self)
bpy.ops.wm.fu3dm_model_prefs('INVOKE_DEFAULT')
def draw(self, context):
layout = self.layout
# BODY PREFS BOX - START
box = layout.box()
col = box.column()
row = col.split()
row.label(text=XXX)
row.prop(self, "fu3dm_model_gender", text="")
# BODY PREFS BOX - END
def execute(self, context):
pass
return {"FINISHED"}