The duplicate post doesn't address the items in the dropdown. Only the bpy.types. The dropdown isn't part of that.
I'm have added a custom function to the face dropdown in the header region when in Edit mode. by appending to bpy.types.VIEW3D_MT_edit_mesh_faces
How do I change the order of my function in the dropdown list?
Here is a similar question but is addressing a different part of the UI.
what I want to see happen (doctored image):
The script so far:
bl_info = {
"name": "Custom Algo",
"blender": (2, 80, 0),
"category": "Face",
}
import bpy
class CustomAlgo(bpy.types.Operator):
"""Custom Algo"""
bl_idname = "face.Custom_algo"
bl_label = "Custom Algo"
def execute(self, context):
print("Pretend that you have done something sticky with that face")
return {'FINISHED'}
def menu_func(self, context):
self.layout.operator(CustomAlgo.bl_idname)
def register():
bpy.utils.register_class(CustomAlgo)
bpy.types.VIEW3D_MT_edit_mesh_faces.append(menu_func)
def unregister():
bpy.utils.unregister_class(CustomAlgo)
bpy.types.VIEW3D_MT_edit_mesh_faces.remove(menu_func)
if __name__ == "__main__":
register()
prepend
orappend
or do one of the workarounds listed. $\endgroup$