How to change "Embed Icon in Operator" option in Type Properties with Python? Or it's impossible?
2091 3 1- Garry_cg
- Member
- 7 posts
- Joined: 12月 2017
- Offline
- oleite
- Member
- 3 posts
- Joined: 8月 2019
- Offline
- ivantitov_zd
- Member
- 27 posts
- Joined: 2月 2017
- Offline
It seems it should be here [www.sidefx.com], but SideFX forgot about it.
You can manually add section [www.sidefx.com] with icon data. Use set_icon function from $HFS/houdini/python2.7libs/sas/inspectassets.py directly or as reference.
You can manually add section [www.sidefx.com] with icon data. Use set_icon function from $HFS/houdini/python2.7libs/sas/inspectassets.py directly or as reference.
Edited by ivantitov_zd - 2021年7月23日 06:49:50
English is not my native language, sorry in advance for any misunderstanding
- sdugaro
- Member
- 380 posts
- Joined: 7月 2005
- Offline
hmm, yeah... just looked into this myself, and inspectassets.py. Not obvious at all.
Manually, one can put something like `MISC_digital_asset` in the Icon Field of Operator Type Properties to pick up and use that icon in the HOUDINI_PATH with embed Icon In Operator toggled off...
but it seems to me as of H19.5.435 there still isn't a way to toggle that off by way of HOM, so you can
hda_def.setIcon("MISC_digital_asset") to just put the raw string there. That HOM call is smart enough to locate the icon you provide it if it can be found in the HOUDINI_PATH, but it surprisingly goes ahead and embeds it because this toggle gets in the way.
It would be great if, as you mentioned, this was in hou.HDAOptions, though those look geared toward the Save Tab.
This option should probably be at the top level, alongside setIcon, or even better, as an argument to setIcon itself.
Manually, one can put something like `MISC_digital_asset` in the Icon Field of Operator Type Properties to pick up and use that icon in the HOUDINI_PATH with embed Icon In Operator toggled off...
but it seems to me as of H19.5.435 there still isn't a way to toggle that off by way of HOM, so you can
hda_def.setIcon("MISC_digital_asset") to just put the raw string there. That HOM call is smart enough to locate the icon you provide it if it can be found in the HOUDINI_PATH, but it surprisingly goes ahead and embeds it because this toggle gets in the way.
It would be great if, as you mentioned, this was in hou.HDAOptions, though those look geared toward the Save Tab.
This option should probably be at the top level, alongside setIcon, or even better, as an argument to setIcon itself.
-
- Quick Links