Edit button icon with python

   2537   1   0
User Avatar
Member
31 posts
Joined: Feb. 2017
Offline
Hi,

I'm creating an otl's parameter interface with python and I would like to add an icon to a button. I can do this in the interface by adding something to the Button Icon field in the Type Properties window. However, I can't find a reference in the docs of how to do this via Python.

Anyone have an idea?

Thanks
User Avatar
Member
31 posts
Joined: Feb. 2017
Offline
Answering my own question for future reference. Someone at work pointed out to me that this can be done with tags.

The relevant part of the ButtonParmTemplate is:

tags = {"button_icon": "$HOME/Desktop/tractor.png"}
Edited by ajk48n - July 20, 2017 23:22:47
  • Quick Links