# How to add a RMB menu item for a property

When over shader node property, I want to add a RMB Custom menu item to call a function:

For what it's worth, the function would add a custom property with the name of the Node.field, and would add a driver that uses the value of this Custom Property.

I would eventually like to extend this to other properties on an object's properties.

• The menu is UI_MT_button_context_menu, but I don't know how to get the property that was clicked on. See this. Mar 17 at 21:44